Overview
The Exploit Engine module (modules/exploit_engine.py) provides safe exploitation capabilities with Metasploit Framework integration. It matches vulnerabilities to known exploits, simulates attacks in safe mode, and generates Metasploit RC scripts for manual validation.
ExploitEngine Class
Defined atexploit_engine.py:14, this class manages exploit matching and execution.
Initialization
exploit_engine.py:15-53
boolean
default:true
Enable safe mode to simulate exploits without actual execution
Built-in Exploit Database
The module includes a curated database of common exploits:- FTP Exploits
- SMB Exploits
- Web Exploits
vsftpd 2.3.4 Backdoor
- Module:
exploit/unix/ftp/vsftpd_234_backdoor - CVE: CVE-2011-2523
- Safe: Yes
- Impact: Remote command execution
- Module:
exploit/unix/ftp/proftpd_133c_backdoor - CVE: CVE-2010-4221
- Safe: Yes
- Impact: Backdoor access
Exploit Matching
match_exploits()
Matches discovered vulnerabilities to available exploits.exploit_engine.py:70-125
- Service Version Matching: Compares service names and versions against exploit database
- CVE-to-Exploit Mapping: Direct mapping of CVE IDs to known exploits
Safe Exploitation
simulate_exploitation()
Simulates exploit execution in safe mode.exploit_engine.py:145-195
Metasploit RC Script Generation
generate_rc_script()
Generates Metasploit RC scripts for manual exploitation.exploit_engine.py:210-245
exploits/autopentestx_192.168.1.100.rc
Safe Mode Protection
Safe mode provides three layers of protection:1
Exploit Safety Check
Blocks exploits marked as
safe: False in the database.2
Simulation Mode
Records exploit matches without executing Metasploit modules.
3
RC Script Generation
Creates manual verification scripts instead of auto-exploitation.All exploits output to RC files for operator review.
Usage Example
Output Format
Disabling Safe Mode
To disable safe mode:Related Documentation
Safe Mode Concept
Detailed explanation of safe mode protection
Exploitation Guide
Complete guide to exploit simulation
Exploit Scripts
RC script format and usage
CLI Options
—no-safe-mode flag documentation