NetSpear is an advanced modular cybersecurity assessment framework engineered for authorized penetration testing, network reconnaissance, and controlled security research environments.
Built by OpenNET LLC, NetSpear v2.0 integrates automated reconnaissance, web-layer analysis, vulnerability detection, reporting, controlled exploitation helpers, and comprehensive post-exploitation capabilities into a single streamlined toolkit leveraging Nmap, Metasploit, Hydra, Scapy, and custom-developed modules.
LEGAL NOTICE
NetSpear may ONLY be used on systems you own or have explicit written authorization to test.
Misuse may violate local and international law. The authors and OpenNET LLC accept no liability for unlawful use.
NetSpear v2.0 introduces major enhancements including:
- Database Persistence - SQLite/PostgreSQL storage for all scan data, vulnerabilities, and sessions
- REST API - Full REST API for automation and integration
- Session Management - Track and manage active exploitation sessions
- Credential Management - Secure, encrypted credential storage and reuse
- Post-Exploitation Framework - Comprehensive post-exploitation capabilities
- Workflow Automation - Playbook system for automated assessments
- Network Topology Mapping - Visual network relationship mapping
- Vulnerability Prioritization - CVSS scoring and risk-based prioritization
- Evidence Collection - Screenshot capture and PoC storage
- Cloud Enumeration - AWS, GCP, and Azure resource discovery
- Scan Scheduling - Automated time-based scanning
- Notification System - Multi-channel alerts (Email, Slack, Teams)
- Scanner Integration - Import from Nessus, OpenVAS, Burp Suite
- Cleaner UI - Collapsible menu sections for better organization
- Interactive, menu-driven NetSpear Network Analyzer CLI with collapsible sections
- Scan profiles:
quick,full,vuln,stealth,deep - Scan modes: Safe Scan, Stealth Scan, Standard Scan, Fast Scan, Full Scan
- Multi-target threaded scans
- Optional rustscan/masscan prescan for high-speed discovery
- Automatic Nmap service detection
- CVE extraction + vulnerability mapping
- Metasploit exploit helper (module suggestions + payload hints)
- Payload generator (Windows, Linux, macOS, Android, raw shellcode)
- Web enumeration pipeline: WhatWeb, Wappalyzer, WAFW00F, ffuf/gobuster/feroxbuster, nuclei
- OSINT mode with GeoIP + HTTP fingerprinting (+ optional SpiderFoot)
- Hydra brute-force helpers (SSH, FTP)
- HTML + JSON reporting with exposure score, anomaly detection, tech highlights
- Environment-variable configuration (override tool paths, presets)
- Privilege checks, safety prompts, and structured logging
- Database Persistence - Store all scan results, vulnerabilities, and historical data
- REST API - Full REST API with FastAPI for automation and CI/CD integration
- Session Management - Track active Meterpreter, shell, and SSH sessions
- Credential Management - Encrypted credential storage with reuse and spraying capabilities
- Post-Exploitation - System enumeration, privilege escalation, persistence, lateral movement
- Workflow Automation - JSON-defined playbooks with conditional execution
- Network Topology - Automatic network mapping with relationship visualization
- Vulnerability Prioritization - CVSS scoring, risk assessment, and remediation priorities
- Evidence Collection - Screenshot capture, PoC storage with SHA-256 hashing
- Cloud Enumeration - AWS S3, GCP Storage, Azure resource discovery
- Scan Scheduling - Interval, cron, and one-time scheduled scans
- Notification System - Email, Slack, Teams, and webhook notifications
- Wordlist Management - Custom wordlist creation and categorization
- Scanner Integration - Import vulnerabilities from Nessus, OpenVAS, Burp Suite
pip install -r NetSpear/requirements.txtCore Requirements:
scapy- Network packet manipulationpython-nmap- Nmap Python interfacesqlalchemy>=2.0.0- Database ORMfastapi>=0.104.0- REST API frameworkuvicorn[standard]>=0.24.0- ASGI serverpydantic>=2.0.0- Data validationcryptography>=41.0.0- Credential encryptionapscheduler>=3.10.0- Task schedulingrequests>=2.31.0- HTTP requestspyyaml>=6.0- YAML configurationselenium>=4.15.0- Screenshot capture (optional)boto3>=1.29.0- AWS integration (optional)psycopg2-binary>=2.9.0- PostgreSQL support (optional)
Required:
nmap- Network scanning
Recommended:
msfvenom,msfconsole- Metasploit frameworkhydra- Password brute-forcingwhatweb- Web technology detectionwappalyzer- Web application analysiswafw00f- WAF detectionnuclei- Vulnerability scannerffuf/gobuster/feroxbuster- Directory enumerationsqlmap- SQL injection testingrustscanormasscan- High-speed port scanningsfcli- SpiderFoot CLI for OSINT
Environment Variable Overrides:
NMAP_PATH, MSFCONSOLE_PATH, MSFVENOM_PATH, HYDRA_PATH, GOBUSTER_PATH,
FFUF_PATH, MASSCAN_PATH, RUSTSCAN_PATH, NUCLEI_PATH, WHATWEB_PATH,
WAPPALYZER_PATH, FEROXBUSTER_PATH, WAFW00F_PATH, SQLMAP_PATH, SPIDERFOOT_PATH
- Clone the repository and run the installer:
git clone https://github.com/<your-user>/NetSpear.git
cd NetSpear
chmod +x install.sh
./install.sh- macOS/Linux: Installs tools via Homebrew/apt/pacman when available, pip installs Python dependencies, and creates a
netspearlauncher in/usr/local/binor~/.local/bin - Windows: Run from Git Bash/WSL/PowerShell. If
wingetis present, the script uses it for packages; createsnetspear.cmdin~/AppData/Local/Microsoft/WindowsApps(or~/bin). Add that folder to PATH if needed.
- Run from anywhere:
netspearNetSpear includes an automated update script that fetches the latest version from the GitHub repository.
Quick Update:
cd NetSpear
chmod +x update.sh
./update.shThe update script will:
- Check for prerequisites (Git)
- Verify repository connection
- Backup any uncommitted changes
- Fetch latest updates from the repository
- Show what changes will be applied
- Update Python dependencies
- Verify the installation
Features:
- Automatic backup of uncommitted changes
- Safe update process with confirmation prompts
- Dependency updates included
- Works with both fresh installations and existing clones
Manual Update (Git):
cd NetSpear
git pull origin main
pip install -r NetSpear/requirements.txt- Clone the Repository
git clone https://github.com/<your-user>/NetSpear.git
cd NetSpear- Create Virtual Environment (Recommended)
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install Python Dependencies
pip install -r NetSpear/requirements.txt- Install External Tools
Use your system's package manager:
- Debian/Ubuntu:
sudo apt install nmap metasploit-framework hydra - macOS:
brew install nmap - Arch Linux:
sudo pacman -S nmap
NetSpear is actively developed and receives regular updates. Always use the update script to get the latest features and security improvements.
Update Script:
./update.shThe script handles everything automatically including:
- Fetching latest code from the repository
- Preserving your local changes (with backup)
- Updating Python dependencies
- Verifying the installation
Repository: https://github.com/MajdKZ1/NetSpear.git
python3 NetSpear/main.pypython3 NetSpear/main.py --target 192.168.1.10 --scan-type vuln --stealthAvailable Flags:
--target <IP>- Target IP address--scan-type <type>- Scan type:quick,full,vuln,stealth,deep--stealth- Enable stealth mode--proxy <url>- Proxy URL (e.g.,socks5://127.0.0.1:9050)
Help:
python3 NetSpear/main.py -hStart the REST API server from the menu (option 62) or directly:
from NetSpear.api import run_api_server
from NetSpear.main import NetSpearNetworkAnalyzer
analyzer = NetSpearNetworkAnalyzer()
run_api_server(host="127.0.0.1", port=8000, analyzer=analyzer)API Documentation available at: http://127.0.0.1:8000/docs
NetSpear v2.0 features a clean, collapsible menu interface. Sections can be expanded/collapsed for better organization.
[ 1 — RECONNAISSANCE ]
01. Passive Reconnaissance (OSINT)
02. Active Reconnaissance (Network Scan)
03. Comprehensive Target Analysis
04. OSINT Intelligence Gathering
[ 2 — SCANNING ]
10. Quick Port Scan
11. Comprehensive Port Scan
12. Vulnerability Assessment
13. Stealth Port Scan
14. Multi-Target Scan
[ 3 — EXPLOITATION & TESTING ]
20. Generate Payloads
21. Generate Payload Pack (mode-aware)
22. Credential Testing (mode-aware)
[3+] ▶ Show Advanced Exploitation
[ 4 — REPORTING ]
30. Generate Report
31. View Gathered Intelligence
[4+] ▶ Show Advanced Reporting
[ 5 — CONFIGURATION / SYSTEM ]
40. Configure Scan Mode
41. Reset Target
42. Plugin Management (BETA)
43. Create Config File
[5+] ▶ Show Advanced Features (BETA)
00. Exit
To view advanced options, type the section expander code:
- Type
3+- Show/hide Advanced Exploitation (SYN Flood, MAC Spoofing, ARP/DNS Poisoning) - Type
4+- Show/hide Advanced Reporting (Archive, Clear Reports) - Type
5+- Show/hide Advanced Features (BETA):-
- Session Management (BETA)
-
- Credential Management (BETA)
-
- Post-Exploitation (BETA)
-
- Workflow Automation (BETA)
-
- Vulnerability Prioritization (BETA)
-
- Network Topology (BETA)
-
- Evidence Collection (BETA)
-
- Cloud Enumeration (BETA)
-
- Scan Scheduling (BETA)
-
- Notifications (BETA)
-
- Wordlist Management (BETA)
-
- Scanner Integration (BETA)
-
- Start API Server (BETA)
-
NetSpear supports YAML and JSON configuration files. Create one using menu option 43 or manually:
Configuration File Locations (searched in order):
~/.netspear/config.yaml~/.netspear/config.json./netspear.yaml./netspear.jsonNetSpear/config.yamlNetSpear/config.json
Example Configuration (~/.netspear/config.yaml):
version: "2.0"
tool_paths:
nmap: "nmap"
msfvenom: "msfvenom"
hydra: "hydra"
reports_dir: "~/.netspear/reports"
max_workers: 8
max_scan_timeout: 300
logging:
level: "INFO"
format: "text" # or "json"
file: "~/.netspear/netspear.log"
scan_defaults:
mode: "SAFE"
stealth: false
database:
url: null # null for SQLite, or "postgresql://user:pass@host/db"
path: "~/.netspear/netspear.db"SQLite (Default):
- Automatically created at
~/.netspear/netspear.db - No additional setup required
PostgreSQL:
export NETSPEAR_DB_URL="postgresql://user:password@localhost/netspear"NetSpear v2.0 includes comprehensive database persistence:
- Scans - Complete scan results with timestamps
- Ports - Port scan data with service versions
- Vulnerabilities - CVE data with severity and CVSS scores
- Credentials - Encrypted credential storage
- Sessions - Active exploitation sessions
- Network Topology - Network relationships and connections
- Evidence - Screenshots and proof-of-concept files
- Workflows - Workflow definitions and execution history
- Notifications - Alert history
The database is automatically initialized on first run. Access via the API or through the menu system.
NetSpear v2.0 includes a full REST API for automation:
GET /- API informationGET /health- Health checkPOST /api/v1/scans- Create and execute scanGET /api/v1/scans- List all scansGET /api/v1/scans/{uuid}- Get scan detailsGET /api/v1/vulnerabilities- List vulnerabilitiesPOST /api/v1/credentials- Add credentialGET /api/v1/credentials- List credentialsGET /api/v1/sessions- List active sessionsPOST /api/v1/workflows- Create workflowPOST /api/v1/workflows/{uuid}/execute- Execute workflow
Interactive API documentation available at /docs when the API server is running.
Track and manage active exploitation sessions:
- Create session records for Meterpreter, shell, SSH sessions
- Execute commands and log output
- System enumeration through sessions
- Session lifecycle management
Secure credential storage with encryption:
- Encrypted password storage using Fernet
- Credential reuse across scans
- Credential spraying support
- Password analysis and statistics
Comprehensive post-exploitation capabilities:
- System enumeration (OS, network, users, processes)
- Privilege escalation detection
- Persistence establishment
- Lateral movement support
- Data exfiltration
JSON-defined playbooks:
- Chain multiple operations
- Conditional execution
- Parallel task execution
- Workflow execution tracking
Automatic network relationship mapping:
- Build topology from scan data
- Visualize network relationships
- Find attack paths between hosts
- Export to JSON, DOT, GraphML formats
Risk-based vulnerability prioritization:
- CVSS score calculation
- Risk score with asset criticality
- Remediation priority ranking
- Batch prioritization
NetSpear/
├── main.py # Main CLI entry point
├── database.py # Database models and persistence
├── api.py # REST API endpoints
├── session_manager.py # Session management
├── credential_manager.py # Credential management
├── post_exploitation.py # Post-exploitation framework
├── workflow_engine.py # Workflow automation
├── vulnerability_scorer.py # Vulnerability prioritization
├── topology_mapper.py # Network topology mapping
├── evidence_collector.py # Evidence collection
├── cloud_enumeration.py # Cloud platform enumeration
├── scheduler.py # Scan scheduling
├── notifier.py # Notification system
├── wordlist_manager.py # Wordlist management
├── scanner_integration.py # External scanner integration
├── network_scanning.py # Nmap engine + prescan logic
├── payloads.py # Payload generator
├── attacks.py # Offensive modules
├── exploits.py # Exploit mapper + MSF integration
├── reporting.py # HTML/JSON report builder
├── enhanced_recon.py # Enhanced reconnaissance
├── config_loader.py # Configuration management
├── structured_logging.py # Structured logging system
├── progress_tracker.py # Progress tracking
├── error_handler.py # Error handling utilities
├── plugin_system.py # Plugin architecture
├── utils.py # Helper functions
├── config.py # Tool paths and defaults
├── requirements.txt # Python dependencies
├── update.sh # Update script for latest version
├── install.sh # Installation script
├── plugins/ # Plugin directory
├── Reports/ # Generated reports
└── templates/ # Report templates
Quick Scan:
-F -T5 --max-rtt-timeout 50ms
Full Scan:
-p- -A -T5 --osscan-guess
Vulnerability Scan:
--script=vuln -T5 --min-rate 3000
Stealth Scan:
-sS -T2 --max-retries 1 -Pn --spoof-mac 0
Deep Scan:
-sV -sC -O -T5 --min-rate 2000
- Credentials are encrypted using Fernet symmetric encryption
- IMPORTANT: Change the default encryption key in production
- Encryption key should be stored securely (environment variable or key management system)
- SQLite databases should have proper file permissions (600)
- PostgreSQL should use strong authentication
- Database files contain sensitive information - secure appropriately
- REST API currently has no authentication - add authentication in production
- Use HTTPS in production environments
- Implement rate limiting and access controls
NetSpear supports plugins for extending functionality. See PLUGINS.md for plugin development guide.
Plugin types:
- ReconPlugin - Extend reconnaissance capabilities
- ScanPlugin - Add custom scanning methods
- ReportPlugin - Custom report formats
NetSpear generates comprehensive reports in multiple formats:
-
HTML Reports - Dark mode, interactive, includes:
- Exposure scores
- Open ports and services
- CVE information
- Web anomalies
- Recommendations
- Network topology (when available)
-
JSON Reports - Machine-readable format for automation
Reports are stored in the Reports/ directory and can be archived automatically.
If database initialization fails:
- Check file permissions on
~/.netspear/directory - For PostgreSQL, verify connection string and permissions
- Check logs in
~/.netspear/netspear.log
If API server fails to start:
- Check if port 8000 is available
- Verify FastAPI and uvicorn are installed
- Check firewall settings
- Verify external tools are installed and in PATH
- Use environment variables to override tool paths
- Check configuration file tool_paths section
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
See License file for details.
© OpenNET LLC — Cybersecurity Division
Advanced tools for secure networks, enterprise defense, and professional penetration testing.
If you use NetSpear in research or assessments, please attribute:
"NetSpear Network Analyzer v2.0 — OpenNET LLC"
CONFIG.md- Configuration guidePLUGINS.md- Plugin development guideCHANGELOG_v2.0.md- Version 2.0 changelogIMPLEMENTATION_SUMMARY.md- Feature implementation summary
Features marked with (BETA) are experimental and may have limitations:
- Session Management
- Credential Management
- Post-Exploitation Framework
- Workflow Automation
- Vulnerability Prioritization
- Network Topology
- Evidence Collection
- Cloud Enumeration
- Scan Scheduling
- Notifications
- Wordlist Management
- Scanner Integration
- REST API
These features are actively developed and may change in future versions.
NetSpear v2.0 - Taking Network Security Assessment to the Next Level