AutoPentestX executes a comprehensive 7-phase penetration testing workflow automatically. Each phase builds on the previous one, creating a complete picture of the target’s security posture.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gowtham-Darkseid/AutoPentestX/llms.txt
Use this file to discover all available pages before exploring further.
Complete Workflow Overview
Therun_full_assessment() method in main.py:136 orchestrates all seven phases:
Phase 1: Initialization
Database Setup
The assessment begins with database initialization (main.py:144-159):
The scan ID tracks all results throughout the assessment and allows historical comparison of scans against the same target.
Phase 2: Network Reconnaissance
Port Scanning & Service Detection
Comprehensive network scanning using Nmap (main.py:161-180):
Scanning Capabilities
TCP Scanning
All 65,535 TCP ports with service detection
UDP Scanning
Top 20 UDP ports for common services
OS Detection
Operating system fingerprinting via TCP/IP stack analysis
Banner Grabbing
Service version identification from banners
Data Collected
- Open port numbers
- Service names (HTTP, SSH, FTP, etc.)
- Service versions (Apache 2.4.41, OpenSSH 8.2p1)
- Operating system family and version
- Network latency and responsiveness
Database Storage
Phase 3: Vulnerability Analysis
Web Vulnerability Scanning
Deep vulnerability analysis using Nikto and SQLMap (main.py:183-207):
This phase can be skipped with
--skip-web for faster scans or when web testing isn’t needed.Detection Methods
Web Application Scanning
Nikto scans for web server vulnerabilities, dangerous files, outdated versions
Vulnerability Storage
Phase 4: CVE Intelligence
Automated CVE Lookup
Cross-references discovered services with CVE databases (main.py:209-230):
CVE Matching Process
CVE Data Structure
Phase 5: Risk Assessment
Multi-Factor Risk Calculation
Comprehensive risk analysis combining all vulnerability data (main.py:233-254):
Risk Factors
Port Exposure
Number and type of open ports (higher = riskier)
Vulnerability Count
Total vulnerabilities weighted by severity
CVSS Scores
Aggregate CVSS scores from all CVEs
Exploit Availability
Whether public exploits exist for vulnerabilities
Risk Levels
- CRITICAL: CVSS 9.0-10.0 or actively exploited vulnerabilities
- HIGH: CVSS 7.0-8.9 or multiple serious issues
- MEDIUM: CVSS 4.0-6.9 or configuration weaknesses
- LOW: CVSS 0.1-3.9 or informational findings
- INFO: No security impact, awareness only
Database Update
Phase 6: Exploitation Simulation
Safe Mode Exploitation
Metasploit integration with safety controls (main.py:256-290):
Phase 6 can be skipped with
--skip-exploit for compliance requirements or faster assessments.Exploit Matching
The exploit engine matches vulnerabilities to known exploits (exploit_engine.py:70-117):
Exploit Database
Built-in exploit mappings (exploit_engine.py:22-53):
- vsftpd 2.3.4: Backdoor command execution
- ProFTPD 1.3.3c: Backdoor vulnerability
- EternalBlue (MS17-010): SMB remote code execution
- Shellshock: Bash environment variable injection
- Drupalgeddon2: Drupal RCE vulnerability
Safe Mode Behavior
In safe mode (default), the tool:Phase 7: Report Generation
Professional PDF Reports
Final phase generates comprehensive documentation (main.py:293-310):
Report Contents
Executive Summary
Executive Summary
High-level overview suitable for non-technical stakeholders:
- Overall risk level and score
- Critical findings count
- Top 5 recommendations
- Business impact assessment
Technical Findings
Technical Findings
Detailed technical information for security teams:
- Complete port scan results
- All identified vulnerabilities
- CVE details with CVSS scores
- Exploit simulation results
Risk Assessment
Risk Assessment
Comprehensive risk analysis:
- Risk calculation methodology
- Individual vulnerability ratings
- Aggregate risk scoring
- Threat prioritization
Remediation Guidance
Remediation Guidance
Actionable recommendations:
- Prioritized fix list
- Configuration changes
- Patch requirements
- Compensating controls
Report Formats
- PDF: Primary format with professional styling
- Database: SQLite for historical analysis
- Logs: Text logs for debugging and audit trails
- RC Scripts: Metasploit scripts for validation testing
Workflow Execution
Automatic Progress
All phases execute automatically with real-time progress indicators:Error Handling
The workflow includes comprehensive error handling (main.py:324-341):
All partial results are saved even if the scan is interrupted, allowing you to review findings up to the failure point.
Timeline & Performance
Typical Execution Times
| Phase | Time Range | Factors |
|---|---|---|
| Phase 1 | < 1 second | Database initialization |
| Phase 2 | 3-15 minutes | Number of ports, network latency |
| Phase 3 | 5-20 minutes | Number of web services, SQLMap depth |
| Phase 4 | 1-3 minutes | CVE API response times |
| Phase 5 | < 1 second | Risk calculation |
| Phase 6 | 1-5 minutes | Number of matched exploits |
| Phase 7 | 1-2 minutes | Report complexity |
What’s Next?
Safe Mode Details
Learn about exploitation safety mechanisms
Run Your First Scan
Execute your first penetration test
CLI Reference
Complete command-line options
Understanding Reports
Interpret generated PDF reports