Skip to main content

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.
Safe Mode Enabled by Default: All exploitation attempts run in simulation mode unless explicitly disabled with --no-safe-mode. Safe mode prevents actual exploitation while demonstrating attack feasibility.

ExploitEngine Class

Defined at exploit_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:
vsftpd 2.3.4 Backdoor
  • Module: exploit/unix/ftp/vsftpd_234_backdoor
  • CVE: CVE-2011-2523
  • Safe: Yes
  • Impact: Remote command execution
ProFTPD 1.3.3c Backdoor
  • 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
Matching Strategies:
  1. Service Version Matching: Compares service names and versions against exploit database
  2. 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
Exploit Statuses:

Metasploit RC Script Generation

generate_rc_script()

Generates Metasploit RC scripts for manual exploitation.
exploit_engine.py:210-245
Example RC Script:
exploits/autopentestx_192.168.1.100.rc
Loading RC Script:

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

Dangerous Operation: Disabling safe mode allows real exploitation that can cause system crashes, data loss, or unauthorized access. Only use on authorized targets with proper safeguards.
To disable safe mode:
When prompted, you must confirm:

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