netwatch
Network forensics that fits in your terminal.
NetWatch is a real-time network forensics TUI. Most terminal network tools answer one question — "which process is using bandwidth?" — and stop. Full packet analyzers answer "what happened?", but offline, after the fact, in a heavyweight GUI. NetWatch lives in the gap: live triage.
It decodes 17 L7 protocols, decrypts TLS 1.3 application data, fingerprints clients with JA4, and detects beaconing, port scans, and DNS tunneling — in real time, in one zero-config binary. Built for blue-teamers, incident responders, and homelabbers who need live triage and evidence capture, not just a bandwidth meter.
brew install matthart1983/tap/netwatch
Install
brew install matthart1983/tap/netwatchcargo install netwatch-tuiRequires Rust 1.70+ and libpcap (sudo apt install libpcap-dev on Linux; included on macOS).
git clone https://github.com/matthart1983/netwatch.git && cd netwatch && cargo build --releaseOn Arch, Fedora, Alpine, or any distro that reports "libpcap.so.0.8: cannot open shared object file", grab the -static release tarball — it bundles libpcap and has no runtime dependencies.
Quick start
NetWatch runs with zero config. Without root it shows interface stats, connections, and configuration; with root it adds health probes and packet capture.
- 1Interface stats, connections, config — no root required$
netwatch - 2Full mode — adds ICMP health probes + packet capture$
sudo netwatch - 3Write a starter config to your platform config directory$
netwatch --generate-config
See it decrypt TLS in 60 seconds
The fastest way to understand what NetWatch is — watch it read the plaintext of a TLS 1.3 session you control, the same SSLKEYLOGFILE way Wireshark does. No MITM, no proxy. The decrypted application data renders inline; a keylog miss never breaks capture, the record just stays opaque.
- 1Launch, then press "c" in the Packets tab to start capturing$
sudo netwatch - 2Drive any cooperating client at the default keylog path$
SSLKEYLOGFILE=/tmp/sslkeylog.txt curl https://example.com - 3In the Packets tab, filter to the decrypted records and open one$
decrypted:true
What makes it different
Most terminal network tools stop at "which process is using bandwidth." NetWatch keeps going.
The tabs
Switch with 1–9. Tab 9 (Insights) appears when AI Insights is enabled.
Display filters
Wireshark-style filter syntax in the Packets tab (press /).
tcp # Protocol
192.168.1.42 # IP address (src or dst)
ip.src == 10.0.0.1 # Directional
port 443 # Port
stream 7 # Stream index
app:tls # L7 protocol
sni:example.com # TLS/QUIC server name
host:api.github.com # HTTP host / resolved name
ja4:t13d1516h2_... # JA4 fingerprint
ech:true # Encrypted ClientHello present
decrypted:true # Only TLS-decrypted records
tcp and port 443 # Combinators (and / or)
!dns # Negation
google # Bare word → contains "google"Keyboard controls
Global keys. Each tab adds its own — see the full reference in the README.
| Key | Action |
|---|---|
| 1–9 | Switch tabs |
| ↑ ↓ | Navigate |
| p | Pause / resume |
| r | Force refresh |
| c | Start/stop capture (Packets) |
| / | Display filter (Packets) |
| R / F / E | Arm recorder / freeze / export incident bundle |
| T | Traceroute |
| W | Whois lookup |
| w | Export to .pcap |
| t | Cycle theme |
| , | Settings |
| ? | Help |
| q | Quit |
Packet capture and eBPF attribution need elevated capabilities, but not the whole TUI as root. Grant them once with: sudo setcap 'cap_net_raw,cap_bpf,cap_perfmon+eip' "$(which netwatch)". Re-run after every install — setcap attaches to a specific binary, and cargo install / release tarballs overwrite it.
Permissions
Degrades gracefully — features that need root show a clear message, never crash.
| Feature | netwatch | sudo netwatch |
|---|---|---|
| Interface stats & rates | ✓ | ✓ |
| Active connections | ✓ | ✓ |
| Network configuration | ✓ | ✓ |
| Health probes (ICMP) | — | ✓ |
| Packet capture | — | ✓ |
Incident bundles
When the Flight Recorder is armed, NetWatch keeps a bounded rolling window of evidence. On freeze or export it writes a self-contained directory — netwatch_incident_YYYYMMDD_HHMMSS/ — containing summary.md, manifest.json, connections.json, health.json, bandwidth.json, dns.json, alerts.json, and packets.pcap when capture data is available.
That keeps the packet evidence and the operational context that explains it together, which makes bug reports, incident reviews, and demos far easier.