Docker Engine API Pentesting
Enumeration
curl <ip>:2375/containers/json
# The specific container
curl <ip>:2375/containers/<id or name>/json
# Logs
curl <ip>:2375/containers/<id or name>/logs?stderr=1&stdout=1
# Inpsect changes
curl <ip>:2375/containers/<id or name>/changesPrivilege Escalation from Docker Image
1. Check if Docker is Running in Local Machine
sudo systemctl status dockersudo systemctl stop docker
sudo systemctl start docker2. List Remote Docker Images
3. Get a Shell
Remote Code Execution (RCE)
1. Check the Image Name
2. Create/Start a New Container
3. Create a New Exec Instance
4. Start an Exec Instance & Reverse Shell
References
Last updated