Goal: Automate the creation of Metasploit resource scripts (.rc) for network enumeration, driven by Nmap XML scan results. This tool focuses strictly on safe auxiliary modules for information gathering.
- Clone the repository:
# Assuming the project files are in a directory - Install dependencies:
The script requires the
PyYAMLlibrary for parsing the configuration file.pip install -r requirements.txt
- Configuration: Ensure
config.yamlis in the same directory asnmap2msfrc.py. This file controls the service-to-module mappings and safety levels.
- Flexible Configuration: Uses a YAML file (
config.yaml) for easy extension of services and modules. - Safe Enumeration: Only uses non-destructive auxiliary modules (no exploits).
- HTTP Enumeration: Includes checks for common web files like
/robots.txtand sitemaps. - Markdown Reporting: Outputs a clear, readable Markdown report (
.md) of the entire test plan. - Dry-Run Mode: Allows reviewing the planned actions before execution.
First, run an Nmap scan with service version detection (-sV) and XML output (-oX):
nmap -sV -O -oX nmap_scan.xml <target_ip_range>