Open-source, self-hosted PCAP analyzer for network forensics: reconstruct the devices, topology, sessions and threats of a network from packet captures alone.
Quick start • Features • See it in action • How it works • Documentation
Watch the demo on YouTube (1 min 22 s)
TracePcap is for when all you have is the traffic: no documentation, no asset list, no prior knowledge of the network. Upload packet captures (PCAP or PCAPNG) and it works out which devices are there, what each one is, who talked to whom, and what looks wrong, using tshark, nDPI and Suricata underneath. It can also track how a network changes between captures, and an LLM can write up what happened. Everything runs on your own machine, fully offline.
Use it for:
- Network audits and third-party assessments: handed a capture and nothing else, build the picture from scratch.
- Incident response and forensics: reconstruct what happened from packet evidence when records are incomplete.
- Penetration-test reconnaissance: map an unknown network from captured traffic.
- Research and teaching: explore any capture without context about where it came from.
You need Docker with Docker Compose, on amd64 or arm64 (including Apple Silicon), and at least 8 GB of RAM (6 GB with Suricata off).
git clone https://github.com/NotYuSheng/TracePcap.git
cd TracePcap
cp .env.example .env
docker compose up -dOpen http://localhost and drop in a capture (.pcap, .pcapng or .cap, up to 327 MB by
default). The first start takes a minute while the database and storage initialise.
Next steps
- Turn on the AI features (story, chat, insights): point
LLM_API_BASE_URLin.envat a local or LAN OpenAI-compatible server such as LM Studio or Ollama, never a public API. Everything else works without one. See LLM setup. - Turn on login (Keycloak, with Viewer, Analyst, Lead and Admin roles) before more than one person uses it. See Authentication.
- Air-gapped machine? See Offline deployment.
- Kubernetes? There's a Helm chart, tracepcap-helm:
helm install tracepcap oci://ghcr.io/notyusheng/charts/tracepcap. See Kubernetes (Helm).
Hardware sizing
| Minimum | Recommended | Comfortable | |
|---|---|---|---|
| RAM | 6 GB (SURICATA_ENABLED=false) |
8 GB+ | 16 GB |
| CPU | 4 cores | 4+ cores | 8 cores |
| Storage | 10 GB | 50 GB+ | 100 GB+ SSD |
This sizes the TracePcap stack only; a self-hosted LLM needs its own. The containers' limits total
about 4.4 GB (5.4 GB with login on). The upload limit follows APP_MEMORY_MB: about 16% of it, so
327 MB at the default 2048. See Container resource limits
and Supported CPU architectures.
Every item links to its page in the documentation.
Discover: build an inventory from nothing
- Network map: devices grouped by network, played back over time, with filters by address, port, device type, protocol and risk.
- Device classification: router, server, IoT, phone, laptop and more, from behaviour, manufacturer and Windows sign-ins.
- Devices on an address: tells apart devices that held the same IP in turn, and follows devices that move.
- Where the traffic goes: your networks, organisations and countries, from a bundled geolocation database.
Inspect: see exactly what crossed the wire
- Conversations: every flow, filterable and sortable, exportable as PCAP or CSV.
- Session reconstruction and packet replay: the payloads, in hex and text, step by step.
- File extraction: files carried over HTTP and raw TCP/UDP streams.
- Traffic over time, and comparing captures side by side.
Detect: surface threats and anomalies
- Suricata IDS alerts and nDPI application, risk and TLS (JA3, SNI, certificate) analysis on every conversation.
- Detection rules of your own, by address, port, JA3, hostname, app or payload pattern, for one capture, one network or everything.
Narrate: plain language, from a local LLM (optional)
- Story: who was attacked, who was signed in, what malware ran and where it called home, each answer with its evidence, then the whole story in order.
- Ask about a capture: a chat that looks things up before answering and writes checked Wireshark filters.
Monitor: follow a network across captures
- Network monitor: add captures of the same network over time; each is compared with the one before (new devices, ARP and MAC drift, gateway, protocol and VPN changes), ranked by severity.
Around all of it: a PDF report, re-analysing with other options, roles and permissions with an audit log, and one Settings page.
Two minutes through the main features: upload, the Overview, the flagged conversations, the network map and one host's card, the story's four answers, the chat writing a filter for the C2 traffic, the report, and a monitored network changing over eight weeks.
Click the GIF for the full-quality video on YouTube, with chapters and captions.
The capture is a real incident: a STRRAT remote-access trojan on a corporate LAN, from malware-traffic-analysis.net's training exercises. Worked investigations, step by step:
- STRRAT infection: "You dirty rat!", checked against the exercise's answer key
- Devices on a DHCP network: "Who was 10.0.0.50?"
- Two sites, one range: telling networks apart
docker compose runs nginx (serving the React web app), a Spring Boot backend, PostgreSQL and
MinIO, plus Keycloak when login is on. The backend's image bundles tshark, nDPI 6,
Suricata and mergecap, and runs them on each capture.
- Nothing leaves your machine. Captures are stored and analysed locally. Geolocation comes from
a bundled DB-IP database (online lookups are off unless you opt in with
GEO_FORCE_OFFLINE=false), and the LLM, if you use one, must be local or on your LAN. It's sent findings, not raw packets. - Login is optional. The base stack runs open, for one person. With login on, Keycloak decides who may sign in and which role they have; TracePcap decides what each role may do.
More in System architecture and the five-stage pipeline.
- Turn on login before sharing it. The base stack has no authentication; anyone who can reach
it can use it. See Authentication,
and change every default credential in
.envfor a real deployment. - Roles limit what each person may do (upload, ask the AI, export packets, delete others' captures, change settings), and changes are recorded in an audit log. Everyone who can sign in can see every capture.
- PostgreSQL (5432) and the MinIO console (9001) are published on the host by every stack. Firewall them, or remove those ports, on any machine others can reach; see Production hardening.
Everything is at https://notyusheng.github.io/TracePcap:
- Getting started: installation, offline deployment, Kubernetes (Helm)
- Configuration: environment variables, LLM setup, authentication, users and roles, detection rules
- Operations: production hardening, backup and restore, logs and monitoring
The REST API is described at /swagger-ui/index.html on a running instance (off in the production
overlay), and in openapi/baseline.json.
sample-files/ has captures to try, most with the gen_*.py script that made them:
office_showcase.pcap: a small office (four VLANs) plus the cases the network map shows best, good for a first lookdemo_all_rules.pcap: triggers every rule insignatures.sample.ymldhcp_address_reuse.pcap,device_roaming.pcap,site_to_site_vpn.pcap: the device-identity cases from the docs' worked investigationsmonitor_large/: eight weekly captures of a simulated 550-device network, for the network monitorfree5gc.pcap(5G core traffic), and protocol samples:ftp.pcap,signal.pcap,discord.pcap
See CONTRIBUTING.md. Branch from dev and open pull requests against dev.
MIT. See LICENSE.

