Hertz: Abusing privileged and unprivileged Linux containers
A common configuration for companies offering PaaS solutions built on containers is to have multiple customers’ containers running on the same physical host. By default, both LXC and Docker setup container networking so that all containers share the same Linux virtual bridge. These containers will be able to communicate with each other. Even if this direct network access is disabled (using the –icc=false flag for Docker, or using iptables rules for LXC), containers aren’t restricted for link-layer traffic. In particular, it is possible (and in fact quite easy) to conduct an ARP spoofing attack on another container within the same host system, allowing full middle-person attacks of the targeted container’s traffic."
Posted Jun 2, 2016 7:28 UTC (Thu)
by corsac (subscriber, #49696)
[Link] (7 responses)
Posted Jun 2, 2016 8:44 UTC (Thu)
by spender (guest, #23067)
[Link] (2 responses)
I do note a potential error/misstatement in the text, it mentions that ptrace is disabled in the containers simply by removing CAP_SYS_PTRACE, but the two are orthogonal. CAP_SYS_PTRACE is for permitting the ptracing of processes outside of what could be performed by an unprivileged user, it's obviously not a control over using ptrace at all otherwise ptrace would be a purely privileged operation. Presumably the real fix being used is a blacklist via seccomp.
-Brad
Posted Jun 2, 2016 17:10 UTC (Thu)
by jejb (subscriber, #6654)
[Link]
I suppose there's some vague value in a paper identifying common misconfigurations, but realistically in a complex interface like this, there's always going to be ways of misusing it. Perhaps we should start classifying APIs on the Rusty type scale starting with "impossible to use securely".
Posted Jun 4, 2016 5:22 UTC (Sat)
by khz (guest, #109129)
[Link]
will be incorporating the SYS_PTRACE correction (as well as another minor one someone else pointed out) next week
Posted Jun 2, 2016 14:15 UTC (Thu)
by jwildebo (guest, #38479)
[Link] (2 responses)
Jan (disclaimer: Red Hat's EMEA Evangelist)
Posted Jun 3, 2016 6:07 UTC (Fri)
by drag (guest, #31333)
[Link]
Posted Jun 4, 2016 5:27 UTC (Sat)
by khz (guest, #109129)
[Link]
if you know of anyone using RHES / SELinux based containers, feel free to send em my way. I know me and aaron would love to audit them :)
Posted Jun 3, 2016 16:09 UTC (Fri)
by dyn (guest, #103684)
[Link]
Hertz: Abusing privileged and unprivileged Linux containers
Hertz: Abusing privileged and unprivileged Linux containers
Hertz: Abusing privileged and unprivileged Linux containers
Hertz: Abusing privileged and unprivileged Linux containers
Hertz: Abusing privileged and unprivileged Linux containers
Hertz: Abusing privileged and unprivileged Linux containers
Hertz: Abusing privileged and unprivileged Linux containers
Good point! Jesse Hertz (Author) is a co-worker of mine at NCC Group, and (I believe) the paper was focused on exploring several different attacks against LXC (and some indirectly related to Docker) and the related configuration weaknesses/defaults. Jesse and I have talked about (and are big fans of) grsecurity in general and to many clients for container hosts/Linux, but the paper doesn't explore this avenue of hardening. I however did discuss this in my Understanding and Hardening Linux Containers white paper, released a bit earlier this year* that is more comprehensive on recommendations and more holistic in nature for LXC, Docker and Rkt ( which Jesse reviewed). *Spender also had some constructive comments/notes I'm finally merging in next week, along with a few more minor tweaks/updates.
Hertz: Abusing privileged and unprivileged Linux containers