6 ms·
This looks spectacular! Finally! This is functionality I've desperately wanted on Linux desktop. Link that up with with some of the SELinux on-demand tools and
by XorNot 6y ago
This looks spectacular! Finally! This is functionality I've desperately wanted on Linux desktop. Link that up with with some of the SELinux on-demand tools and you have a plausible way to run untrusted binaries without the overhead of completely containerizing them up front.
- arsome 6y agoBe careful with that one, this isn't as capable as the HIDS solutions available on Windows - it's not going to do things like detect exfiltration using other executables or modification of other files on your system. For example, if you allowed curl or Firefox, another executable can simply call one of them and send/receive whatever data they need to. It also can't do things like filter ptrace calls which could easily be used to modify another process to perform exfiltration or just spawn another thread and inject a whole new dynamic library to them, a common practice to bypass detection on Windows.
- throw2737 6y agoWindows app firewalls had similar problems, most common was to use explorer.exe
- code-scope 6y agoJust block explorer.exe with windows firewall - if really needed just enable out going access for internal subnet only. There is not need for explorer to access internet! I only allow windows defender, firefox and chrome to access internet in my home computer setup all other apps are blocked unless truly needed. If you block svchost.exe from internet access with windows firewall, it will block the windows update. Enable it once in a while to allow the windows update to go thru when you feel the need.
- simias 6y agoHow does Windows prevent this type of bypass? It seems extremely hard to prevent in an unsandboxed environment.
- _0ffh 6y agoI guess one might try to check the path through the process tree to see if a blacklisted application is the parent (or gp, ggp, etc.) of the process trying to communicate with the outside world.
- simias 6y agoI considered that but IIRC browsers like firefox will accept to load an URL without creating a new child process. For instance if I type "firefox 'http://google.com http://google.com'" in my terminal my already-running firefox instance loads the URL in a new tab, so I assume that some kind of IPC is used behind the scenes to ask the main instance to load the URL. Of course that's harder to exploit nefariously than spawning wget from the same process but when there's a will there's a way...
- xnyan 6y agoI'm not sure what they are talking about, but windows comes with a built-in sandbox now. Adds a little bit of overhead, but besides that works very well.
- arsome 6y agoWindows itself does not, 3rd party firewall/HIDS software (ZoneAlarm, Outpost, etc) for Windows has done this by intercepting APIs to do things like call executables with internet access, OpenProcess calls, raw disk IO, registry writes to startup entries, etc.
- t0astbread 6y agoWhat do you mean by "SELinux on-demand tools"?
- the8472 6y agofirejail?
- spyc 6y agoI don't see any port-based firewalling options in the firejail documentation from a quick look. So I'm not sure if firejail helps the same use case as EBPFSnitch.
- the8472 6y agoIt can isolate applications into separate network namespace (i.e. no access to host services) with or without internet access and also load separate netfilter rules. No convenience arguments for port filtering though.
- grantseltzer 6y agoWhat overhead are you worried about?
- yjftsjthsd-h 6y agowithout the overhead of completely containerizing them up front. What overhead? `docker run --rm -it -v $PWD/untrustedprogram:/untrustedprogram:ro ubuntu:latest`, done. Use x11docker if needed.
- ghotli 6y agoThis isn't upvoted enough. I use that trick verbatim to just wrap a container's execution environment around my $PWD. It's useful way beyond just isolating a program.
- dastx 6y agoI've used `alias shit='docker run --rm -it --entrypoint /bin/sh -v $PWD:/workdir -w /workdir'` for a long time. This way, whenever I need, I can just run `shit alpine` or `shit ubuntu` or whatever.
- captn3m0 6y agoI have the same as dri (docker run interactive) and dri_cwd so current directory only mounts intentionally (with dri_cwd)
- nitrogen 6y agoThe overhead of keeping a separate copy of the OS, presumably.
- StreamBright 6y agoSo Docker is a zero cost solution now?
- spockz 6y agoWouldn’t you need something like gvisor and or running under a different user or podman to make this really safe? If you don’t trust the binary they can still just break out the container.
- 6y ago
- 29athrowaway 6y agoI think AppArmor would be a better use-case for that. With it you can write a security profile containing a rule like: network tcp src 192.168.1.1:80 dst 170.1.1.0:80 Networking access is just the start, you can restrict many other stuff, like access to dbus, files, signals, etc.