Orange Arbitrary Command Execution
An internet-exposed Docker API on port 2375 had no authentication, allowing anyone to list and execute commands in running containers. The author obtained a root shell in one container and could access other containers with source code and private data.
Published on omar0x01.medium.com
Hi everybody Omar Hashem is here, I will share with you how I was able to achieve more than 10 RCE in different companies using the same technique in this write-up.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The Docker API was exposed to the public internet without authentication.
Impact
An attacker could execute commands as root inside a container and potentially access other containers containing source code and private company data.
What the attacker needed
Docker API exposed on the internet; No authentication on the Docker API
The fix
The Docker API should not be exposed to the public internet without authentication; it should be restricted to trusted networks or protected with authentication.
How it was found
- Scan the target host to find open ports, including 2375 for Docker.
- Use the Docker client to connect to the remote API and list running containers.
- Use the Docker exec command to run a shell inside a container.
- Obtain a root shell in the container and access other containers' data.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Docker is a tool for running applications in isolated boxes called containers. The Docker engine has an API that lets you control it; if that API is reachable from the internet without a password, anyone can start, stop, or run commands inside those containers. Here the API was open, so the author could run commands as root inside a container.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.