Public Call For Security Researchers -- Swarm Multi User System #679
mcmonkey4eva
started this conversation in
General
Replies: 1 comment 1 reply
-
Hello! Have you found a person to help with this one? If not or if you would not mind another set of eyes on this one, I would love to try it out. I come from Linux/Java application security background and my analysis will likely be incomplete, but I might be able to spot something of interest. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you found this link from elsewhere, you can learn about Swarm in the readme here
Swarm recently added early experimental 'friends and family' multi-user system. That is: a system where you can homehost your SwarmUI, and your friends/family can connect and log in to their own separate accounts and share the UI, separately.
The long term goal of this system is to expand to a 'general open' multi-user system, one you could confidently host on the open internet and grant randos account access to.
I'm relatively experienced in cybersecurity, and have a general idea what I'm doing, but as anyone in cybersec would confirm: the first lesson of knowing cybersec is you don't know enough about cybersec to verify a non-trivially-sized system is 'safe'. And the second rule is nothing is truly 'safe', just sometimes the zero-days haven't been found yet.
So, in the interest of at least minimizing the risk of people getting hurt by trying to host Swarm as much as possible, I'm putting out a public call for those with cybersecurity & software dev experience to look over SwarmUI's multi-account system and hosting, to
(A) identify and fix issues before we suggest anything is ready to host for real, and
(B) try to determine robust recommendations for how less-technically-experienced users can share their personal Swarm instance without getting pwned (eg containerization).
If you have relevant experience, please do poke around and comment below.
Swarm does not currently recommend anyone set this up to the actual public, so network security issues do not (currently) need to be kept private. After there are any recommended public setups, I'll replace this notice with direction towards private security issue reporting.
Bear in mind, Swarm is 100% free and open source software. If you'd like a reward for helping with security validation, I'm happy to give you public thanks or link your page or anything, but there's no money involved. I understand that no money isn't awesome, but I don't get paid for this either. Thus the public call for help instead of hiring someone.
All the notes below are a preliminary writeup, there's probably things I'm missing. Please do suggest any you think of.
Testing/Config Notes
The only upfront config that matters is:
AuthorizationRequired
enabled (obviously)User
or lower role access. (Obviously admins can wreak havoc, powerusers can too. I know.)Validation Priority One: Basic Network Connection
The most important initial baseline is: let's say you host a SwarmUI instance publicly, with account systems enabled, and a random external attacker connects with no account knowledge / no login. What can they do?
P1 Areas of Main Concern
AllowLocalhostBypass
: can a user trick Swarm into thinking they're localhost, when they're not? Notably including when using a reasonably-configured nginx/apache reverse proxy setup (which might resemble localhost, Swarm should be able to identify this is not the case from X-Forwarded-For).P1 Known Issues
P1 Non-Concerns
Validation Priority Two: Account Engine
Naturally, the second factor to consider is the account system itself. When logging in / messing with user accounts, what risks are there?
P2 Areas of Main Concern
P2 Known Issues
P2 Non-Concerns
Validation Priority Three: User-Accessibles
Next up: all that stuff a default user account can access. Is it safe?
P3 Areas of Main Concern
embedding:xyz
that does insufficiently secure file access, does Swarm properly forbid writing that without going through whitelisted checks (<embedding:
swarm syntax)? Are there other syntaxes or sus file inputs?)P3 Known Issues
P3 Non-Concerns
Priority Four: Config Recommendations
How does a user set up a sufficiently secure system?
I have a setup guide for Swarm in Docker, is that docker setup sufficiently secure? (Answer: probably not, due to eg the network config in particular.)
we need a dedicated "Set up a secure public instance" guide that configures things like docker networking to more security-maxed setups, so that less-experienced users can host an instance safely.
("Just don't run it if you're not an expert" is a classic response but not helpful here)
Beta Was this translation helpful? Give feedback.
All reactions