NetWatch

See what your network is actually doing — live, in your terminal.
A network monitor that reads encrypted traffic, names the process behind every connection, and catches malware calling home. One binary. Zero config.

crates.io downloads Release Packaging status Platform License

Terminal Trove Tool of The Week

NetWatch decrypting a live TLS 1.3 session — the plaintext HTTP exchange decoded in the Packets tab

Reading the plaintext out of a live TLS 1.3 session — decrypted right in the terminal. No proxy, no man-in-the-middle.

--- Most network tools answer one question — *"what's using my bandwidth?"* — and stop. NetWatch keeps going. It decodes the protocols on the wire, tells you **which program** opened each connection, and watches for the patterns that mean trouble — a port scan, malware beaconing to a command server, data sneaking out over DNS. When something looks wrong, one keypress freezes a portable evidence bundle you can attach to a bug report. Think of it as **one zero-config binary that does the job of a bandwidth meter, the triage view of Wireshark, and a lightweight intrusion detector** — without leaving the terminal. **Made for** blue-teamers, incident responders, SREs, and homelabbers who need to see what's happening *right now* — not parse a capture file an hour later. 500+ tests · Landlock-sandboxed (Linux) · safely parses hostile traffic

A tour of the live NetWatch TUI: dashboard, live packet capture and decode, network topology with traceroute, and automatic alerting

A quick tour of the live TUI — dashboard, deep packet inspection, network topology with traceroute, and automatic alerting, all in one terminal.

## Why NetWatch - 🔓 **Read encrypted traffic you control** — point a browser or app's `SSLKEYLOGFILE` at NetWatch and watch the plaintext of its TLS 1.3 sessions decode live, the same way Wireshark does it. No proxy, no certificates, nothing in the middle. - 🧬 **Fingerprint the software behind a connection** — JA4 turns each TLS/QUIC handshake into a stable fingerprint, so you can recognize a specific client — or a specific piece of malware — *even though the traffic is encrypted*, the way you'd recognize a browser by its user-agent. Pivot on a fingerprint to find every other flow from the same software. - 🚨 **Catch malware calling home** — built-in detection for C2 beaconing (regular, low-jitter check-ins), port scans, and DNS tunneling runs in the background with zero setup. A critical alert auto-freezes the recorder so the evidence is already saved when you look. - ⚙️ **Name the process behind every connection** — maps each socket to the program that opened it from `ss`/`lsof`, with an optional kernel-level eBPF kprobe (Linux, the `ebpf` feature) that also catches short-lived flows polling can miss. Works everywhere; the kprobe is an enhancement, not a requirement. - 📡 **Decode the protocols, not just the ports** — real L7 parsing of TLS, QUIC, HTTP, and DNS (plus an SSH banner/version sniff) and a dozen more, with per-flow stream tracking and handshake timing — so you see `api.github.com` and the JA4 fingerprint, not just "port 443." - 🎥 **Freeze the evidence** — arm a rolling recorder and freeze any incident into a portable bundle: the packets *plus* the connections, DNS, health, and alerts that explain them. Built for bug reports and post-mortems. - 🛡️ **Safe by design** — after setup, NetWatch drops its privileges and locks itself into a Landlock filesystem allow-list (Linux). A tool that parses hostile traffic *cannot* read your SSH keys, browser profiles, or `/etc/shadow`. **No config files. No setup. No flags required.** ## Install ```bash brew install netwatch # macOS / Linux nix-shell -p netwatch # NixOS / Nix paru -S netwatch-tui-bin # Arch (prebuilt; netwatch-tui builds from source) scoop install netwatch # Windows cargo install netwatch-tui # anywhere with Rust ``` Or grab a pre-built binary from [Releases](https://github.com/matthart1983/netwatch/releases/latest). The Nix, Arch and Scoop packages are maintained by community packagers — thank you. File packaging issues with them; file netwatch bugs here. If a package lags a release, the [Repology page](https://repology.org/project/netwatch-tui/versions) shows it.
All platforms & build-from-source | Platform | Download | |----------|----------| | Linux (x86_64, Debian/Ubuntu) | [`netwatch-linux-x86_64.tar.gz`](https://github.com/matthart1983/netwatch/releases/latest) | | Linux (aarch64, Debian/Ubuntu) | [`netwatch-linux-aarch64.tar.gz`](https://github.com/matthart1983/netwatch/releases/latest) | | Linux (x86_64, static — Arch/Fedora/Alpine/any distro) | [`netwatch-linux-x86_64-static.tar.gz`](https://github.com/matthart1983/netwatch/releases/latest) | | Linux (aarch64, static — Arch/Fedora/Alpine/any distro) | [`netwatch-linux-aarch64-static.tar.gz`](https://github.com/matthart1983/netwatch/releases/latest) | | macOS (Intel) | [`netwatch-macos-x86_64.tar.gz`](https://github.com/matthart1983/netwatch/releases/latest) | | macOS (Apple Silicon) | [`netwatch-macos-aarch64.tar.gz`](https://github.com/matthart1983/netwatch/releases/latest) | The `-static` Linux builds bundle libpcap and have no runtime dependencies — use these on Arch, Fedora, Alpine, or any distro where the default builds report `libpcap.so.0.8: cannot open shared object file`. **From source:** ```bash git clone https://github.com/matthart1983/netwatch.git && cd netwatch cargo build --release ``` **Prerequisites:** Rust 1.70+, libpcap (`sudo apt install libpcap-dev` on Linux, included on macOS).
## Quick start ```bash netwatch # interface stats, connections, config — no privileges needed sudo netwatch # full mode — adds live packet capture + health probes ``` That's it. Switch tabs with `1`–`9`, press `?` for help, `q` to quit. The Dashboard is useful in five seconds; everything below is there when you need to go deeper. > **Linux without `sudo`:** grant the capture capabilities once and run as your normal user — > `sudo setcap 'cap_net_raw,cap_bpf,cap_perfmon+eip' "$(which netwatch)"`. Re-run it after every upgrade ([details](docs/REFERENCE.md#running-without-sudo-linux)). ### 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: ```bash sudo netwatch # 1. launch, then open the Packets tab (4) SSLKEYLOGFILE=/tmp/sslkeylog.txt curl https://example.com # 2. any client that exports its keys # 3. filter the Packets tab with: decrypted:true ``` The decrypted application data renders inline. A keylog miss never breaks capture — that record just stays opaque. (`SSLKEYLOGFILE` is the same mechanism Wireshark uses; it only works for traffic *you* control, never third-party or malware traffic.) ## What you get Ten tabs, switched with `1`–`9` and `0`: | # | Tab | What it shows | |---|-----|---------------| | 1 | **Dashboard** | Interfaces, bandwidth graph, top connections, gateway/DNS health, latency heatmap. Useful in 5 seconds. | | 2 | **Connections** | Every socket with its process + PID, protocol, state, GeoIP, and latency sparklines. | | 3 | **Interfaces** | Per-interface IPv4/IPv6, MAC, MTU, RX/TX, errors, drops. | | 4 | **Packets** | Live capture with real L7 decode, TLS 1.3 decryption, JA4, per-flow stream tracking, filters, PCAP export. | | 5 | **Stats** | Protocol breakdown by bytes + TCP handshake-timing histogram. | | 6 | **Topology** | ASCII map of machine → gateway → DNS → top hosts, with traceroute. | | 7 | **Timeline** | Connection timeline color-coded by TCP state; security alerts land here. | | 8 | **Processes** | Per-process bandwidth ranking with live RX/TX and connection counts. | | 9 | **Insights** | *(opt-in)* feeds a snapshot to a local/cloud LLM for plain-language analysis. | | 0 | **Egress** | Learns what each process talks to (SNI/ASN/port); promote the baseline to a policy and get warned on drift. | The Packets tab is where the forensics live — deep protocol decoding, live TLS 1.3 decryption, JA4 threat-hunting, Wireshark-style display filters, and incident capture. **[See the full feature reference →](docs/REFERENCE.md)** ## Deeper dives | Guide | What's in it | |-------|--------------| | **[Feature reference](docs/REFERENCE.md)** | Every keybinding, the display-filter language, protocol decoder list, themes, and config options. | | **[TLS 1.3 decryption](docs/REFERENCE.md#tls-13-decryption)** | How `SSLKEYLOGFILE` decryption works, supported cipher suites, and what it can and can't read. | | **[Threat hunting with JA4](docs/REFERENCE.md#threat-hunting-with-ja4)** | Fingerprinting clients and pivoting across flows. | | **[Security & the Landlock sandbox](docs/REFERENCE.md#security--forensics)** | The threat model, capability dropping, and the filesystem allow-list. | | **[Flight Recorder](docs/REFERENCE.md#flight-recorder)** | Arming, freezing, and the contents of an incident bundle. | | **[AI Insights](INSIGHTS.md)** | Optional local/cloud LLM analysis (off by default). | ## How it works ``` Raw bytes → Ethernet → IPv4/IPv6/ARP → TCP/UDP/ICMP → L7 decoders ↓ Per-flow stream tracking · Handshake timing TLS 1.3 decryption · JA4 · Threat detection ``` | Collector | macOS | Linux | |-----------|-------|-------| | Connections | `lsof` + PKTAP | `/proc/net/tcp` + eBPF kprobe | | Packets | libpcap (BPF) | libpcap | | Process attribution | PKTAP | `lsof`/`ss` polling, with optional eBPF kprobe overlay | Everything degrades gracefully: features that need elevated privileges show a clear message and fall back, never crash. Full architecture notes live in [WIKI.md](WIKI.md). ## Related **Siblings:** [SysWatch](https://github.com/matthart1983/syswatch) (system) and [DiskWatch](https://github.com/matthart1983/diskwatch) (disk) — same chrome, different surface. **[ESSH](https://github.com/matthart1983/essh)** — a pure-Rust SSH client with the same TUI aesthetic; connects where NetWatch observes. **[NetWatch Cloud](https://www.netwatchlabs.com)** — hosted fleet monitoring for the servers you run NetWatch against. A tiny Rust agent on each Linux host, a real-time dashboard, and email + Slack alerts on latency, packet loss, or hosts going offline. **Free while we grow.** The [agent](https://github.com/matthart1983/netwatch-agent), [SDK](https://github.com/matthart1983/netwatch-sdk), and [dashboard](https://github.com/matthart1983/netwatch-dashboard) are MIT; the hosted backend is proprietary. ## Contributing Questions, ideas, and bug reports are welcome in [GitHub Discussions](https://github.com/matthart1983/netwatch/discussions) and [Issues](https://github.com/matthart1983/netwatch/issues). See [CONTRIBUTING.md](CONTRIBUTING.md) for coding conventions and [WIKI.md](WIKI.md) for the architecture guide. ## License MIT