Menu

Isolation Is Not Virtualization: Auditing Docker Sockets and Layer Leaks
πŸ“°

Isolation Is Not Virtualization: Auditing Docker Sockets and Layer Leaks

DEV Community: kubernetesΒ·MohamedΒ·14 days ago
#kstG7iFj
#devtokubernetes#devto#dev#host#docker
Long article (312 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Containers give you isolation, not virtualization. Confuse the two and a web-container command injection becomes full host root.

Containers do not provide virtualization. They provide isolation . Treat isolation as a hard security boundary and a low-privilege injection inside a web container can become root on the host .

One of the most battle-tested tools for finding these misconfigs is dockerscan by cr0hn:

https://github.com/cr0hn/dockerscan

Three misconfigurations cause most container breaches.

1. The exposed Docker socket

Teams mount the host socket into a container as a Docker-in-Docker shortcut:

# catastrophic: volumes : - /var/run/docker.sock:/var/run/docker.sock

Enter fullscreen mode

Exit fullscreen mode

Write access to the socket is root on the host β€” no kernel exploit needed:

docker run -v /:/host -it alpine chroot /host

Enter fullscreen mode

Exit fullscreen mode

That mounts the entire host filesystem and drops you into a root shell.

2.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.