Skip to content

learn-nmap v1.0.0

Latest

Choose a tag to compare

@EdgarQuinones EdgarQuinones released this 07 Sep 07:43
· 20 commits to main since this release
2e1b378

Learn-Nmap v1.0.0

Learn-Nmap is a Python-based automation tool that integrates Nmap with AI-powered reporting to help penetration testers and security professionals conduct scans more efficiently and produce structured reports.


Features

  • Automated Scanning

    • Executes Nmap against a target host, IP range, or network.
    • Detects live hosts, open ports, and running services.
  • AI-Powered Analysis

    • Uses Ollama (llama3.1:8b) to interpret scan results.
    • Generates a structured report with actionable insights.
  • Progressive Recommendations

    • Provides four levels of Nmap commands for each detected service:

      • Level 1 → Safe confirmation
      • Level 2 → Version & OS detection
      • Level 3 → Aggressive NSE scripts
      • Level 4 → Exhaustive, intrusive checks
    • Includes relevant NSE scripts tailored to the service.

  • CLI Output Formatting

    • Color-coded results: open ports in green, closed in red, and summaries in yellow/cyan.
  • Report Generation

    • Saves AI analysis to report.md.
    • Includes summaries, recommended commands, and next steps.

Installation

Setup scripts are provided for Linux, Windows (Batch), and PowerShell. These scripts install the following dependencies:

  • Nmap
  • Ollama
  • llama3.1:8b model (~4.7 GB)

They also configure the environment to run Learn-Nmap.py.


Usage

python3 Learn-Nmap.py <target>

Examples:

python3 Learn-Nmap.py 192.168.1.10
python3 Learn-Nmap.py 192.168.1.0/24

Example Output

Summary of Findings:
- Host: 192.168.1.10
- Open ports:
  - 22/tcp: SSH
  - 80/tcp: HTTP
  - 443/tcp: HTTPS
- Services are standard; no unusual configs detected.

Service: HTTP (80/tcp)
- Level 1: nmap -p 80 192.168.1.10
- Level 2: nmap -sV -p 80 192.168.1.10
- Level 3: nmap -sV --script=http-enum,http-title -p 80 192.168.1.10
- Level 4: nmap -sV --script=http-vuln* -p 80 192.168.1.10

Roadmap

  • Add option for JSON/HTML report output
  • Expand service-specific NSE script coverage
  • Add multi-threaded scanning for faster results
  • Improve AI prompt customization per user

Contributing

Feedback, ideas, and bug reports are welcome. Contributions will help shape the future of Learn-Nmap.


License

This project is released under the MIT License. See [LICENSE](LICENSE) for details.