Overview
AutoPentestX generates Metasploit Resource (RC) scripts during the exploitation assessment phase. These scripts allow security professionals to manually validate identified vulnerabilities in controlled environments. All scripts are generated in SAFE MODE by default and require manual activation.Safe Mode: AutoPentestX never automatically executes exploits. All exploitation is simulated, and RC scripts are provided for manual review and execution by authorized professionals only.
RC Script Location
All Metasploit resource scripts are saved to theexploits/ directory:
exploit_{target}_{port}_{timestamp}.rc
RC Script Structure
Each generated script follows this format:Script Components
Header Comments
Header Comments
- Script purpose
- Generator tool
- Target information
- Generation timestamp
Exploit Module
Exploit Module
- Detected vulnerability
- Service version
- CVE matching
Target Configuration
Target Configuration
RHOSTS: Target IP or hostnameRPORT: Service port number
Payload Configuration
Payload Configuration
- Reverse TCP shell (most compatible)
- Placeholder
LHOST(must be updated) - Standard port 4444
Check Command
Check Command
- Verifies if target is vulnerable
- Does not execute exploit
- Safe for production systems
Exploit Command (Commented)
Exploit Command (Commented)
- Prevents accidental execution
- Requires explicit decision
- Ensures authorized use only
Using RC Scripts
Loading in Metasploit Console
Checking Vulnerability
After loading the RC script:The target appears to be vulnerable- Exploit likely to succeedThe target is not exploitable- Target not vulnerableUnknown- Unable to determine (may still be vulnerable)
Configuring Payload
Update theLHOST before execution:
Executing Exploit (Manual Only)
WARNING: Only execute exploits on systems you own or have explicit written authorization to test. Unauthorized exploitation is illegal.
Exploit Database
AutoPentestX includes built-in exploit mappings for common vulnerabilities:FTP Exploits
| Service | Exploit Module | Description |
|---|---|---|
| vsftpd 2.3.4 | exploit/unix/ftp/vsftpd_234_backdoor | VSFTPD v2.3.4 Backdoor Command Execution |
| ProFTPD 1.3.3c | exploit/unix/ftp/proftpd_133c_backdoor | ProFTPD 1.3.3c Backdoor |
HTTP Exploits
| Vulnerability | Exploit Module | Description |
|---|---|---|
| Shellshock | exploit/multi/http/apache_mod_cgi_bash_env_exec | Apache mod_cgi Bash Environment Variable Injection |
| Drupalgeddon2 | exploit/unix/webapp/drupal_drupalgeddon2 | Drupal Remote Code Execution |
SMB Exploits
| CVE | Exploit Module | Description | Safe |
|---|---|---|---|
| CVE-2017-0144 | exploit/windows/smb/ms17_010_eternalblue | EternalBlue SMB Remote Code Execution | ⚠️ No* |
Exploit Matching Logic
AutoPentestX uses two methods to match exploits:1. Service Version Matching
Matches service banners to known vulnerable versions:2. CVE-to-Exploit Mapping
Matches CVE identifiers to exploit modules:Exploitation Output
During scan execution, the exploitation phase logs:Customizing RC Scripts
After generation, you can manually customize scripts:Change Payload
Add Advanced Options
Multiple Attempts
Safe Mode Behavior
AutoPentestX implements multiple safety layers:Exploit Classification
Exploit Classification
safe: False are automatically skipped in safe mode.Simulated Execution
Simulated Execution
RC Script Comments
RC Script Comments
All RC scripts include commented exploit commands:This prevents accidental execution via
msfconsole -r script.rc.Exploitation Report
Generate a JSON report of all exploitation attempts:Metasploit Detection
AutoPentestX automatically checks for Metasploit availability:Installing Metasploit
Best Practices
- Always Review Scripts: Inspect RC scripts before loading in Metasploit
- Verify Authorization: Ensure written permission before exploitation
- Use Check Command: Run
checkbeforeexploitto verify vulnerability - Update LHOST: Always set your correct attacker IP address
- Lab Environment: Test exploits in isolated lab environments first
- Document Actions: Keep records of all exploitation attempts
- Safe Payloads: Start with non-destructive payloads (reverse shells)
- Backup Targets: Back up target systems before exploitation (if possible)
Legal Disclaimer: Unauthorized exploitation of computer systems is illegal in most jurisdictions. Always obtain explicit written permission before conducting penetration tests. AutoPentestX is designed for authorized security assessments only.
Troubleshooting
No RC scripts generated
No RC scripts generated
Cause: No exploits matched to vulnerabilitiesSolution:
- Verify vulnerabilities were detected
- Check if Metasploit is installed
- Review logs for exploit matching errors
- Manually search Metasploit for applicable exploits
Exploit marked as SKIPPED
Exploit marked as SKIPPED
Cause: Exploit flagged as potentially destructiveExample:Solution:
- Review exploit safety classification
- Use in isolated lab environment only
- Manually execute with extreme caution
Exploit fails with 'not vulnerable'
Exploit fails with 'not vulnerable'
Cause: False positive from automated detectionSolution:
Payload doesn't connect
Payload doesn't connect
Cause: Firewall, incorrect LHOST, or payload mismatchSolution:
Related Resources
- PDF Reports - Exploitation results in reports
- Risk Assessment - How exploitability affects risk scoring
- Log Files - Debugging exploitation issues
- Metasploit Documentation - Official Metasploit guides