Welcome to the OWASP Top 10 CTF Challenge! This is a comprehensive Capture The Flag (CTF) environment designed for software security workshops and educational purposes.
This CTF environment contains multiple vulnerable web applications that demonstrate the OWASP Top 10 vulnerabilities. Each application focuses on specific vulnerability types and provides hands-on experience with common web security issues.
The environment consists of:
- 4 Vulnerable Web Applications
- 2 Database Services (MySQL, PostgreSQL)
- 1 Internal Flag Server
- 1 Nginx Reverse Proxy
- Docker and Docker Compose installed
- At least 2GB of available RAM
- Basic knowledge of web application security
- Clone this repository:
git clone <repository-url>
cd ctf-2025
- Start the environment:
docker-compose up -d
-
Wait for all services to be ready (about 2-3 minutes)
-
Access the applications:
http://localhost - Main dashboard
http://localhost/injection/ - SQL/Command injection
http://localhost/access/ - Access control vulnerabilities
http://localhost/crypto/ - Cryptographic failures
http://localhost/ssrf/ - SSRF and misconfigurations
docker-compose down
OWASP A03: Injection
- Port: 5001 (via
/injection/
) - Database: MySQL
- Vulnerabilities:
- SQL Injection (Login bypass, Data extraction)
- Command Injection (Network tools)
OWASP A01: Broken Access Control
- Port: 5003 (via
/access/
) - Database: PostgreSQL
- Vulnerabilities:
- Missing Function Level Access Control (Admin panel access)
- Directory Traversal (File access)
- Insecure API Endpoints
Test Accounts:
employee1 / password123
employee2 / qwerty456
OWASP A02: Cryptographic Failures
- Port: 5004 (via
/crypto/
) - Vulnerabilities:
- Weak Hashing Algorithms (MD5)
- Predictable Random Number Generation
OWASP A05: Security Misconfiguration & A10: Server-Side Request Forgery
- Port: 5005 (via
/ssrf/
) - Vulnerabilities:
- Server-Side Request Forgery (SSRF)
- Internal Service Access
-
SQL Injection:
admin' OR '1'='1' -- admin' --
-
Command Injection:
127.0.0.1; cat /proc/version 127.0.0.1 && env
-
Path Traversal:
../secrets/flag.txt ../../etc/passwd
-
SSRF Payloads:
http://flag-server:8080/flags http://flag-server:8080/admin
-
MD5 Hash Cracking:
# Use external tools like hashcat or online crackers # The admin password is a common word + 1-3 digits hashcat -m 0 -a 3 <hash> ?l?l?l?l?l?l?l?d?d?d
- Access Control Bypass: Admin panel is accessible without proper role checking
- Path Traversal: File viewer accepts
?file=
parameter vulnerable to directory traversal - Rate Limiting: Crypto app has rate limiting on hash attempts - use external tools
- Random Prediction: Random numbers are seeded with time rounded to 30-second intervals
- Internal Network: Flag server only accessible from internal Docker network
This CTF environment covers the following OWASP Top 10 categories:
- A01 - Broken Access Control ✅ (Access app)
- A02 - Cryptographic Failures ✅ (Crypto app)
- A03 - Injection ✅ (Injection app)
- A04 - Insecure Design ⚪ (Internal flag server)
- A05 - Security Misconfiguration ✅ (SSRF app)
- A06 - Vulnerable and Outdated Components ⚪ (Internal flag server)
- A07 - Identification and Authentication Failures ❌ (Not implemented)
- A08 - Software and Data Integrity Failures ⚪ (Internal flag server)
- A09 - Security Logging and Monitoring Failures ⚪ (Internal flag server)
- A10 - Server-Side Request Forgery (SSRF) ✅ (SSRF app)
- DO NOT deploy this in production environments
- DO NOT use these applications as templates for real projects
- ONLY use in isolated, controlled environments
- ENSURE proper network isolation when running
-
Services not starting:
docker-compose logs <service-name>
-
Port conflicts:
- Check if port 80 is available (main access point)
- Internal application ports (5001, 5003-5005, 8080) should not conflict as they're containerized
- Modify
docker-compose.yml
if needed
-
Database connection issues:
- Wait for databases to fully initialize (2-3 minutes)
- Check database logs:
docker-compose logs mysql postgres
-
Permission issues:
sudo chown -R $USER:$USER .
To completely reset all data:
docker-compose down -v
docker-compose up -d
This CTF environment is designed for educational purposes. If you find issues or want to contribute:
- Create detailed bug reports
- Suggest new vulnerability scenarios
- Improve documentation
- Add new challenge categories
This project is licensed under the MIT License - see the LICENSE file for details.
Happy Hacking! 🏴☠️
Remember: The goal is to learn and understand these vulnerabilities so you can better defend against them in real applications.