WebPenTest Framework is an automated penetration testing tool that follows industry-standard m 8000 ethodologies including OWASP WSTG, PTES, and NIST SP 800-115. It performs comprehensive security assessments and generates detailed reports.
- DNS enumeration and subdomain discovery
- Technology fingerprinting
- SSL/TLS certificate analysis
- WAF detection
- Information gathering with TheHarvester
- Comprehensive port scanning (TCP/UDP)
- Service version detection
- Directory and file enumeration
- Web application discovery
- Web vulnerability scanning with Nikto
- Nmap script-based vulnerability detection
- Exploit database searches
- Custom vulnerability checks
- SQL injection testing with SQLMap
- Brute force attacks
- Path traversal testing
- XSS vulnerability testing
- File upload vulnerability checks
- Comprehensive HTML reports
- Executive summary generation
- JSON results export
- Risk assessment and recommendations
# Download the framework files
# - webpentest.py (main framework)
# - requirements.txt (Python dependencies)
# -install_tools.sh (tool installer)
sudo chmod +x install_tools.sh
sudo ./install_tools.sh
pip3 install -r requirements.txt
# Basic scan
python3 webpentest.py -t https://example.com
# Scan with custom output directory
python3 webpentest.py -t https://example.com -o /tmp/results
# Scan IP address
python3 webpentest.py -t 192.168.1.100
# Verbose output
python3 webpentest.py -t example.com -v
-t, --target Target URL or IP address (required)
-o, --output Output directory (default: pentest_results)
-v, --verbose Enable verbose output
# Web application test
python3 webpentest.py -t https://webapp.example.com
# Internal network target
python3 webpentest.py -t http://192.168.1.50:8080
# Complete assessment with custom output
python3 webpentest.py -t https://target.com -o /opt/pentests/target_assessment
The framework follows a systematic 5-phase approach:
- Passive reconnaissance: DNS queries, certificate analysis, technology detection
- Active reconnaissance: Subdomain enumeration, service discovery
- Tools used: dnsrecon, theharvester, whatweb, sslyze, wafw00f
- Port scanning: TCP/UDP port discovery and service identification
- Directory enumeration: Hidden files and directories discovery
- Service detection: Version fingerprinting and banner grabbing
- Tools used: nmap, gobuster, dirb
- Automated scanning: Known vulnerability detection
- Script-based testing: Nmap NSE scripts for specific vulnerabilities
- Exploit research: Searchsploit database queries
- Tools used: nikto, nmap scripts, searchsploit
- Web application attacks: SQL injection, XSS, path traversal
- Authentication attacks: Brute force login attempts
- Custom exploits: Targeted attacks based on discovered vulnerabilities
- Tools used: sqlmap, hydra, custom Python scripts
- Risk assessment: Vulnerability severity classification
- Executive summary: High-level findings for management
- Technical details: Detailed findings for technical teams
- Recommendations: Specific remediation guidance
After completion, the framework generates:
pentest_results/
├── scan_target_20250606_143022/
│ ├── report.html # Main HTML report
│ ├── executive_summary.txt # Executive summary
│ ├── results.json # Machine-readable results
│ ├── nmap_quick.txt # Nmap quick scan
│ ├── nmap_full.txt # Nmap full scan
│ ├── nikto.txt # Nikto scan results
│ ├── gobuster.txt # Directory enumeration
│ ├── sqlmap.txt # SQL injection test results
│ ├── whatweb.txt # Technology detection
│ └── [other tool outputs] # Individual tool results
- Executive Summary: High-level findings and risk assessment
- Technical Findings: Detailed vulnerability descriptions
- Successful Exploits: Confirmed security issues
- Recommendations: Specific remediation steps
- Technical Data: Links to detailed tool outputs
- CRITICAL: Immediate action required (RCE, SQLi exploitation)
- HIGH: Action required within 30 days
- MEDIUM: Action required within 90 days
- LOW: Monitor and maintain security posture
- Get written authorization before testing any target
- Define scope clearly to avoid testing out 8000 -of-scope systems
- Run from isolated environment to prevent network disruption
- Backup target data if possible before testing
- Monitor system performance and stop if issues occur
- Document everything for accurate reporting
- Use rate limiting to avoid overwhelming target systems
- Be prepared to explain activities if questioned
- Provide clear remediation guidance
- Offer retesting services after fixes are implemented
- Keep reports confidential and secure
- Follow up on critical findings
# Install missing tools
sudo apt update
sudo apt install nmap gobuster nikto sqlmap hydra
# Verify installation
which nmap gobuster nikto
# Run with sudo for full functionality
sudo python3 webpentest.py -t target.com
# Test basic connectivity
ping target.com
curl -I https://target.com
# Check DNS resolution
nslookup target.com
- Use
-T4
or-T5
timing templates for faster scans - Reduce port ranges for quicker results
- Skip intensive scans for time-sensitive assessments
# If nmap fails with permission errors
sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip $(which nmap)
# If SQLMap hangs, adjust risk and level
sqlmap -u "target.com" --risk=1 --level=1 --batch
# If wordlist not found
sudo apt install wordlists
ls /usr/share/wordlists/
-
Legal Authorization Required
- Only test systems you own or have explicit written permission to test
- Unauthorized penetration testing is illegal in most jurisdictions
- Always get proper authorization before testing
-
Scope Limitations
- Respect defined scope boundaries
- Don't test systems outside the agreed scope
- Be careful with wildcard domains and IP ranges
-
System Impact
- Some tests may cause system instability
- Monitor target systems during testing
- Have emergency contacts ready
-
Data Handling
- Don't access or modify sensitive data
- Don't exfiltrate data during testing
- Report findings responsibly
- Report vulnerabilities promptly to system owners
- Provide clear remediation steps
- Allow reasonable time for fixes before public disclosure
- Follow coordinated disclosure practices
# Use custom wordlists
export WORDLIST="/path/to/custom/wordlist.txt"
python3 webpentest.py -t target.com
# Route through proxy (modify source code)
proxychains python3 webpentest.py -t target.com
The framework automatically uses threading for faster execution, but you can run multiple instances:
# Scan multiple targets
python3 webpentest.py -t target1.com -o results1 &
python3 webpentest.py -t target2.com -o results2 &
wait
- Add tool check to
check_tools()
method - Implement tool execution in appropriate phase
- Add output parsing if needed
- Update installer script
- Follow existing code structure
- Add proper error handling
- Include progress indicators
- Update documentation
- Read the source code comments for detailed explanations
- Check tool documentation for specific usage
- Refer to OWASP Testing Guide for methodology details
- OWASP Web Security Testing Guide
- PTES Technical Guidelines
- NIST SP 800-115
- Kali Linux documentation
- Check tool-specific documentation
- Verify all prerequisites are met
- Test individual tools manually
- Check network connectivity and permissions
Remember: This tool is for authorized security testing only. Always get proper authorization and follow responsible disclosure practices.