Skip to content

Ronoh12/nmap-xml-risk-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Nmap XML Risk Report (Python)

πŸ“Œ Overview

A lightweight Python tool that parses Nmap XML output and generates:

  • A risk-scored host/port summary
  • A clean Markdown report (reports/report.md) suitable for GitHub
  • A structured JSON report (reports/report.json) for tooling/SOC workflows

βœ… Includes a safe demo Nmap XML so reviewers can run it immediately.


πŸ”§ Tools Used

  • Python 3 (stdlib only)
  • Nmap XML format (input)

πŸ“‚ Project Structure

nmap-xml-risk-report/
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ demo/
β”‚   └── demo_nmap.xml
β”œβ”€β”€ reports/
β”‚   β”œβ”€β”€ report.md
β”‚   └── report.json
└── src/
    └── parse_nmap_xml.py

## πŸ§ͺ Demo: Clean vs Risky Networks

### Risky demo (includes SMB/RDP/FTP examples)
```bash
python3 src/parse_nmap_xml.py --xml demo/demo_nmap.xml --out-md reports/risky_report.md --out-json reports/risky_report.json

## πŸ“Š Comparison: Clean vs Risky (Auto-generated)

<!-- COMPARISON_START -->
| Metric | Risky Demo (`demo_nmap.xml`) | Clean Demo (`demo_nmap_clean.xml`) |
|---|---:|---:|
| Total hosts | 2 | 2 |
| High-risk hosts | 2 | 0 |
| Medium-risk hosts | 0 | 1 |
| Low-risk hosts | 0 | 1 |
| High-risk open ports (total) | 3 | 0 |
| Medium-risk open ports (total) | 2 | 1 |
| Low-risk open ports (total) | 1 | 2 |

### πŸ”₯ Top High-Risk Ports (Risky Demo)
| Port/Proto + Service | Count |
|---|---:|
| 445/tcp microsoft-ds | 1 |
| 3389/tcp ms-wbt-server | 1 |
| 21/tcp ftp | 1 |

> Auto-generated from demo XML files using the heuristic risk model.
<!-- COMPARISON_END -->

Run:
```bash
python3 src/generate_comparison.py

About

A Python tool that parses Nmap XML scan results and generates risk-scored Markdown and JSON reports, including high-risk port summaries and an automated clean vs risky network comparison.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages