by staticassertion · 4y ago · 0 comments
If you put a process into a container, even a fairly default config'd container, it will require an additional vulnerability for an attacker to escape that container. That makes it a security boundary, period. There is no universal "ask to leave the container" by default.
This post is attacking a non-default configuration ie: you have to explicitly pass in "--privileged". Don't do that (the post says this repeatedly).
The fact that people are using docker and we're basically getting a half decent sandbox for free, everywhere, is an incredible security win.
I wouldn't rely on them for multi-tenant workloads, but as a nice way to restrict attackers given RCE, yeah, sure.
Using containers as an extra layer of security is perfectly fine. Using it as an excuse to not do any other security measures is not.
Honestly, that's fine. What more do you want? For developers to roll their own SELinux and Apparmor profiles? For them to manually implement seccomp filtering? No one does that.
The reality is that no one is choosing between "containers or some other approach", they're choosing between "containers or nothing".
Containers can be part of a secure application runtime environment, but much like sugary cereal can be a part of a balanced breakfast, more is required.
Some things may make this harder, like Kubernetes presumably, but idk it seems relatively straightforward and also not exactly the fault of containers.
Maybe, maybe not. It really depends on the environment. If one's orchestration system allows an attacker to supply arbitrary arguments to a runtime, then it's quite possible that a container could be run in privileged mode without explicit authorization.
Good CI hygiene is part of the solution, but again, a comprehensive approach is needed.
The thing that makes `--privileged` an attractive nuisance is that the container runtime usually runs as root, and so it's literally a mechanism for trivial privilege escalation if the agent trusts the request being given to it, and container agents are rarely configured to require authentication of any sort. (The typical default is to run without TCP enabled, and where the Docker socket has some sort of group membership required.) Compare with the traditional UNIX privilege model, in which non-root users don't get privileges, and escalation happens through an agent like sudo(1) which typically requires re-authentication unless you're explicitly adding `NOPASSWD` to the sudoers(5) file.
Everyone I know would agree, yeah. I think the infosec world is probably more or less aligned on this, as much as anything, although that's a low bar and there is no single infosec community.
> what is "alienating"
Decades of Linus and Greg insulting or attacking security researchers in various ways. It's become pretty antagonistic on both sides I think.
> As for "written in C", what production-grade kernels aren't written in C?
None afaik. It just all jumbles together to paint the 'garbage' picture.