Re:EBPFSnitch: An eBPF based Linux Application Firewall
by e12e on Sunday March 14, 2021 @08:03PM
(#26460927)
> `docker run --rm -it -v $PWD/untrustedprogram:/untrustedprogram:ro ubuntu:latest`
Not sure if running a program as root in a container is the best approach to "fully sandbox" - depends on what the goal is, obviously.
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by ghotli on Sunday March 14, 2021 @11:33AM
(#26456206)
This 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.
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by dastx on Sunday March 14, 2021 @12:20PM
(#26456526)
I'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.
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by captn3m0 on Sunday March 14, 2021 @02:15PM
(#26457395)
I have the same as dri (docker run interactive) and dri_cwd so current directory only mounts intentionally (with dri_cwd)
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by nitrogen on Sunday March 14, 2021 @11:57AM
(#26456371)
The overhead of keeping a separate copy of the OS, presumably.
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by spockz on Sunday March 14, 2021 @05:32PM
(#26459470)
Wouldn’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.
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by yjftsjthsd-h on Sunday March 14, 2021 @05:56PM
(#26459720)
Container escape isn't supposed to be that easy these days, but yes there is a tradeoff between security and convenience and performance. I was objecting to the claim of overhead in using a container; if you need more protection than you can get on the same kernel then you'll pay for it in virtualization costs (granted, that's not super high anymore either).
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by thayne on Sunday March 14, 2021 @09:58PM
(#26461785)
That's a lot of overhead if you don't already have docker installed, don't have the the ubuntu image installed, etc.
Re:EBPFSnitch: An eBPF based Linux Application Firewall
by StreamBright on Sunday March 14, 2021 @04:02PM
(#26458465)
So Docker is a zero cost solution now?
What overhead? `docker run --rm -it -v $PWD/untrustedprogram:/untrustedprogram:ro ubuntu:latest`, done. Use x11docker if needed.