Skip to main content
AutoPentestX includes an intelligent exploitation engine that matches discovered vulnerabilities with known exploits and generates Metasploit resource scripts for manual testing.
Safe Mode is ALWAYS enabled by default. AutoPentestX simulates exploitation attempts but never executes actual exploits to prevent system damage.

How Exploit Matching Works

The exploit engine analyzes vulnerabilities from two sources:
  1. Service-based matching: Vulnerable service versions detected by Nmap
  2. CVE-based matching: Known CVEs from the intelligence database

Exploitation Phases

1

Vulnerability Input

The engine receives vulnerability data from Phase 3 and Phase 4:
2

Exploit Database Lookup

Vulnerabilities are matched against the internal exploit database:
3

Confidence Scoring

Each match receives a confidence level:
  • HIGH: Exact service version match
  • MEDIUM: CVE-based match
  • LOW: Generic service match
4

Safe Mode Check

Before simulation, the engine verifies each exploit’s safety rating:
5

Simulation & RC Script Generation

For safe exploits, Metasploit resource scripts are generated:

Built-in Exploit Database

AutoPentestX includes exploits for common vulnerabilities:

VSFTPD 2.3.4 Backdoor

Metasploit Module: exploit/unix/ftp/vsftpd_234_backdoorDescription: VSFTPD version 2.3.4 contains a backdoor allowing remote code execution.Trigger Conditions:
  • Service: ftp
  • Version: vsftpd 2.3.4
Safety Rating: ✅ Safe (opens a shell but doesn’t crash the service)

ProFTPD 1.3.3c Backdoor

Metasploit Module: exploit/unix/ftp/proftpd_133c_backdoorDescription: ProFTPD 1.3.3c backdoor allows remote command execution.Trigger Conditions:
  • Service: ftp
  • Version: proftpd 1.3.3
Safety Rating: ✅ Safe

Console Output Interpretation

Phase 6: Exploitation Assessment

Terminal Output

Status Meanings

success
Exploit was deemed safe and an RC script was generated. You can manually test this exploit using Metasploit.
warning
Exploit was flagged as potentially destructive and was not simulated, even in safe mode.
error
Safe mode prevented execution (this status appears if --no-safe-mode is used, but exploitation is still blocked).

Metasploit Resource Scripts

RC scripts are saved to the exploits/ directory and can be used for manual exploitation.

RC Script Structure

exploits/exploit_192.168.1.100_21_20240311_143022.rc

Using RC Scripts with Metasploit

1

Start Metasploit

Launch msfconsole:
2

Load the RC Script

Use the resource command to load the script:
The script will:
  • Load the exploit module
  • Configure all parameters
  • Run the check command to verify exploitability
3

Review Check Results

Metasploit’s check command tests if the target is vulnerable:
or
4

Manual Exploitation (Optional)

If you have authorization and want to proceed:
Only execute exploits with explicit written authorization. Exploitation can crash services or damage systems.

Customizing RC Scripts

You can edit RC scripts before running them:
Modified Script

Safe Mode vs No-Safe-Mode

Default Behavior (Safe Mode)

What Happens:
  • ✅ Identifies exploitable vulnerabilities
  • ✅ Matches exploits from database
  • ✅ Generates Metasploit RC scripts
  • ✅ Runs check command simulation
  • ❌ Does NOT execute exploits
  • ❌ Does NOT modify target system
  • ❌ Does NOT open reverse shells
Output:

Disabling Safe Mode

Currently Blocked: Even with --no-safe-mode, actual exploitation is disabled in the code for safety. This is an intentional design decision.
What Would Happen (if enabled):
  • ⚠️ Could execute actual exploits
  • ⚠️ May crash services
  • ⚠️ Could damage target systems
  • ⚠️ Might trigger IDS/IPS alerts
  • ⚠️ Legal liability if unauthorized
Code Protection: From modules/exploit_engine.py:127-132:

Skipping Exploitation Phase

Use --skip-exploit to disable the entire exploitation phase:
Impact:
  • Phase 6 is skipped entirely
  • No exploit matching occurs
  • No RC scripts are generated
  • Reduces scan time by 2-5 minutes
  • Report shows 0 exploitation attempts
Console Output:
When to Skip:
  • ✅ Pure vulnerability discovery
  • ✅ Compliance scanning
  • ✅ Time-constrained assessments
  • ✅ When Metasploit is not installed

Exploitation in PDF Report

The report includes an “EXPLOITATION ASSESSMENT” section:

Section Content

Report Excerpt

Interpreting Results

Meaning: Exploit is available and an RC script was generated.Action Items:
  1. Review the RC script in exploits/ directory
  2. Test in a lab environment first
  3. If authorized, manually execute using Metasploit
  4. Document findings
Meaning: Exploit exists but is flagged as dangerous.Action Items:
  1. Investigate the CVE manually
  2. Check vendor patches
  3. Test in an isolated lab only
  4. Do NOT attempt on production systems
Meaning: No known exploits for detected vulnerabilities.Action Items:
  1. Vulnerabilities still exist (lack of exploit ≠ lack of risk)
  2. Review CVE details for manual testing approaches
  3. Check vendor advisories
  4. Apply patches based on vulnerability severity

Manual Metasploit Workflow

After AutoPentestX generates RC scripts, follow this workflow for manual testing:

Database Storage

Exploit attempts are stored in the database:

Query Exploitation Data

Best Practices

Always Get Authorization

Never attempt exploitation without explicit written permission, even in safe mode.

Test in Labs First

Use Metasploitable, DVWA, or other vulnerable VMs for practice before testing real systems.

Keep Safe Mode Enabled

Only disable safe mode if you’re an expert and have proper authorization.

Document Everything

Keep detailed records of all exploitation attempts and results for legal protection.

Next Steps

Report Analysis

Learn how to interpret and act on PDF report findings

API Reference

Complete CLI flag reference and examples