Skip to content

Repository files navigation

NetzSchild

NetzSchild

Home Network Security Scanner & Risk Assessment Tool

Bandit Security Scan Trivy Dependency Scan Gitleaks Secret Scan
Python 3.10+ FastAPI MIT License

NetzSchild scans your local Wi-Fi network, identifies connected devices,
evaluates security risks, and estimates Time-to-Compromise (TTC) β€” all locally, with zero cloud dependency.


πŸ“Έ Screenshots

Dashboard β€” Risk Score gauge, Time-to-Compromise, device stats, and risk breakdown
Dashboard β€” Real-time risk overview with animated gauge and risk breakdown

Devices β€” Full inventory with per-device risk scores, open ports, and TTC
Devices β€” Per-device security assessment with interactive port info

Scan β€” Choose between Fast Scan, Deep Scan (nmap), or Ping-Only
Scan β€” Multiple scan modes with auto-detected network range


✨ Features

Feature Description
🎯 Risk Score (0–100) Weighted risk model based on 9 security factors
⏱️ Time-to-Compromise Estimated time an attacker would need: < 1 hour β†’ > 7 days
πŸ” Network Scanner Discovers devices via Ping, ARP, SSDP/UPnP, and optional nmap
🌐 Web Dashboard Apple-inspired UI with real-time scanning, device inventory, and risk breakdown
πŸ’» CLI Interface Interactive terminal launcher with multilingual support (EN / DE / UA)
πŸ”’ 100% Local All data stays on your machine β€” zero cloud, zero telemetry
πŸ“Š Reports Auto-generated CSV & HTML reports with per-device security advice
πŸ›‘οΈ Security CI/CD Automated Bandit, Trivy, and Gitleaks scans on every push
πŸ‡¬πŸ‡§πŸ‡©πŸ‡ͺπŸ‡ΊπŸ‡¦ Multilingual Full i18n support for English, German, and Ukrainian

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     NetzSchild                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   CLI Mode   β”‚   Web Dashboard  β”‚    Risk Engine         β”‚
β”‚              β”‚   (FastAPI)      β”‚                        β”‚
β”‚ netzschild   β”‚                  β”‚  netzschild_risk.py    β”‚
β”‚ _cli.py      β”‚  web/app.py      β”‚  factors.json          β”‚
β”‚              β”‚  web/templates/  β”‚                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                  Network Scanner                         β”‚
β”‚         net_scan_agent.py  Β·  tr064_fritz.py             β”‚
β”‚   Ping β”‚ ARP β”‚ SSDP/UPnP β”‚ Port Scan β”‚ nmap (optional)  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                  Report Generator                        β”‚
β”‚              integrate_scan_and_risk.py                  β”‚
β”‚                CSV + HTML output                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Python 3.10+
  • (Optional) nmap for deep scans

Installation

git clone https://github.com/orelsv/NetzSchild.git
cd NetzSchild
python3 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Option A: Web Dashboard

python -m uvicorn web.app:app --host 127.0.0.1 --port 8000

Open http://127.0.0.1:8000 in your browser.

Option B: CLI Mode

python netzschild_cli.py

Follow the interactive menu to scan your network and compute your Risk Score.

Option C: Quick Risk Score (no UI)

from netzschild_risk import calculate_risk_and_ttc

user_data = {
    "password_strength": 0.3,
    "encryption": "WPA2",
    "open_ports": ["22", "80"],
    "default_credentials": False,
    "firmware_age": 0.5,
    "iot_count": 3,
    "guest_network": "enabled_isolated",
    "remote_management": False,
    "upnp": True
}

result = calculate_risk_and_ttc("factors.json", user_data)
print(f"Risk Score: {result['risk_score']}/100")
print(f"Time to Compromise: {result['ttc']}")

🧠 Risk Model

NetzSchild uses a weighted-factor model defined in factors.json. Each factor contributes to the overall Risk Score (0–100):

Factor Weight Description
WiFi Password Strength 15% Length and complexity of your Wi-Fi password
WiFi Encryption 15% WPA3 β†’ WEP/None (protocol strength)
Open Ports & Services 18% Critical ports (Telnet, SMB, RDP) and high-risk services
Default Credentials 12% Whether factory login/password is still in use
Firmware Age 12% How outdated the router/device firmware is
IoT Device Exposure 8% Number of IoT devices on the network
Guest Network 7% Whether guest Wi-Fi is enabled with proper isolation
Remote Management 8% WAN admin access enabled on the router
UPnP 5% Whether UPnP allows auto-opening of ports

Time-to-Compromise Bands

Risk Score TTC Estimate Severity
0 – 20 > 7 days 🟒 Low
21 – 40 1 – 7 days 🟑 Medium-Low
41 – 70 1 – 24 hours 🟠 Medium-High
71 – 100 < 1 hour πŸ”΄ High

πŸ“ Project Structure

NetzSchild/
β”œβ”€β”€ netzschild_cli.py           # Interactive CLI launcher (EN/DE/UA)
β”œβ”€β”€ netzschild_risk.py          # Risk Score & TTC calculation engine
β”œβ”€β”€ net_scan_agent.py           # Network scanner (ping, ARP, SSDP, ports, nmap)
β”œβ”€β”€ integrate_scan_and_risk.py  # Report generator (CSV + HTML)
β”œβ”€β”€ tr064_fritz.py              # FRITZ!Box TR-064 integration
β”œβ”€β”€ factors.json                # Risk model configuration (weights & rules)
β”œβ”€β”€ requirements.txt            # Python dependencies
β”‚
β”œβ”€β”€ web/                        # 🌐 Web Dashboard (FastAPI)
β”‚   β”œβ”€β”€ app.py                  # Main FastAPI application & routes
β”‚   β”œβ”€β”€ scanner.py              # Async scanner service
β”‚   β”œβ”€β”€ risk_service.py         # Risk computation for web UI
β”‚   β”œβ”€β”€ security_kb.py          # Security knowledge base (port explanations)
β”‚   β”œβ”€β”€ templates/              # Jinja2 HTML templates
β”‚   β”‚   β”œβ”€β”€ base.html           # Base layout with sidebar navigation
β”‚   β”‚   β”œβ”€β”€ dashboard.html      # Risk gauge, stats, risk breakdown
β”‚   β”‚   β”œβ”€β”€ devices.html        # Device inventory table
β”‚   β”‚   β”œβ”€β”€ scan.html           # Scan configuration & progress
β”‚   β”‚   └── settings.html       # Language & privacy settings
β”‚   └── static/
β”‚       β”œβ”€β”€ css/style.css       # Apple-inspired design system
β”‚       └── js/app.js           # Client-side interactivity
β”‚
β”œβ”€β”€ .github/workflows/          # πŸ”’ CI/CD Security Pipelines
β”‚   β”œβ”€β”€ bandit.yml              # Python static security analysis
β”‚   β”œβ”€β”€ trivy-deps.yml          # Dependency vulnerability scanning
β”‚   └── gitleaks.yml            # Secret detection in git history
β”‚
β”œβ”€β”€ docs/screenshots/           # πŸ“Έ README screenshots
β”œβ”€β”€ LICENSE                     # MIT License
β”œβ”€β”€ CONTRIBUTING.md             # Contribution guidelines
└── SECURITY.md                 # Security policy

πŸ”’ Security & Privacy

  • All computations run locally on your machine
  • No data is sent to external servers or cloud services
  • Scan results (IPs, MACs, device names) are stored only locally
  • No telemetry is collected by default
  • NetzSchild is a diagnostic tool β€” it never modifies your network settings

CI/CD Security Pipeline

Every push triggers three automated security scans:

Scanner Purpose Blocks on
Bandit Python static security analysis HIGH severity + HIGH confidence
Trivy Dependency vulnerability scanning CRITICAL vulnerabilities
Gitleaks Secret detection in code & git history Any detected secret

πŸ› οΈ Tech Stack

  • Backend: Python 3.10+, FastAPI, Uvicorn
  • Frontend: Jinja2 templates, vanilla CSS (Apple-inspired design system), vanilla JS
  • Scanning: ICMP ping, ARP, SSDP/UPnP, TCP port scan, nmap (optional)
  • Router Integration: TR-064 protocol (FRITZ!Box)
  • CI/CD: GitHub Actions (Bandit, Trivy, Gitleaks)

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

πŸ“„ License

This project is licensed under the MIT License.


Made with πŸ›‘οΈ by orelsv

About

πŸ›‘οΈ Home network security scanner - scans your Wi-Fi, finds vulnerabilities, and estimates Time-to-Compromise. 100% local.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages