Automated Penetration Testing Framework for Efficient Security Assessments
Features • Installation • Modules • Usage • Workflows
Pentest Automation is a comprehensive framework that automates repetitive penetration testing tasks, streamlines assessment workflows, and generates professional reports. Built for efficiency without sacrificing thoroughness, this toolkit enables security professionals to focus on complex analysis while automation handles routine tasks.
Reduce manual effort in penetration testing by 70% through intelligent automation while maintaining the quality and depth of security assessments. Enable faster, more consistent, and more comprehensive testing.
- Network Scanning - Automated discovery and enumeration
- Vulnerability Assessment - Multi-scanner integration
- Web Application Testing - Automated fuzzing and injection
- Exploit Execution - Intelligent exploitation workflows
- Post-Exploitation - Automated privilege escalation and data collection
- Reporting - Professional report generation
- Continuous Testing - Scheduled and triggered assessments
- CI/CD Integration - DevSecOps pipeline integration
| Feature | Description | Status |
|---|---|---|
| Auto-Recon | Automated reconnaissance and enumeration | ✅ Active |
| Vuln Scanning | Multi-scanner vulnerability assessment | ✅ Active |
| Web Testing | Automated web app security testing | ✅ Active |
| Exploit Automation | Intelligent exploit selection and execution | ✅ Active |
| Privilege Escalation | Automated privesc enumeration | ✅ Active |
| Credential Harvesting | Automated password and hash collection | ✅ Active |
| Report Generation | Professional PDF/HTML reports | ✅ Active |
| CI/CD Integration | Jenkins, GitLab CI, GitHub Actions | ✅ Active |
| API Testing | Automated API security assessment | ✅ Active |
| Cloud Security | AWS, Azure, GCP security testing | ✅ Active |
# Clone the repository
git clone https://github.com/Panda1847/pentest-automation.git
cd pentest-automation
# Run setup
chmod +x setup.sh
./setup.sh
# Configure
cp configs/config.example.yaml configs/config.yaml
# Edit configs/config.yaml
# Run first scan
python3 pentest.py --target 192.168.1.0/24 --mode full- Python 3.9+
- Kali Linux or similar pentesting distro
- Root/sudo access
- 8GB RAM minimum
- 50GB disk space
# Build image
docker build -t pentest-automation .
# Run container
docker run -it --rm --network host pentest-automation
# Run scan
docker run -it pentest-automation python3 pentest.py --target example.comAutomated information gathering and enumeration.
# Full reconnaissance
python3 pentest.py --target example.com --module recon
# Specific recon types
python3 pentest.py --target example.com --recon subdomain,port,serviceWhat it does:
- Subdomain enumeration
- Port scanning (Nmap, Masscan)
- Service detection and versioning
- OS fingerprinting
- SSL/TLS analysis
- DNS enumeration
- WHOIS lookup
- Technology detection
Multi-scanner vulnerability assessment.
# Full vulnerability scan
python3 pentest.py --target 192.168.1.100 --module vulnscan
# Specific scanners
python3 pentest.py --target 192.168.1.100 --scanners nessus,openvas,nucleiIntegrated Scanners:
- Nessus (commercial)
- OpenVAS
- Nuclei
- Nikto
- WPScan
- Custom CVE checks
Automated web security testing.
# Full web app test
python3 pentest.py --target https://example.com --module webapp
# Specific tests
python3 pentest.py --target https://example.com --tests sqli,xss,xxeTests Included:
- SQL Injection (SQLMap)
- XSS (XSStrike)
- XXE (custom)
- SSRF (custom)
- Command Injection (Commix)
- Directory Traversal
- File Upload vulnerabilities
- Authentication bypass
- Session management
- CORS misconfigurations
Intelligent exploit selection and execution.
# Auto-exploit
python3 pentest.py --target 192.168.1.100 --module exploit --auto
# Manual exploit selection
python3 pentest.py --target 192.168.1.100 --exploit CVE-2021-44228Features:
- Automatic exploit matching
- Metasploit integration
- Custom exploit library
- Payload generation
- Exploit verification
- Safe exploitation mode
Automated post-exploitation activities.
# Full post-exploitation
python3 pentest.py --session 1 --module postexploit
# Specific activities
python3 pentest.py --session 1 --postexploit privesc,creds,lateralActivities:
- Privilege escalation enumeration
- Credential harvesting
- Lateral movement
- Persistence establishment
- Data exfiltration
- Network pivoting
- Domain enumeration
Professional report generation.
# Generate report
python3 pentest.py --report --input scan_results/ --output report.pdf
# Custom template
python3 pentest.py --report --template custom.html --output report.htmlReport Formats:
- PDF (professional)
- HTML (interactive)
- JSON (machine-readable)
- Markdown (documentation)
- CSV (data analysis)
python3 pentest.py --target 192.168.1.0/24 --workflow network-fullWorkflow Steps:
- Network discovery
- Port scanning
- Service enumeration
- Vulnerability scanning
- Exploitation attempts
- Post-exploitation
- Report generation
Duration: 2-6 hours depending on network size
python3 pentest.py --target https://example.com --workflow webapp-fullWorkflow Steps:
- Technology detection
- Directory brute-forcing
- Parameter discovery
- Vulnerability scanning
- Injection testing
- Authentication testing
- Authorization testing
- Report generation
Duration: 1-4 hours depending on app size
python3 pentest.py --target example.com --workflow externalWorkflow Steps:
- Subdomain enumeration
- Port scanning
- Service identification
- Web application discovery
- Vulnerability assessment
- Exploitation
- Report generation
Duration: 3-8 hours
python3 pentest.py --target 10.0.0.0/8 --workflow internalWorkflow Steps:
- Network discovery
- Host enumeration
- Service scanning
- Vulnerability assessment
- Active Directory enumeration
- Credential attacks
- Lateral movement
- Report generation
Duration: 1-3 days
# Fast scan of single host
python3 pentest.py --target 192.168.1.100 --mode quick# Full assessment with all modules
python3 pentest.py --target example.com --mode full --output results/# Focus on web application
python3 pentest.py --target https://app.example.com --modules webapp --depth deep# Schedule daily scans
python3 pentest.py --target 192.168.1.0/24 --schedule daily --time 02:00# .gitlab-ci.yml
security_scan:
stage: test
script:
- python3 pentest.py --target $CI_ENVIRONMENT_URL --mode quick
- python3 pentest.py --report --output security-report.pdf
artifacts:
paths:
- security-report.pdf# Test REST API
python3 pentest.py --target https://api.example.com --module api --swagger swagger.json# AWS security assessment
python3 pentest.py --cloud aws --profile default --modules s3,iam,ec2Edit configs/config.yaml:
# General Settings
scan_speed: normal # slow, normal, fast, insane
threads: 10
timeout: 30
retry: 3
# Modules
modules:
recon:
enabled: true
subdomain_tools: [subfinder, amass, assetfinder]
port_scanner: nmap
vulnscan:
enabled: true
scanners: [nuclei, nikto]
severity_threshold: medium
webapp:
enabled: true
tests: [sqli, xss, xxe, ssrf]
depth: 3
exploit:
enabled: false # Requires explicit enable
auto_exploit: false
verify_exploits: true
# Reporting
reporting:
format: pdf
template: professional
include_screenshots: true
executive_summary: true
# Notifications
notifications:
slack:
enabled: false
webhook: ""
email:
enabled: false
smtp_server: ""
recipients: []Each module has detailed configuration in configs/modules/:
recon.yaml- Reconnaissance settingsvulnscan.yaml- Vulnerability scanningwebapp.yaml- Web application testingexploit.yaml- Exploitation settingspostexploit.yaml- Post-exploitation
results/
├── example.com/
│ ├── recon/
│ │ ├── subdomains.txt
│ │ ├── ports.xml
│ │ └── services.json
│ ├── vulnscan/
│ │ ├── nuclei_results.json
│ │ └── nikto_results.txt
│ ├── webapp/
│ │ ├── sqli_results.json
│ │ └── xss_results.json
│ └── report/
│ ├── report.pdf
│ ├── report.html
│ └── report.json
-
Executive Summary
- High-level findings
- Risk assessment
- Recommendations
-
Technical Details
- Vulnerability descriptions
- Proof of concepts
- Remediation steps
-
Appendices
- Scan logs
- Tool outputs
- Screenshots
name: Security Scan
on: [push, pull_request]
jobs:
pentest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Pentest
run: |
docker run pentest-automation \
python3 pentest.py --target ${{ secrets.TARGET_URL }} --mode quickpipeline {
agent any
stages {
stage('Security Scan') {
steps {
sh 'python3 pentest.py --target ${TARGET_URL} --mode quick'
}
}
}
}security_scan:
stage: test
script:
- python3 pentest.py --target $CI_ENVIRONMENT_URL
artifacts:
reports:
security: security-report.json- Systems you own
- Authorized penetration tests
- Bug bounty programs
- Security research (authorized)
- Educational environments
- Unauthorized systems
- Without written permission
- Illegal activities
- Malicious purposes
- Violating laws or policies
Always obtain written authorization before testing:
Authorization Letter Template:
I, [Name], authorize [Tester] to conduct security testing on:
- Systems: [List]
- IP Ranges: [List]
- Domains: [List]
- Timeframe: [Dates]
- Scope: [Details]
Signature: _______________
Date: _______________
- Dry-run mode - Test without execution
- Safe mode - Avoid destructive tests
- Rate limiting - Prevent DoS
- Scope validation - Stay within boundaries
- Backup prompts - Confirm dangerous actions
- Logging - Audit trail of all actions
# Run in safe mode (no exploitation)
python3 pentest.py --target example.com --safe-mode
# Dry run (show what would be done)
python3 pentest.py --target example.com --dry-runComprehensive documentation in docs/:
| Document | Description |
|---|---|
| SETUP.md | Installation guide |
| MODULES.md | Module documentation |
| WORKFLOWS.md | Workflow guides |
| API.md | API documentation |
| CICD.md | CI/CD integration |
| LEGAL.md | Legal guidelines |
Contributions welcome! We need:
- 🔧 New modules
- 🐛 Bug fixes
- 📝 Documentation
- 💡 Feature ideas
- 🎯 Workflow templates
- 🔌 Tool integrations
See CONTRIBUTING.md for guidelines.
- ✅ Core automation framework
- ✅ 6 main modules
- ✅ 10+ automated workflows
- ✅ Professional reporting
- ✅ CI/CD integration
v1.1 (Q2 2026)
- Machine learning exploit selection
- Cloud-native testing
- Container security
- Mobile app testing
v2.0 (Q4 2026)
- Web interface
- Collaborative testing
- Real-time dashboards
- AI-powered analysis
MIT License - see LICENSE for details.
Disclaimer: For authorized security testing only. Unauthorized use is illegal.
- Offensive Security - Kali Linux and tools
- Metasploit - Exploitation framework
- OWASP - Web security standards
- Security Community - Tools and techniques
- 📖 Documentation
- 🐛 Issues
- 💬 Discussions
⚡ Automate Testing. Accelerate Security. ⚡
Test Responsibly. Automate Ethically. Secure Continuously.