AI-Powered Web Application Penetration Testing Tool
Automated security testing with intelligent decision-making
Features β’ Installation β’ Usage β’ Documentation
HackTheWeb is a production-ready, AI-powered web application penetration testing tool designed for security professionals and ethical hackers. It uses rule-based artificial intelligence (no external ML models required) to intelligently scan web applications for vulnerabilities, adapt scanning strategies, and generate comprehensive security reports.
- π€ AI-Powered: Intelligent scanning with adaptive algorithms
- π Production-Ready: Fully functional and battle-tested
- π§ No ML Models: Pure rule-based AI - no external dependencies
- π§ Linux Optimized: Works on Kali, Ubuntu, Debian, and all security-focused distros
- π Comprehensive Reporting: HTML, PDF, JSON, and Markdown reports
- β‘ Fast & Efficient: Asynchronous scanning with rate limiting
- π¨ Beautiful CLI: Rich terminal interface with real-time progress
- XSS (Cross-Site Scripting) - Reflected, Stored, and DOM-based β
- SQL Injection - Error-based, Boolean-based, Time-based, UNION-based β
- CSRF (Cross-Site Request Forgery) - Token validation and cookie analysis β
- SSRF (Server-Side Request Forgery) - Internal network probing β
- LFI/RFI (File Inclusion) - Local and remote file inclusion β
- XXE (XML External Entity) - XML injection attacks β
- Security Headers - Validates HTTP security headers (HSTS, CSP, etc.) β
- RCE (Remote Code Execution) - Command injection and code execution β
- IDOR (Insecure Direct Object Reference) - Access control issues β
- Open Redirect - URL redirection vulnerabilities β
- CORS Misconfiguration - Cross-origin resource sharing issues β
- Path Traversal - Directory traversal detection β
- NoSQL Injection - MongoDB and NoSQL database attacks β
- LDAP Injection - LDAP query injection β
- SSTI - Server-Side Template Injection β
- Smart Target Analysis - Technology stack detection
- Adaptive Scanning - Prioritizes high-impact vulnerabilities
- Pattern Recognition - Learns from scan results
- Resource Optimization - Efficient payload selection
- Context-Aware Testing - Technology-specific vulnerability checks
- Multiple Formats - HTML, PDF, JSON, Markdown
- Severity Classification - Critical, High, Medium, Low, Info
- OWASP & CWE Mapping - Industry-standard categorization
- Remediation Guidance - Actionable fix recommendations
- Beautiful Visualizations - Charts and statistics
- Python 3.8 or higher
- pip (Python package manager)
- Linux-based OS (Kali Linux, Ubuntu, Debian, etc.)
# Clone the repository
git clone https://github.com/yashab-cyber/hacktheweb.git
cd hacktheweb
# Run installation script
chmod +x scripts/install.sh
./scripts/install.sh# Install system dependencies (Debian/Ubuntu/Kali)
sudo apt-get update
sudo apt-get install python3-pip python3-venv python3-dev build-essential \
libssl-dev libffi-dev libxml2-dev libxslt1-dev nmap
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
# Install HackTheWeb
pip install -e .
# Initialize configuration
hacktheweb init-configdocker pull hacktheweb/hacktheweb:latest
docker run -it hacktheweb/hacktheweb scan https://example.com# Simple scan
hacktheweb scan https://example.com
# Scan with HTML report
hacktheweb scan https://example.com --format html# Thorough scan with custom threads
hacktheweb scan https://example.com --scan-mode thorough --threads 20
# Specific vulnerability tests
hacktheweb scan https://example.com --techniques xss sqli csrf
# Custom configuration
hacktheweb scan https://example.com --config custom_config.yaml
# Multiple output formats
hacktheweb scan https://example.com --format pdf --output ./reports# List all available techniques
hacktheweb list-techniques
# View a report
hacktheweb view-report reports/report_20231025_143022.json
# Initialize default config
hacktheweb init-config --output config/myconfig.yaml
# Launch web dashboard (coming soon)
hacktheweb webimport asyncio
from hacktheweb.core.config import Config
from hacktheweb.core.ai_engine import AIEngine
from hacktheweb.core.scanner import Scanner
from hacktheweb.reporting.report_generator import ReportGenerator
# Initialize components
config = Config()
ai_engine = AIEngine(config)
scanner = Scanner(config, ai_engine)
# Run scan
results = asyncio.run(scanner.scan('https://example.com'))
# Generate report
report_gen = ReportGenerator(config)
report_path = report_gen.generate(results, format='html')
print(f"Report generated: {report_path}")HackTheWeb uses YAML configuration files. Generate a default config:
hacktheweb init-config --output config/myconfig.yamlSample Configuration:
general:
threads: 10
timeout: 30
delay: 0
verify_ssl: false
scanning:
max_depth: 3
scan_mode: smart # fast, smart, thorough
techniques:
- xss
- sqli
- csrf
- ssrf
ai:
learning_enabled: true
confidence_threshold: 0.7
adaptive_scanning: true
reporting:
format: html
include_payloads: true
rate_limiting:
enabled: true
requests_per_second: 10- Fast: Quick scan with minimal payloads
- Smart (Default): AI-optimized scanning strategy
- Thorough: Comprehensive scan with all techniques
- HTML: Interactive web-based report with styling
- PDF: Professional PDF document
- JSON: Machine-readable format for automation
- Markdown: Text-based report for documentation
- β DO: Get written permission before testing
- β DO: Use on your own systems or with explicit authorization
- β DO: Follow responsible disclosure practices
- β DON'T: Test systems without permission
- β DON'T: Use for illegal activities
- β DON'T: Cause damage or disruption
By using HackTheWeb, you agree to use it responsibly and ethically.
- Always obtain written authorization
- Respect scope limitations
- Handle sensitive data carefully
- Report findings responsibly
- Follow local laws and regulations
HackTheWeb comes with comprehensive payload databases and wordlists in the data/ directory:
- XSS Payloads - 28+ injection vectors (basic, encoded, polyglot, DOM-based)
- SQLi Payloads - 42+ SQL injection patterns (MySQL, PostgreSQL, MSSQL)
- Sensitive Files - 40+ Linux/Windows file paths for LFI/Path Traversal
- Common Endpoints - 30+ API endpoints and admin panels
- User Agents - 8 modern browser user-agent strings
- Usernames/Passwords - Common credentials for authentication testing
- File Extensions - 35+ extensions for file inclusion testing
- Technology Fingerprints - 40+ patterns for technology detection
Add your own payloads by editing files in the data/ directory:
# Add custom XSS payload
echo '<custom>payload</custom>' >> data/xss_payloads.txt
# Add organization-specific file path
echo '/var/www/myapp/config.php' >> data/sensitive_files_linux.txtScanners automatically load payloads from these files, giving you 500+ payloads out of the box!
π Learn More: See DATA_INTEGRATION_COMPLETE.md
hacktheweb/
βββ core/ # Core engine and AI logic
β βββ ai_engine.py # Rule-based AI engine
β βββ scanner.py # Main scanning orchestrator
β βββ config.py # Configuration management
βββ scanners/ # Vulnerability scanners (15 total)
β βββ xss_scanner.py
β βββ sqli_scanner.py
β βββ csrf_scanner.py
β βββ ssrf_scanner.py
β βββ lfi_scanner.py
β βββ rce_scanner.py
β βββ idor_scanner.py
β βββ ... # 8 more scanners
βββ utils/ # Utility modules
β βββ data_loader.py # Loads payloads from data/
βββ data/ # Payload databases & wordlists β¨ NEW
β βββ xss_payloads.txt
β βββ sqli_payloads.txt
β βββ sensitive_files_linux.txt
β βββ sensitive_files_windows.txt
β βββ ... # More data files
βββ recon/ # Reconnaissance modules
βββ exploits/ # Exploit framework
βββ reporting/ # Report generators
β βββ report_generator.py
βββ web/ # Web dashboard (coming soon)
βββ cli.py # Command-line interface
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone and install in development mode
git clone https://github.com/yashab-cyber/hacktheweb.git
cd hacktheweb
pip install -e ".[dev]"
# Run tests
pytest tests/
# Check code quality
flake8 hacktheweb/
black hacktheweb/- Core AI engine
- Basic vulnerability scanners
- Report generation
- CLI interface
- Web dashboard
- API server
- Plugin system
- Custom payload editor
- Collaboration features
- CI/CD integration
- Browser automation
- Mobile app testing
This project is licensed under the MIT License - see the LICENSE file for details.
YashAB Cyber Security
- GitHub: @yashab-cyber
- Website: hacktheweb.io
- Inspired by industry-leading security tools
- Built with modern Python best practices
- Community-driven development
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@hacktheweb.io
Made with β€οΈ by security professionals, for security professionals
β Star this repository if you find it useful!