NetWatch: Your Network, Live in the Terminal — Rust-Powered TUI Network Monitor, Packet Inspection & Threat Detection
Most network tools answer one question: “What’s eating my bandwidth?” Then they stop. Anyone who has debugged a flaky connection, chased an unverified outbound connection from a background daemon, or explained sudden latency spikes to an incident response team knows that bandwidth consumption is only the first question of about ten.
Enter NetWatch—an open-source, terminal-based network monitor written in Rust that keeps going where traditional monitors give up. It decodes the protocols on the wire, names the specific binary and process ID behind each connection, and actively monitors for malicious anomalies: port sweeps, command-and-control (C2) beaconing, and covert DNS data exfiltration.
NetWatch ships as a single zero-dependency binary, requires no initial configuration files, and runs across macOS, Linux, and Windows. With over 2,700 GitHub stars and an MIT license, it represents an essential utility for modern sysadmins, site reliability engineers (SREs), and security defenders.
Getting Started: Zero-Config Deployment in Five Seconds
Installation is a frictionless one-liner across modern package managers:
Once installed, launch it straight from your shell:
That is the entirety of the setup. You switch views using the number keys, press ? for context-aware help, and press q to exit. On Linux servers, administrators can bypass root execution entirely by granting raw capture capabilities directly to the binary:
sudo setcap cap_net_raw,cap_net_admin=eip $(which netwatch)
Note for Windows environments: NetWatch requires the driver layer from Npcap to capture live packets on Windows network adapters.
One Tool, Three Ergonomic Sizes
The core architectural design pattern of NetWatch is adaptive density. Rather than isolating metrics into disconnected utilities, NetWatch scales to the question you are asking while sharing the exact same underlying telemetry collectors across all view states. Switching between layouts costs a single keystroke (V) and loses zero historical sample data.
1. Lite View (--lite)
Engineered to fit standard 80×24 terminals. Tailor-made for quick SSH sessions into edge nodes, Raspberry Pis, or tight tmux window splits.
• Gateway/DNS reachability
• Top talkers by process and host
• Only six navigation keys to learn
2. Full Forensic View
A complete ten-tab command console designed for in-depth incident response and network forensics.
• Packets, Stats, Topology, Timeline
• Processes, Insights, and Egress
• Real-time layer-7 protocol dissection
3. Dense View (--view dense)
Optimized for ultra-wide command center displays (130×44+). Strips all status bars and borders for pure information density.
• Download plots up; upload plots down
• Visual burst pattern recognition
• Zero chrome, 100% telemetry canvas
The Breakthrough Capabilities That Set NetWatch Apart
1. Decrypting Controlled TLS 1.3 Sessions Live
Inspecting modern encrypted payloads usually forces engineers to deploy heavyweight reverse proxies or install intrusive enterprise CA certificates. NetWatch eliminates this friction by supporting the standard SSLKEYLOGFILE interface native to Chromium, Firefox, OpenSSL, and curl.
When you point an application’s key log to NetWatch, it parses and decrypts TLS 1.3 packets in real-time right inside the Packets tab. There is zero man-in-the-middle proxy, no altered certificate trust stores, and no TLS downgrade attacks.
Security Boundary: NetWatch can only decrypt sessions where your client process explicitly exports ephemeral cryptographic secrets. It cannot and will not decrypt unauthorized third-party traffic or untrusted malware streams.
2. Egress Drift Detection: Learn, Promote, Warn
Standard perimeter firewalls enforce binary IP and port rules: allow TCP 443 outbound, drop everything else. But modern attacks rarely use weird ports; malware communicates over port 443 just like legitimate API queries.
NetWatch introduces an innovative capability that traditional terminal monitors lack: Egress Drift Detection. NetWatch continuously records every destination each local executable contacts, tracking:
- The Server Name Indication (SNI) extracted from the TLS
ClientHello. - The Autonomous System Number (ASN) governing the IP block.
- The destination port and protocol.
Once a process exhibits steady-state behavior during normal testing, hitting P automatically promotes that baseline into an immutable egress policy. From that second forward, NetWatch raises immediate visual alerts if that binary attempts to dial an unexpected host.
| Verdict Flag | Technical Meaning | Incident Context |
|---|---|---|
| ✓ sni / ✓ ip | Exact Hostname / IP Match | The destination matches declared baseline rules precisely. |
| ~ asn | Autonomous System Match | Matched only by ASN. Warns that hyperscalers (AWS, Cloudflare) host millions of distinct workloads. |
| ? ech | Encrypted ClientHello | Host name is cryptographically masked by design. Denotes “cannot judge,” not inherently malicious. |
| ✗ drift | Egress Policy Violation | Declared process reached an endpoint completely outside its known baseline. |
| ✗ undeclared | Strict Mode Anomaly | An uninventoried binary started initiating outbound sockets without prior clearance. |
3. JA4 Fingerprinting & Autonomous Threat Detection
Malicious implants frequently rotate domain names and proxy IP addresses to defeat static indicator of compromise (IoC) lists. NetWatch tackles this through JA4 Fingerprinting. JA4 hashes TLS and QUIC negotiation parameters (ciphers, extensions, elliptic curves) into a deterministic string. Because malware libraries use distinct handshake signatures, you can pivot on a single JA4 hash inside the UI to instantly reveal every other network flow originating from that same software package.
Alongside JA4 fingerprinting, NetWatch runs passive detection engines for:
- C2 Beaconing: Algorithms analyze socket connection intervals, flagging high-frequency check-ins with suspiciously low jitter.
- DNS Tunneling: Automatically alerts on anomalous query length, entropy, and unusual record lookups (TXT/NULL exfiltration).
- Internal Port Scans: Rapid TCP SYN sweeps across subnet ranges trigger instantaneous visual warnings.
4. eBPF Process Attribution and the Flight Recorder
On Linux, NetWatch leverages optional eBPF kprobes (falling back to ss/lsof polling and macOS PKTAP). While polling easily misses ephemeral connections that open and close in sub-millisecond windows, eBPF captures kernel-level socket creation in real-time, mapping each packet to its owning PID, parent command, and user.
When an alert fires or an operator spots an anomaly, NetWatch’s Flight Recorder allows you to freeze the entire telemetry envelope into a self-contained bundle. Rather than handing a security analyst an unadorned PCAP file, the bundle includes:
- Layer 2 through Layer 7 raw PCAP stream.
- Correlated OS-level process attribution (PID, binary path, CLI args).
- DNS cache state and active latency probe metrics at that exact moment.
- Associated JA4 fingerprints and triggered threat classification rules.
Under the Hood: High-Throughput Packet Pipeline & Sandboxing
NetWatch processes live network traffic through a zero-copy decoding hierarchy implemented in safe Rust:
↓
Per-Flow Stream Tracking • Handshake Timing • TLS 1.3 Decryption • JA4 Fingerprint • Threat Detection
Safe by Design: Because any utility that ingests untrusted packets from the network represents an attack vector, NetWatch minimizes its privilege footprint. After binding capture sockets, the binary drops elevated privileges. On Linux, it locks its runtime inside a Landlock LSM sandbox. Even if a hostile malformed packet exploited a parser flaw, the sandboxed process is physically restricted from reading private SSH keys, web browser profiles, or /etc/shadow.
Engineering Evaluation: Strengths vs. Operational Caveats
Key Strengths
- Zero configuration; single standalone binary.
- Unifies bandwidth, forensics, and packet capture in one TUI.
- Memory-safe Rust codebase with over 650 automated tests.
- Non-intrusive TLS 1.3 decryption using native key logs.
- Kernel eBPF attribution and Landlock filesystem sandboxing.
Operational Caveats
- Full packet dissection requires elevated rights (or setcap).
- Egress drift is observe-only; it does not block traffic like an iptables firewall.
- Windows capture requires third-party Npcap drivers.
- Advanced eBPF and Landlock capabilities remain Linux-specific.
The Bottom Line
What makes NetWatch uniquely valuable is its cohesion. In standard workflows, troubleshooting a network incident requires jumping between iftop for bandwidth, ss for socket handles, tcpdump/Wireshark for payload decoding, and Zeek for threat heuristics.
NetWatch places all of these capabilities behind a unified set of collectors, one keyboard stroke apart, in a binary that starts instantaneously with zero YAML or JSON configuration files. If you manage servers, develop distributed backend services, or defend endpoints, NetWatch earns a permanent place in your terminal toolkit.
Inspect and Clone the Project:
Official Repository: github.com/matthart1983/netwatch
This technical review was compiled and verified by the IT Infrastructure and Cybersecurity engineering team at LLM Advocates. We independently test modern open-source systems utilities, network instrumentation frameworks, and cloud-native observability stacks to evaluate their production readiness, security posture, and compliance with high-performance developer standards.