-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File Manager Sandboxing #1261
Comments
That is correct, see also #1256, the last 2 comments especially. To quote @netblue30:
If you are really motivated there is a way to work around it: Have one "firejail-launcher" process listening on a socket unsandboxed for incoming requests. Then from within the Sandbox that you want to start, you can configure the opener (xdg-open and variants) using desktop files or using your file manager's file association settings, to instead open the text file using something like: I did something like this, but I haven't used it much since, see here (I have since switched to using whitelist in my profiles, so the features related to updating home-prefixes are outdated and need to be removed, in case you are curious). So this Python script has a daemon command (starts the firejail-launcher outside the sandbox) and a run command, which is used from within the sandbox. To contact the daemon, XMLRPC is used. There's also a whitelist feature, so not every process in a firejail sandbox can launch every other process using the launcher -- however this is still incomplete: there's currently no easy way to create specific whitelists for specific sandboxes. The reason why I haven't actually used it much is, because I don't sandbox my file manager. If I can't trust my file manager, I'd rather be using a different desktop environment, and I reduced potential exploit vectors by disabling file thumbnails completely. Very unlikely that So I feel your concerns are valid, but they can be worked around if you are motivated enough/willing to put up with some work. I still would like if there was something like the launcher idea directly integrated into firejail -- however I'm also not sure if this is the perfect way to do it, just the one I came up with. |
Yes, but shouldn't file managers be removed from firecfg for now to at least prevent this escalation? That was my original point, to simply remove them. |
Oh huh right, I completely missed that. Sorry for going off on a tangent then. Also I agree that firecfg should not create "weak" profile symlinks then. |
Thanks, I removed caja (MATE), nemo (Cinnamon) and thunar (XFCE) from firecfg.config. In my testing on Debian stable, pcmanfm (LXDE) uses a full path and will not pick up the symbolic link in /usr/local/bin - I am still looking into it. Dolphin (KDE) has a different architecture, and will always pick up the symbolic link even when dolphin is sandboxed. This means we can bring in a very restrictive setup for Dolphin. I cannot figure out Gnome. I cannot get even basic functionality like clicking on a pdf file and opening it in a sandbox, regardless what the sandbox profile is. I am on Ubuntu Gnome 17.04, nautilus is there but is not run when the file manager starts. @SpotComms : the two most important lines in a profile file are "seccomp" and "include /etc/firejail/disable-common.inc". I would say they bring in about 80% of all the security possible. In most cases this is better than nothing. @cryzed : we try to stay away for bringing in a new daemons. Such a daemon would be very difficult to secure, more difficult than gedit or some other regular program we try to secure in the first place. I'll keep this open, if you run into problems let me know. |
all set, I have support for LXDE and LXQT. |
Does that not defeat the purpose of Firejail? Any sandboxed program spawned under an already existing sandbox will not have its profile set, correct? So then won't that give programs more permissions then they'd normally have? And at the same time falsely leading users to believe that their apps are sandboxed?
For example gedit has 'net none', but if you open up a txt file from within Thunar, it'll end up with networking access. This issue becomes even worse when you end up spawning an application with a whitelist only profile which then ends up with full access to your files. Demonstration here: https://gist.github.com/SpotComms/55c8372cef381439cd9a90476e175f93
This point was clearly brought up in #1178 so I don't understand how this happened.
The text was updated successfully, but these errors were encountered: