Transform Nmap scan results into BloodHound-compatible OpenGraph format for network analysis
Project description
Bloodhound Nmap Scanner
Transform your network reconnaissance into beautiful BloodHound graphs!
A powerful Python tool that combines the network discovery capabilities of Nmap with the graph visualization power of BloodHound's OpenGraph format. Turn your port scans into actionable intelligence!
Features
- Smart Network Scanning: Leverage Nmap's powerful scanning engine
- Subnet Expansion: Automatically expand CIDR notation (
192.168.1.0/24) into individual hosts - BloodHound Integration: Export results directly to OpenGraph JSON format
- Flexible Configuration: JSON-based configuration for easy customization
- Security Focused: Built for defensive security and network analysis
- Easy to Use: Simple command-line interface
Quick Start
Prerequisites
- Python 3.9+
- Nmap installed on your system
- Root/Administrator privileges (for some scan types)
Installation
-
Install from PyPI:
pip install bloodhound-nmap
-
Or clone the repository:
git clone https://github.com/rreichel3/bloodhound-nmap.git cd bloodhound-nmap pip install -e .
Usage
-
Create your scan configuration:
cp scan_config.json my_scan.json # Edit my_scan.json with your targets
-
Run the scan:
python main.py my_scan.json
-
Import results into BloodHound!
Configuration Format
Create a JSON configuration file with your scan parameters:
{
"hosts": [
"127.0.0.1",
"192.168.1.0/24",
"scanme.nmap.org"
],
"ports": [22, 80, 443, 3389, 8080],
"output_file": "my_scan_results.json"
}
Configuration Options
| Field | Type | Description | Example |
|---|---|---|---|
hosts |
Array | List of IPs, hostnames, or CIDR subnets | ["10.0.0.1", "192.168.1.0/24"] |
ports |
Array/String | Ports to scan | [80, 443] or "1-1000" |
output_file |
String | Output filename (optional) | "results.json" |
What Gets Scanned?
For each discovered host, the tool captures:
- Host Information: IP address, hostname, state
- Operating System: Detected OS and accuracy
- Open Ports: All discovered open ports
- Services: Service names, products, versions
- BloodHound Properties: Everything formatted for graph analysis
Example Output
{
"nodes": [
{
"id": "web-server-01",
"kinds": ["Computer", "Server"],
"properties": {
"ip_address": "192.168.1.100",
"hostname": "web-server-01",
"state": "up",
"os_name": "Linux 3.2 - 4.9",
"open_ports": ["22/tcp", "80/tcp", "443/tcp"],
"port_count": 3,
"service_80_tcp_name": "http",
"service_443_tcp_name": "https"
}
}
]
}
Advanced Usage
Large Network Scanning
{
"hosts": ["10.0.0.0/16"],
"ports": "1-65535",
"output_file": "enterprise_scan.json"
}
Quick Service Discovery
{
"hosts": ["target.company.com"],
"ports": [21, 22, 23, 25, 53, 80, 110, 443, 993, 995, 3389],
"output_file": "service_discovery.json"
}
Safety Features
- Subnet Limits: Automatically limits subnet expansion to 1024 hosts
- Defensive Only: Built for security analysis and network documentation
- Error Handling: Graceful handling of network issues and invalid targets
Contributing
Contributions welcome! This tool is designed for defensive security purposes only. Please ensure all contributions align with this mission.
License
MIT License
Acknowledgments
- Nmap Team: For the incredible network scanning capabilities
- BloodHound Team: For revolutionizing attack path analysis
- Python-Nmap: For the excellent Python bindings
Happy Scanning! Remember to always scan responsibly and only on networks you own or have explicit permission to test!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bloodhound_nmap-0.1.2.tar.gz.
File metadata
- Download URL: bloodhound_nmap-0.1.2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac759ac87343b62b69bdc12fdf2ea727a0f7e8a8d7702bf03c233b105313cda7
|
|
| MD5 |
0ade7379c30b57deeb2873607372b3d4
|
|
| BLAKE2b-256 |
f1e6483d331e2a2f15070f3c2c151070e0ff53d06d3ccb6b914e244c8f9bef06
|
Provenance
The following attestation bundles were made for bloodhound_nmap-0.1.2.tar.gz:
Publisher:
publish-to-pypi.yml on rreichel3/bloodhound-nmap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bloodhound_nmap-0.1.2.tar.gz -
Subject digest:
ac759ac87343b62b69bdc12fdf2ea727a0f7e8a8d7702bf03c233b105313cda7 - Sigstore transparency entry: 423133482
- Sigstore integration time:
-
Permalink:
rreichel3/bloodhound-nmap@d768bddb16478a6e678cc2f69d0b643b9d5ab7b4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/rreichel3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d768bddb16478a6e678cc2f69d0b643b9d5ab7b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bloodhound_nmap-0.1.2-py3-none-any.whl.
File metadata
- Download URL: bloodhound_nmap-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cae8e3444560623eade453b18ef967fbee4f78b5a653b4867261fcc9796fb67d
|
|
| MD5 |
5e2c48b29c140e8f02662c8bbb09a106
|
|
| BLAKE2b-256 |
db66ed6a013589894915132dbfcce3fe65b2bd486cdd84a7ce4df8d826852382
|
Provenance
The following attestation bundles were made for bloodhound_nmap-0.1.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on rreichel3/bloodhound-nmap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bloodhound_nmap-0.1.2-py3-none-any.whl -
Subject digest:
cae8e3444560623eade453b18ef967fbee4f78b5a653b4867261fcc9796fb67d - Sigstore transparency entry: 423133497
- Sigstore integration time:
-
Permalink:
rreichel3/bloodhound-nmap@d768bddb16478a6e678cc2f69d0b643b9d5ab7b4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/rreichel3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d768bddb16478a6e678cc2f69d0b643b9d5ab7b4 -
Trigger Event:
push
-
Statement type: