A comprehensive, autonomous penetration testing framework designed for security research and authorized testing environments.
This tool is for authorized penetration testing and security research only!
- Ensure you have explicit written permission before scanning any network
- Only use on systems you own or have explicit authorization to test
- Unauthorized access to computer systems is illegal
- Users are responsible for complying with all applicable laws and regulations
- Network Discovery: Intelligent IP range scanning with CIDR block parsing
- High-Speed Port Scanning: Masscan integration for rapid port discovery
- Service Enumeration: Detailed service detection and OS fingerprinting with Nmap
- Vulnerability Intelligence: Real-time CVE database queries and threat correlation
- Exploit Matching: Automatic exploit-to-service correlation and prioritization
- Multi-threaded Processing: Parallel scanning for maximum efficiency
- Comprehensive Reporting: Multiple output formats with detailed analysis
- Python 3.8+
- Linux/macOS (Windows support limited)
- Root/Administrator privileges for some features
masscan
- High-speed port scannernmap
- Network exploration and security auditingradare2
- Reverse engineering framework- Optional:
tor
for onion routing
# 1. Clone repository
git clone https://github.com/skizap/advanced-pentest-framework.git
cd advanced-pentest-framework
# 2. Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
# 3. Install Python dependencies
pip install -r requirements.txt
# 4. Install system dependencies
# Ubuntu/Debian:
sudo apt update && sudo apt install masscan nmap
# macOS:
brew install masscan nmap
# 5. Setup framework
mkdir -p logs data/wordlists
chmod +x main.py
# 6. Verify installation
python main.py --help
For comprehensive installation instructions including troubleshooting, see: π Installation Guide
# Basic network scan
python main.py 192.168.1.0/24
# Fast discovery scan
python main.py --mode scan --scan-type fast 192.168.1.0/24
# Verbose output for debugging
python main.py --verbose 192.168.1.100
python main.py [OPTIONS] TARGETS...
Required:
TARGETS Target IPs or CIDR blocks
Options:
--mode {scan,intelligence,exploit,persistence,full}
Operation mode (default: full)
--scan-type {fast,full,stealth}
Scan type (default: full)
--config FILE Configuration file path
--output FILE Output file for results
--verbose, -v Enable verbose logging
--help, -h Show help message
Mode | Description |
---|---|
scan |
Network discovery and service enumeration only |
intelligence |
Vulnerability research and correlation |
exploit |
Automated exploitation attempts |
persistence |
Establish persistence on compromised hosts |
full |
Complete exploitation chain (default) |
For detailed usage examples, configuration options, and advanced features: π User Guide
advanced-pentest-framework/
βββ main.py # Main entry point
βββ requirements.txt # Python dependencies
βββ setup.py # Installation script
βββ config/
β βββ config.yaml # Framework configuration
βββ src/
β βββ core/ # Core framework components
β βββ scanner/ # Network scanning modules
β βββ intelligence/ # Vulnerability intelligence
β βββ exploits/ # Exploitation modules
β βββ persistence/ # Persistence mechanisms
β βββ utils/ # Utility functions
βββ tests/ # Unit tests
βββ data/ # Data storage
βββ logs/ # Log files
βββ docs/ # Documentation
The framework uses YAML configuration files for customization:
# Basic configuration example
scanning:
masscan:
rate: 10000 # Packets per second
timeout: 30 # Scan timeout
nmap:
timing: 4 # Timing template (0-5)
database:
type: "sqlite" # Database type
sqlite:
path: "data/pentest.db" # Database file path
threading:
max_workers: 50 # Maximum concurrent threads
config/config.yaml
- Main configuration fileconfig/config.yaml.local
- Local customizations (recommended)
For complete configuration reference and examples: π Configuration Guide
# Run unit tests
python -m pytest tests/
# Test with coverage
python -m pytest --cov=src tests/
# Test CLI functionality
python main.py --help
python main.py --mode intelligence 127.0.0.1
masscan
and nmap
for full functionality
- Console: Real-time progress with colored output and progress indicators
- Logs: Detailed execution logs in
logs/framework.log
- Database: Structured data storage in SQLite/PostgreSQL
- Reports: JSON/XML/HTML reports (configurable)
π― Penetration Testing Framework Demo
==================================================
1. ποΈ Database System
β
Database initialized (SQLite)
2. π Creating Penetration Test Session
β
Created scan session: 'Corporate Network Assessment'
3. π Network Discovery Results
β
Discovered: 192.168.1.10 (web-server.corp.local) - Linux
β
Discovered: 192.168.1.20 (db-server.corp.local) - Linux
4. π Summary
π Hosts Discovered: 4
π Open Ports: 11
π Services Identified: 8
π¨ Vulnerabilities Found: 4 (1 critical)
- Create module in appropriate
src/
subdirectory - Follow existing patterns and interfaces
- Add configuration options to
config.yaml
- Write unit tests
- Update documentation
- Fork the repository
- Create feature branch
- Make changes with tests
- Submit pull request
- π User Guide - Comprehensive usage instructions
- π οΈ Installation Guide - Detailed setup instructions
- βοΈ Configuration Reference - Complete configuration options
- π§ Troubleshooting Guide - Common issues and solutions
- CLI Help:
python main.py --help
- Configuration:
config/config.yaml
- Logs:
logs/framework.log
"Masscan is required but not available"
# Install masscan
sudo apt install masscan # Ubuntu/Debian
brew install masscan # macOS
Permission denied errors
# Set capabilities (recommended)
sudo setcap cap_net_raw+ep $(which masscan)
# Or run with sudo
sudo python main.py 192.168.1.0/24
Module import errors
# Verify virtual environment
source venv/bin/activate
pip install -r requirements.txt
For comprehensive troubleshooting: π Troubleshooting Guide
- Authorization: Ensure explicit written permission before scanning
- Isolation: Always run in isolated/controlled environments
- Stealth: Use VPNs/proxies for operational security
- Access Control: Implement proper authentication and authorization
- Updates: Keep framework and dependencies updated
- Monitoring: Watch for detection and blocking mechanisms
This project is licensed under the MIT License - see the LICENSE file for details.
- Masscan by Robert Graham
- Nmap by Gordon Lyon
- Pwntools by Gallopsled
- Radare2 by pancake
- All contributors and security researchers
Remember: With great power comes great responsibility. Use this tool ethically and legally.