NetVision is a Bash-based utility that automates network discovery, quick port scanning (with stealthy SYN scans and OS detection), and simple router analysis (including an attempt to detect router firmware). Additionally, it installs and starts netcat (on port 6666) and ngrok (TCP on port 6667, HTTP on port 80) for easy remote tunneling and local port listening.
🚀 Features
🔍 Network Discovery • Detects Local IP, Router IP, WAN IP, Subnet, MAC, DNS servers • ARP Table scan with device hostname, MAC, and IP • DNS Table extraction via SNMP, UPnP, brute-force
🔓 Router Analysis • Detects router make/model via login page scraping • Extracts router firmware via SNMP/UPnP/HTTP • Auto-SSH login attempts with default credentials
🛡 Security Assessment • CVE database lookup for known firmware vulnerabilities (offline) • Stealthy port scan & OS detection via nmap • Integrates with OpenVAS/Nessus for deeper scans • Firmware update checker using cached vendor data • Certificate health checks for HTTPS services • Configuration baseline alerts for risky router settings • MITRE ATT&CK technique correlation
🌐 Remote Tunneling • Starts netcat listener on port 6666 • Launches ngrok tunnels (TCP 6667, HTTP 80)
🧩 Extensible & Automated • Plugin-based scanning (drop files in plugins/) • JSON/TXT result exports for offline review • Simple GUI with Tkinter (web/src/gui.py) • Scan scheduling based on past results • Pushbullet alerts for critical events • GPU usage monitoring via nvidia-smi/rocm-smi
🗂 Output Files • open_ports.json, quick_scan.txt, discovered_ips.json, etc.
⸻
🔁 Feature Flowchart
flowchart TD
Start([Start NetVision])
Config[Load config.yaml & config.ini]
NetInfo[Collect local network info]
ARPScan[Scan ARP table for LAN devices]
DNSDiscover[Discover DNS entries via SNMP/UPnP]
RouterID[Detect router make/model]
FirmwareDetect[Extract firmware version]
CVELookup[Match firmware to local CVE DB]
SSHBrute[Try default router SSH credentials]
NmapScan[Run Nmap SYN scan + OS detect]
NetcatStart[Start Netcat (port 6666)]
NgrokStart[Start Ngrok (TCP 6667, HTTP 80)]
Export[Export results (JSON, TXT)]
Notify[Push alerts if issues]
GUI[Optional: Launch Tkinter GUI]
Start --> Config --> NetInfo
NetInfo --> ARPScan --> DNSDiscover --> RouterID --> FirmwareDetect
FirmwareDetect --> CVELookup --> SSHBrute
CVELookup --> NmapScan --> NetcatStart --> NgrokStart
NgrokStart --> Export --> Notify --> GUI
⸻
class ScanGUI {
<<Tkinter GUI>>
-cidr_entry: tk.Entry
-log_box: scrolledtext.ScrolledText
+__init__()
+create_widgets()
+start_scan()
+run_scan(cidr: string)
+append_log(text: string)
}
note for ScanGUI "Inherits from tk.Tk"
**Add auto-search** for firmware bugs and auto ssh with firmware default passwords
**Automate CVE Dialation** --> I have the code and every single CVE known to man (legally obtained); so figure a way to isolate IoT CVEs from what I have, and then automate discovery, test, enum phase.
**Plugin architecture** to easily extend scanning capabilities
**Offline results export** so findings can be reviewed without network access
- Support plugin-based extensions for new scanners and output formats
See
FEATURE_PROPOSAL.mdfor a detailed roadmap of these planned improvements.
-
Local Network Data
- Local IP, Router IP, WAN IP, DNS servers, Subnet mask, Router MAC, etc. (implemented in
web/src/network_info.py)
- Local IP, Router IP, WAN IP, DNS servers, Subnet mask, Router MAC, etc. (implemented in
-
ARP Table Scan
- Resolves device IPs, MAC addresses, and hostnames on the local LAN.
-
Router DNS Table
- Attempts to discover local DNS entries via SNMP, UPnP, and brute force DNS queries.
-
Router Make & Model
- Scrapes the router’s login page for common brand keywords.
-
Router Firmware Detection
- Tries SNMP (
snmpwalk), HTTP scraping, and UPnP for firmware strings.
- Tries SNMP (
-
Optional Firmware CVE Lookup
- Uses an offline CVE database to search for vulnerabilities in detected firmware.
-
Default Credential SSH Attempts
- Tries common username/password pairs when enabled to identify weak router security (see
web/src/router_ssh.py).
- Tries common username/password pairs when enabled to identify weak router security (see
-
Stealthy Quick Port Scan
- Uses nmap for a SYN scan on top 10 ports, plus OS detection (requires
sudo). - Saves open ports to both
.txtand.jsonfor easy review viaweb/src/quick_scan.py.
- Uses nmap for a SYN scan on top 10 ports, plus OS detection (requires
-
Netcat Listener
- Listens on port 6666 (handled by
web/src/net_services.py).
- Listens on port 6666 (handled by
-
Ngrok Tunnels
- TCP tunnel for port 6667
- HTTP tunnel for port 80 (spawned via
web/src/net_services.py)
-
Plugin System
- Drop new scanning modules into
plugins/and they load automatically.
- Drop new scanning modules into
-
Offline Results Export
- Save scan data to a JSON file for later review.
-
Desktop GUI
- Launch
web/src/gui.pyfor a basic Tkinter interface to run scans and view logs.
- Launch
-
Interactive Topology Map
- Zoomable D3.js visualization of hosts and connections.
-
External Scanner Integration
- Optional hooks for OpenVAS and Nessus to perform deeper vulnerability analysis.
-
Firmware Update Checks
- Compare detected router firmware with cached vendor data and alert when updates exist.
-
Adaptive Scan Scheduling
- Integration with masscan, arp-scan, hydra, gvm-cli, miniupnpc, nikto, sqlmap, and pgrok via a unified tool dispatcher.
- Schedule recurring scans that adjust frequency based on previous scores.
-
Mobile Notifications
- Push critical alerts via Pushbullet when configured.
-
Shodan Integration
- Import scan data from the Shodan API when a key is provided.
-
Wigle Wi-Fi Lookup
- Query Wigle's API to correlate router MAC addresses with nearby wireless networks.
-
Third-Party Scan Import
- Import results from Shodan or Censys to correlate with local findings.
-
Role-Based API Tokens
- Provide fine-grained permissions for automation scripts.
-
Centralized Result Dashboard
- Aggregate scans from multiple installations into a single view.
-
IPv6 Support
- Extend discovery and enumeration to cover IPv6 networks.
-
Plugin Marketplace
- Allow users to share and install community plugins securely.
-
Mobile App Companion
- Deliver alerts and summaries directly to Android/iOS devices.
- Automated Dependency Updates
- Check for outdated Python packages and plugins via CLI or API.
- Enhanced Report Generation
- Export scan summaries to HTML and PDF and schedule email delivery.
- 802.11 Wireless Scanning
- Map nearby Wi-Fi networks and optionally capture handshakes.
- PMKID Capture via hcxdumptool
- Collect WPA hashes for offline cracking.
- Container Security Auditing
- Scan container images for vulnerabilities and risky configurations.
- Network Inventory Integration
- Import external device data to enrich scan results.
- Real-Time Market Data Streaming
- Display exchange data live via WebSockets on the dashboard.
- Historical Backtesting Engine
- Replay saved data sets to evaluate scanning or trading strategies.
- Portfolio Tracking
- Monitor holdings and profit/loss alongside scan insights.
- iCloud Sync & Auto Update
- Sync preferences across macOS devices and notify on new releases.
- Bash (most Linux/Unix-based systems have it by default).
- curl, wget, or apt-get/yum for automatic installation (optional but recommended).
- sudo/root privileges to:
- Install packages.
- Run stealth scans (SYN) and OS detection reliably.
- Listen on privileged ports if needed (80).
- Internet Connection for:
- WAN IP detection.
- Downloading
ngrokif not already installed.
- Download or Clone this repository to your local machine.
Before running the program, ensure that you have set up the necessary configuration files. The application uses config.ini, config.yaml, and config.json.
-
Locate the Config Files:
config.ini,config.yaml, andconfig.jsonare all located in thewebdirectory.
-
Edit the Config Files:
- Open the files in a text editor of your choice and update the following variables:
In
config.ini:[jwt] secret_key = your-secret-key # Replace 'your-secret-key' with a strong, secure key
In
config.yaml:jwt: secret_key: "your-secret-key" # Replace 'your-secret-key' with a strong, secure key
In
config.json:{ "shodan_api_key": "your-shodan-key", "wigle": {"username": "user", "password": "pass"} } -
Variables to Adjust:
-
-
JWT Secret Key:
- Found in both
config.iniandconfig.yaml. - This must be a strong, unique key used for signing and verifying JWT tokens.
- Found in both
-
Database Path:
- In
config.ini, ensure thepathunder[database]points to the correct database file (default:smb_enum.db).
- In
-
Network CIDR:
- In
config.yaml, update thedefault_cidrundernetworkif your network's IP range differs from the default (192.168.1.0/24).
- In
-
Shodan API Key:
- In
config.json, setshodan_api_keyif you want to import results from Shodan.
- In
-
Wigle Credentials:
-
In
config.json, provide your Wigleusernameandpasswordunder thewiglesection. -
In
config.json, setshodan_api_keyto your personal API token to enable third-party scan imports.
-
-
-
Save Changes:
-
- After editing, save the files and ensure they remain in the
webdirectory.
- After editing, save the files and ensure they remain in the
- JWT Secret Key:
- This key is critical for securing your application. Never use the default key in a production environment.
- Environment-Specific Configurations:
- If deploying in different environments (e.g., development, testing, production), consider creating separate config files for each environment.
- Make the script executable:
chmod +x netvision.sh
- (Optional) Place it in a directory within your
$PATH, e.g.:sudo mv netvision.sh /usr/local/bin/netvision sudo chmod +x /usr/local/bin/netvision
After setting up the configuration files, you can run the application as follows:
python3 web/server/run.pyEnsure all dependencies are installed by running:
pip install -r requirements.txt- Run the script (ideally with
sudofor best results):or, if moved intosudo ./netvision.sh
$PATH:sudo netvision
- Watch the console output as NetVision:
- Installs missing dependencies (SNMP, nmap, netcat, miniupnpc, etc.)
- Displays local network info (IP, DNS, router details, etc.)
- Performs an ARP table scan and a router DNS table scan.
- Runs a quick stealth port scan on the router (top 10 ports), trying to detect the OS.
- Starts netcat on port 6666 and spawns ngrok tunnels (TCP on 6667, HTTP on 80).
Run individual scans or external API queries:
python3 -m web.src.cli scan 192.168.1.0/24 --intensity medium
python3 -m web.src.cli shodan-search "apache"Running a scan through the CLI automatically performs HTTPS certificate validation and compares the results against the configuration baseline. To generate a full report with these checks enabled run:
python3 -m web.src.cli scan 192.168.1.0/24 --intensity high > scan_results.jsonEach host entry in scan_results.json will include a certificate section
describing expiry and hostname matching along with any baseline_alerts
highlighting risky open management ports.
The Tkinter GUI provides a quick way to view the network topology. Launch it with:
python3 web/src/gui.pyAfter a scan finishes click Show Map to open an interactive D3.js view of the discovered hosts.
To export the map directly from the CLI you can use the helper functions in
web.src.network_map:
python3 - <<'EOF'
from web.src.network_map import build_topology, export_d3_html
hosts = ['192.168.1.2']
graph = build_topology(hosts, router_ip='192.168.1.1')
export_d3_html(graph, 'topology.html')
EOFOpen topology.html in your browser to explore the network graph.
NetVision tries to detect the router’s firmware version in the following order:
- SNMP (if enabled on the router):
- It runs
snmpwalk -v2c -c public <router_ip> 1.3.6.1.2.1.1.1.0to see if a firmware string is exposed in the system description OID.
- It runs
- HTTP:
- It makes a
curlrequest tohttp://<router_ip>and searches for a text pattern like “Firmware Version”.
- It makes a
- UPnP:
- If available, it runs
upnpc -lto see if the router exposes a firmware string in UPnP device descriptions.
- If available, it runs
- Fallback:
- If none of the above yield a match, NetVision prints
Unknown (Check router web interface manually).
- If none of the above yield a match, NetVision prints
Note: Consumer routers are inconsistent in how (or if) they expose firmware details. This step often fails on locked-down or custom routers.
- ARP Table:
- Runs
arp -ato list discovered devices, extracts IP and MAC, attempts to resolve hostnames vianslookup, and prints them in a neat table. - Results are optionally saved to
discovered_ips.txt/.json.
- Runs
- Router DNS Table:
- Uses SNMP, UPnP, and a DNS brute force approach (with
nslookup) to look for local DNS records the router might know about. - Very dependent on the router’s capabilities and can be hit or miss.
- Uses SNMP, UPnP, and a DNS brute force approach (with
- Nmap:
- NetVision uses
sudo nmap -sS -n --top-ports 10 -O --osscan-limit --osscan-guessto scan the router IP (or any target). - SYN Stealth Scan (
-sS) sends SYN packets without completing TCP handshakes, which is often less conspicuous. - OS Detection (
-O) tries to guess the remote operating system.- This step can be inconclusive if the router has few open ports or unusual TCP behavior.
- Writes raw scan output (including potential OS guess) to
quick_scan.txt. - Parses open ports to
open_ports.txtandopen_ports.json.
- NetVision uses
- Netcat:
- Listens in the background on TCP port 6666.
- You can manually connect to it (e.g.,
nc <ip> 6666) for testing.
- Ngrok:
- Downloads if not found, then runs two separate processes in the background:
ngrok tcp 6667: Creates a publicly accessible TCP tunnel to your local machine’s port 6667.ngrok http 80: Creates a publicly accessible HTTP tunnel to your local machine’s port 80.
- If you have a web server on port 80, you may need to stop it, or change ports to avoid conflicts.
- For a stable, authenticated tunnel, add your ngrok auth token in the script’s commented section.
- Downloads if not found, then runs two separate processes in the background:
quick_scan.txt- Contains the raw output of the Nmap top-ports scan with OS detection, plus any notes about ping success/failure.
open_ports.txt/open_ports.json- Lists the open TCP ports discovered among the top 10.
- The JSON file uses the format:
[ { "port": "22" }, { "port": "80" } ]
discovered_ips.txt/discovered_ips.json- From the ARP table parsing, each IP discovered is stored in both text and JSON.
router_dns_table.txt/router_dns_table.json- Attempts to summarize local DNS entries your router may know.
router_dns_table.txt,router_dns_table.json- Summarize any found local DNS mappings via SNMP, UPnP, or fallback DNS brute force.
Use the provided runtests.sh script to run the basic unit tests:
./runtests.shThe tests currently verify that the plugin loader works correctly. More tests will be added as the project grows.
The primary README file for the RoutR_MauraDr project has been located. I will now write a section to update the end user with the new installation and configuration instructions, including reminders about filling in critical variables like the JWT secret key.
Enjoy exploring and testing your network with NetVision! For questions or suggestions, feel free to open an issue or send a pull request.