← Learn
Dangerous
docker run -v /var/run/docker.sock:/var/run/docker.sock -it alpine

cross-platform · bash · Advanced

Mounts the Docker control socket inside a container. Anything that can talk to that socket can start a new privileged container mounting the host filesystem, so this hands over root on the host without ever using the word privileged.

Signals to notice

  • Docker socket exposed inside a container
  • Equivalent to root on the host
  • No privileged flag to give it away

Think you can spot these under time pressure?

Start Training

More Containers