container escape
An attack where code inside a container breaks out and gains control of the host.
A successful escape gives the attacker the host and every container on it.
In more detail
Escapes use kernel flaws, dangerous settings such as --privileged or a mounted Docker socket, or bugs in the runtime. Because containers share the host kernel, one escape exposes every container on that host. Defences are layered: patching, non-root users, dropped capabilities, seccomp and, for untrusted code, a virtual machine boundary.
Related terms
- kernel exploit — An attack that abuses a bug in the kernel to gain powers the attacker should not have.
- privileged container — A container started with --privileged, which removes almost all isolation and gives it the powers of root on the host.
- Docker socket — The file-like connection point, usually /var/run/docker.sock, through which programs send commands to the Docker daemon.
- isolation — Keeping programs apart so one cannot see or interfere with another.
- virtual machine — A complete pretend computer, with its own operating system, running as software on a real computer.
- non-root user — An ordinary user account with limited rights, which a container should run its service as.
- container — A running program that has been fenced off from the rest of the computer so it only sees its own files, network and processes.
Taught in
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering