A comprehensive Docker-based penetration testing lab featuring vulnerable web applications, network services, and multiple exploitation paths across public and internal networks.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PUBLIC NETWORK β
β (172.20.0.0/24) β
β β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β Web Server β β FTP Server β β
β β Port: 8080 β β Port: 2121 β β
β β - PHP App β β - Anonymous β β
β β - 10+ Vulns β β - Sensitive β β
β β - 3 RCE paths β β Files β β
β β - Chisel β β β β
β β - Nmap β β β β
β ββββββββββ¬ββββββββββ ββββββββββββββββββββ β
β β β
βββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββ
β PIVOT REQUIRED
β
βββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββ
β β INTERNAL NETWORK β
β β (10.10.10.0/24) β
β β β
β ββββββββββΌββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Internal-1 β β Internal-2 β β Internal-3 β β
β β 10.10.10.2 β β 10.10.10.3 β β 10.10.10.4 β β
β β - Web (80) β β - Web (80) β β - Web (80) β β
β β - SSH (22) β β - SMB (445) β β - Tomcat β β
β β - SSH Key β β - Weak Auth β β (8080) β β
β β Exposed β β β β - MySQL β β
β β β β β β - ProFTPD β β
β ββββββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Docker Engine 20.10+
- Docker Compose 1.29+
- At least 4GB RAM
- 10GB free disk space
cd /Users/user/Desktop/TechFlowdocker-compose up -ddocker-compose psYou should see all 6 containers running:
pentest-db- MySQL databasepentest-web- Main vulnerable web serverpentest-ftp- FTP serverinternal-web-ssh- Internal server 1internal-smb-web- Internal server 2internal-multi-service- Internal server 3
Public Web Server: http://localhost:8080
FTP Server: ftp localhost 2121 (anonymous access)
- Enumerate public services
- Identify vulnerabilities in the web application
- Gain initial access to the web server
- Exploit web vulnerabilities for RCE
- Extract sensitive information from FTP
- Establish persistence
- Use chisel or SSH tunneling to access internal network
- Scan internal network from compromised web server
- Map internal services
- Extract SSH key from internal-server-1
- Exploit SMB vulnerabilities on internal-server-2
- Exploit CVEs on internal-server-3
- Achieve root access on all internal servers
| Vulnerability | Severity | Location | RCE |
|---|---|---|---|
| SQL Injection | Critical | Login, Search | β |
| Command Injection | Critical | Admin Panel | β RCE #1 |
| File Upload | Critical | Upload Page | β RCE #2 |
| LFI to RCE | Critical | File Viewer | β RCE #3 |
| Stored XSS | High | Comments | β |
| Reflected XSS | Medium | Search | β |
| IDOR | High | Profile View | β |
| Auth Bypass | Critical | SQL Injection | β |
| SSRF | High | Admin Panel | β |
| Weak Passwords | Medium | MD5 Hashing | β |
| Session Issues | Medium | Various | β |
- Anonymous access enabled
- Sensitive files exposed
- Network information leaked
- SSH private key exposed in web application
- Root access via SSH key
- Network information disclosure
- SMB shares with weak authentication
- Null session enumeration
- Sensitive data in shares
- Tomcat 8.5.50 - CVE-2020-1938 (Ghostcat)
- ProFTPD 1.3.5 - CVE-2015-3306
- MySQL - Weak root password (toor)
- Tomcat Manager - Default credentials (admin:tomcat)
Access the web server container:
docker exec -it pentest-web /bin/bashAvailable tools:
- chisel - Tunneling tool (
/usr/local/bin/chisel) - nmap - Network scanner
- ip - Network configuration
- netcat - Network utility
- curl/wget - HTTP clients
- python3 - Python interpreter for scripting and reverse shells
docker-compose up -ddocker-compose downdocker-compose down -v
docker-compose up -ddocker-compose logs -f [service-name]docker exec -it [container-name] /bin/bashdocker exec -it pentest-web nmap -sn 10.10.10.0/24- Web Server: 172.20.0.x
- FTP Server: 172.20.0.x
- Database: 172.20.0.x
- Internal Server 1: 10.10.10.2
- Internal Server 2: 10.10.10.3
- Internal Server 3: 10.10.10.4
- SQL injection in login form
- File upload vulnerability
- FTP enumeration
- Basic network scanning
- Command injection
- LFI to RCE via log poisoning
- Chisel tunneling
- SSH key extraction
- SMB enumeration
- SSRF exploitation
- Multi-hop pivoting
- CVE exploitation (Ghostcat, ProFTPD)
- Custom exploit development
- Full network compromise
CRITICAL: This lab contains intentionally vulnerable services.
- NEVER expose these containers to the internet
- ONLY run in isolated lab environments
- DO NOT use on production networks
- ALWAYS run behind a firewall
- FOR EDUCATIONAL PURPOSES ONLY
docker-compose down
docker-compose up -d --force-recreatedocker-compose restart db
docker-compose restart web-serverEdit docker-compose.yml and change the host ports:
ports:
- "8080:80" # Change 8080 to another portMake sure you've compromised the web server first and are using it as a pivot point.
If you get "Permission denied" errors when uploading files:
- Ensure you used
./start-lab.shwhich pre-configures permissions. - Manually set permissions on the host:
mkdir -p web-server/www/uploads chmod 777 web-server/www/uploads
- Restart the containers:
docker-compose restart web-server
For progressive hints without spoilers, see HINTS.md
Throughout the lab, you'll find flags in the format: FLAG{description}
Collect all flags to complete the lab!
This lab is provided for educational purposes only. Use responsibly.
Found a bug or want to add more vulnerabilities? Feel free to contribute!
Happy Hacking! π