Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upMalware can bypass host's firewall using firejail --net=... #2665
Comments
This comment has been minimized.
This comment has been minimized.
|
This is already supported: uncomment and set
at that point, you're already compromised anyway Off-topic: instead of relying on fragile iptable rules to ensure your routing, consider using Qubes+Whonix or Tails |
This comment has been minimized.
This comment has been minimized.
|
if malware on your system can run arbitrary commands, you've already got a much bigger problem than them getting your real ip address. |
This comment has been minimized.
This comment has been minimized.
I compiled it myself. Thanks for the tip, I'll use the config option.
I don't share your point of view. Thinking in terms of "compromised anyway" it would be OK having passwordless sudo.
Do you use passwordless sudo? |
dandelionred
closed this
Apr 26, 2019
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
There is a big flaw in the comic: you have to have friends for someone to impersonate to. |
This comment has been minimized.
This comment has been minimized.
|
This is why you don't remain logged in and make it easy to revoke authorization for programs that are logged in. For example, I run Unfortunately, I end up remaining logged in to a bunch of chat services (Messenger, Slack, the like), but I can easily kick the computer off of those services should the need arise as well, So yeah, the comic isn't really all that valid. |
This comment has been minimized.
This comment has been minimized.
i see your point - it probably isn't the best example but was the best one i could think of at the time. essentially, what i was trying to say is that a process doesn't necessarily need to have elevated privileges to wreak havoc for a user and cause all kinds of damage - generally speaking, most users have quite a lot of important documents stored in a regular, user-accessible directories. if a process can run arbitrary commands on a system, they can, for example:
from the op:
it's a lot harder to stop malware from doing things once it's in, that's why we take precautions so it can't get in the system in the first place. firejail is essentially an answer to that problem. if a process is isolated using firejail, it wouldn't be able to do the command first mentioned, so i'd argue the problem is moot. |
This comment has been minimized.
This comment has been minimized.
Check this out:
So it is pretty possible to have malware installed by just upgrading some application from pip/npm. After all, I'd like to take back my thoughts about the horrible possibility for malware to leak my ip by means of firejail --net. I'd even say more: it doesn't matter much if your sudo is passwordless or not on a generic xorg desktop (not speaking about qubes). As only malware can run anything under the user, in can either use the passwordless sudo OR keylog with xinput until you enter the password. Some creepy details: https://security.stackexchange.com/a/119420 |
This comment has been minimized.
This comment has been minimized.
|
Back to the stolen laptop story: you're not safe even in case you have the screen locked the stock way. That's why this exists https://github.com/google/xsecurelock |
This comment has been minimized.
This comment has been minimized.
I mean, yeah. Just like it's possible to get malware on Windows by downloading random applications. I really don't see a difference here. As for the other stuff, I'm not quite sure what your point is. Yeah, X11 is insecure - I feel like many people here already know that. We can try to use X11 isolation through And yeah, all those environment variables are both useful and dangerous - one does not preclude the other. I guess, fundamentally, I'm not quite sure what your point is anymore. |
This comment has been minimized.
This comment has been minimized.
|
Regarding the original issue, I still wonder if there could be another way than disabling the networking features altogether. For example, it might be possible to save the current ipfilter configuration into a file before the sandbox process is created, and then always apply this firewall in the new net namespace. This could be made configurable in firejail.config. |
dandelionred commentedApr 25, 2019
Hey guys! I'm slightly :) paranoid mby but still.
Setup:
This way my external traffic either goes into tun0 or goes nowhere in case the openvpn connection dies whatever the reason, so my real external ip is never leaked.
Firejail present on my system opens an attack vector for malware to leak my real ip like this:
(because the newly created network namespace is absolutely independ of the host's network namespace were my firewall rules exist)
Basicly, it doesn't mean how much restrictive the host's firewall is, malware can bypass it if only it can exec firejail (=firejail is present and the user is allowed to use it).
Another point of view: the recommended way to sandbox x11 unintentionally ignores the host's firewall
Btw
--netis not a must to disable the abstract x11 sockets. With this https://tstarling.com/blog/2016/06/x11-security-isolation/ I successfully shut those down in ubuntu 14.04:/etc/lightdm/lightdm.conf.d/50-X-no-listen.conf
Is it possible to disable the "--net" feature at all at compile time?