r/Hacking_Tutorials • u/purrMoanz • 2h ago
Question Docker container with mounted socket escape steps for this lab setup?
Working through a local Ubuntu lab with a vulnerable Docker setup. The container runs with the Docker socket mounted at /var/run/docker.sock and I have shell access inside as a non root user. No other obvious misconfigs like privileged mode or extra capabilities visible from 'docker inspect'.
What exact commands or minimal PoC would let me spawn a new container on the host to read /etc/shadow or drop a root shell? Looking for the standard escape technique using only what's already in the container (curl, docker CLI if available). Trying to avoid any external images or tools. Any common gotchas with volume mounts or user namespaces in these labs?