A comprehensive, ethical security testing lab demonstrating web application security testing, vulnerability scanning, and automated reporting.
FOR EDUCATIONAL PURPOSES ONLY
This project is designed for learning cybersecurity concepts in a controlled, local environment. Only test applications you own or have explicit permission to test. Unauthorized security testing is illegal.
This portfolio project demonstrates:
- Web application security fundamentals
- Ethical hacking workflows
- Automated vulnerability scanning
- Professional security reporting
- Python security tooling
- Python 3.8+
- pip
- (Optional) Docker & Docker Compose
# Clone the repository
git clone https://github.com/rawhun/security-testing-lab.git
cd security-testing-lab
# Install dependencies
pip install -r requirements.txt
# Run the vulnerable app (Terminal 1)
python app/vuln_flask.py
# Run all scanners (Terminal 2)
bash scripts/run_all.shsecurity-testing-lab/
βββ app/ # Vulnerable demo application
β βββ vuln_flask.py # Flask app with intentional vulnerabilities
βββ scanners/ # Security testing modules
β βββ recon.py # Reconnaissance scanner
β βββ header_check.py # Security header analyzer
β βββ dir_enum.py # Directory enumeration
β βββ sqli_check.py # SQL injection tester
βββ reports/ # Report generation
β βββ generate_report.py
βββ scripts/ # Automation scripts
β βββ run_all.sh
βββ docker-compose.yml # Optional Docker setup
- Intentionally vulnerable login system
- SQL injection demonstration
- Missing security headers
- Local-only access
- Recon Scanner: HTTP headers, server info, page titles
- Header Checker: CSP, HSTS, X-Frame-Options analysis
- Directory Enumerator: Common path discovery
- SQLi Checker: Boolean-based SQL injection detection
- Markdown report generation
- Vulnerability severity ratings
- Remediation recommendations
- OWASP Juice Shop
- OWASP ZAP proxy
- Pre-configured vulnerable targets
# Reconnaissance
python scanners/recon.py http://localhost:5000
# Header analysis
python scanners/header_check.py http://localhost:5000
# Directory enumeration
python scanners/dir_enum.py http://localhost:5000
# SQL injection testing
python scanners/sqli_check.py http://localhost:5000/loginpython reports/generate_report.py http://localhost:5000# Start vulnerable applications
docker-compose up -d
# Test against Juice Shop
python scanners/recon.py http://localhost:3000This project teaches:
- OWASP Top 10 vulnerabilities
- HTTP security headers
- SQL injection mechanics
- Ethical hacking methodology
- Security automation with Python
- Professional security reporting
- SQL Injection: Understanding and detecting database attacks
- Security Headers: CSP, HSTS, X-Frame-Options, X-Content-Type-Options
- Information Disclosure: Server fingerprinting and reconnaissance
- Directory Traversal: Path enumeration techniques
- Secure Development: Learning from vulnerable code
[+] Security Scan Report
[+] Target: http://localhost:5000
[+] Timestamp: 2024-02-11 10:30:45
[!] CRITICAL: SQL Injection vulnerability detected
[!] HIGH: Missing Content-Security-Policy header
[!] MEDIUM: Missing X-Frame-Options header
[+] Found 3 accessible directories
- Create scanner in
scanners/directory - Follow the template pattern
- Import in
generate_report.py - Update documentation
Add new vulnerabilities to app/vuln_flask.py for testing:
- XSS (Cross-Site Scripting)
- CSRF (Cross-Site Request Forgery)
- Authentication bypass
- File upload vulnerabilities
This project demonstrates:
- β Python programming proficiency
- β Cybersecurity knowledge
- β Ethical hacking skills
- β Automation and scripting
- β Technical documentation
- β Professional development practices
See SHOWCASE.md for interview talking points.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new scanners
- Submit a pull request
MIT License - See LICENSE file
This tool is for:
- β Learning security concepts
- β Testing your own applications
- β Authorized penetration testing
- β Security research in controlled environments
Never use for:
- β Unauthorized testing
- β Malicious purposes
- β Illegal activities
- OWASP Foundation
- Flask Security Community
- Python Security Tools Developers
Remember: With great power comes great responsibility. Use these tools ethically.