AI PCAP Analysis with PacketSnitch
Packet captures are not short of data — they are short of conclusions. A 200 MB capture produces thousands of decoded packets, dozens of carved files, and a list of hosts that is technically complete and practically unreadable.
AI PCAP analysis closes the last mile: a language model reads the structured output the analyzer already produced and writes down what it means. This page explains what PacketSnitch actually does with a model, what it deliberately does not do, and how to run it entirely on your own machine.
What the model sees — and what it never sees
The model is not handed raw packets, and it is not handed your capture.
PacketSnitch’s Python backend (TShark plus Scapy) does the dissection, carving, credential extraction, GeoIP enrichment, and threat-intel scoring first. Only that derived, structured output reaches the LLM: decoded protocol fields, host and stream summaries, extracted artifacts, and the anomalies the detectors already flagged.
Two consequences follow, and both matter:
- Your capture does not leave the machine unless you deliberately point the LLM at a cloud model. Local Ollama keeps everything local.
- The model cannot hallucinate a packet that is not there. It is summarizing evidence the analyzer produced, not imagining traffic.
Three things AI does in PacketSnitch
1. Capture and stream summaries
The Summary workspace generates a running analysis of the loaded capture and refreshes it as you navigate. Summary generation is stream-aware: when packet navigation settles on a stream, a follow-up summary for that stream is scheduled after an idle delay and its non-duplicate findings are appended, so the report stays current without re-summarizing the entire capture every time you click.
Your own notes are folded in automatically. A note marked verified data (concrete) is rendered in its own section, and the summary treats it as a fact rather than an observation — which keeps the model from arguing with something you have already confirmed.
2. Asking questions about a packet
The context menu exposes LLM actions on a selected packet or stream. The question is answered against the decoded packet context, not against a generic knowledge base, so “what is unusual about this exchange?” is answered from what was actually captured.
3. The rat flock — multi-agent investigation
A single model call summarizes. A flock investigates.
PacketSnitch’s flock runs several primitives in phases — discover, drill, verify, maze-walk — that contribute to a shared scratchpad, then synthesize the result into one narrative. Each primitive can call tools against the loaded capture rather than only reasoning about a summary.
The flock is driven by an ordered investigation playbook rather than a free-form prompt, so it does not wander. The phases are:
| Phase | What it forces |
|---|---|
| Inventory | Capture status, candidate streams, overview statistics, anomaly list |
| File artifacts | Every carved file listed, hashed, and available to open |
| Threat intel | Threat-relevant file types resolved against hash lookups |
| Decompression | Compressed artifacts opened, then the earlier phases re-run on the members |
| Cleartext decode | Unencrypted protocols loaded and decoded |
| Secret reuse | Secrets collected from artifacts tried against encrypted traffic |
| Consolidate | One finding per checked-out item, with honest confidence and named gaps |
That is the difference between “ask an LLM about a PCAP” and an investigation with a defined stopping condition.
Every phase can act, not only describe. A rat working the playbook calls the tools it names (capture.get-status, artifacts.list, extraction.hash-file, conv.load-packet, …) and the result is carried on a shared tool-result board for the rest of the flock — so a discovery rat establishing scope on move one is still answering the question a drill rat asks on move three. Tools that only read state are exempt from the run’s side-effect budget, and a parallel rat asking the same read-only question is answered from the board instead of costing another round trip.
When a summary is not enough — a TLS extension, a DNS flag, a DHCP option, an 802.11 status code, or a field you suspect exists but no summary kept — the assistant can call capture.raw-json and read the backend’s own { "packet.info": {...}, "extra.info": {...} } record for that packet. That is the source of truth behind every derived view, and it is the difference between “the summary does not mention it” and “the packet does not contain it”. The result is bounded (five packets, a clipped hex dump) and read as evidence, never as instructions: payload contents are attacker-controlled.
4. It learns the route, then it knows the route
A flock that reaches a goal writes down how — the replayable steps, not just the answer. That technique is stored locally, keyed by the goal, and every later investigation starts with the proven paths already on the board.
What makes this more than a bookmark list is that a technique carries a weight: how established the route is.
- Success makes it easier. Each time the route works, its weight moves toward 100% by a fraction of the remaining headroom, so the tenth success counts for less than the second. A route you use weekly becomes the default; a route that got lucky once does not.
- Failure makes it harder. A route that stops working loses a fraction of its current weight, and three consecutive failures retire it, so the assistant stops recommending a path that no longer exists.
- Disuse lets it fade. An unused route decays with a half-life (30 days by default) when the store is ranked — but the decay is never written down, so picking it up again restores its full strength.
The result is the property the feature exists for: repetitive work gets cheaper the more the app is used, and it degrades gracefully instead of ossifying around a route that stopped working.
Ask PacketSnitch can see this memory and act on it. It reads the learned list when it plans, reuses a matching technique instead of re-deriving it, records a route that worked, reinforces one it followed, and forgets one that turned out wrong. A rat in a running flock can also report TECHNIQUE_FAILED, which is how a path that no longer works loses weight mid-run.
A technique is stored as a route, not as a description of one capture: its intent, its steps, the primitives it used, the needs it satisfies and the role each step plays. That makes it composable — a route can be queried by need, inspected step by step, chained with another route, or grouped with others into an idea whose members are ordered by what they contribute. Addresses, hostnames, places and filenames are replaced with stable placeholders on write, so a route learned against one capture cannot leak that capture’s details into a later run.
Settings → LLM → Learned techniques is the switch; Settings → Dev → Learned Paths lists the store (weight, use count, needs, steps and the full reinforcement/pushback history), can show it as JSON, can forget retired routes, and offers two deliberate maintenance actions: Redact identifiers from the store (migrates a store written before redaction existed) and Reset the store and retrain. Nothing leaves the machine — the store is one BSON file in the app’s data directory, written atomically, and an older JSON store is migrated on first write.
Running it locally, or not at all
The LLM is optional and disabled by default. This is a hard design property, not a preference: if the Ollama client module is missing, every LLM feature disables silently rather than crashing the application.
Two providers are supported:
| Provider | Where inference runs | Configuration |
|---|---|---|
| Ollama | Your machine, or ollama.com for :cloud models | settings.llm.ollamaModel; cloud models need settings.apiKeys.ollamaApiKey |
| OpenRouter | A hosted endpoint | settings.llm.openrouterModel; needs settings.apiKeys.openrouterApiKey |
A local Ollama daemon keeps the entire analysis on your hardware. Cloud models are an explicit opt-in per model name — names ending in :cloud are served by ollama.com, and the shipped default (minimax-m3:cloud) is one of them, so “it works out of the box” never means “it phoned home”.
The settings that matter
| Setting | Default | What it controls |
|---|---|---|
llm.activeByDefault | false | Whether the Use LLM toggle starts on |
llm.backgroundSummaryGenerationEnabled | true | Generate summaries without asking each time |
llm.triggerDelaySeconds | 5 | How long navigation must settle before a stream summary fires |
llm.maxSummaryTokens | 1024 | Output cap per summary |
llm.ollamaRequestTimeoutSeconds | 300 | Request timeout |
llm.retryCount | 2 | Retries before giving up |
llm.analysisCompactionThresholdBlubs | 6 | When the running summary is compacted |
llm.learningEnabled | true | Whether proven techniques are remembered across runs |
llm.learningReinforceGain | 0.18 | How fast a route that keeps working becomes the default |
llm.learningFailureDecay | 0.22 | How much a route loses when it stops working |
llm.learningDecayHalfLifeDays | 30 | How fast an unused route fades when ranked |
llm.multiStepPlanningEnabled | true | Reject a single-step route for a request that provably has more than one goal |
llm.multiStepConfidenceThreshold | 0.8 | How certain the router must be before a one-step answer is accepted |
llm.planStepReflectEnabled | true | Let the model reflect between plan steps and adjust the next one |
llm.followThroughEnabled | true | Check after the plan whether every goal was satisfied, and fold in one corrective plan if not |
llm.chatVerbosity | 1 | How much play-by-play chat posts (0 quiet – 3 diagnostic) |
llm.flockScreenContextEnabled | true | Give investigators a bounded, shape-only description of the current workspace |
activeByDefault: false and backgroundSummaryGenerationEnabled: true look contradictory but are not: the first governs whether you have opted in, the second governs whether, once opted in, you have to press a button each time.
When the model gets it wrong
A model will occasionally return a plan PacketSnitch cannot use. The design answer is not a bigger prompt; it is to back up and reroute:
- A provider error (a 429, a dropped socket, a cold model) is retried with backoff before it is reported.
- A rejected route is retried with the rejected answer attached, so the model can repair the specific step instead of repeating it. Two obvious mistakes are repaired deterministically: a registered capability id used as a whole step, and a capability id written into the filter slot.
- A failed condition, a failed data-switch or an unusable recovery route no longer abandons the remaining plan; the run continues and the completion check gets one honest attempt at a different route.
Every finding still remains the model’s best explanation of evidence the analyzer produced — that part does not change. What changed is that one bad response is no longer the end of the request.
What AI PCAP analysis will not do
Being precise about the limits is the point of this page.
- It will not decrypt traffic for you. Decryption is a separate subsystem (802.11 CCMP/TKIP with keys you supply, plus TLS certificate inspection). The flock’s secret-reuse phase tries secrets found in artifacts against encrypted traffic; it does not break encryption.
- It will not replace the dissector. Every field the model reasons about came from a protocol decoder. A protocol nobody has written a decoder for produces less to reason about.
- It will not make a weak capture strong. A capture with no relevant traffic yields an honest “nothing found” rather than a fabricated incident.
- It is not a cloud service. There is no PacketSnitch-hosted inference endpoint; you choose a local daemon or a provider you have an account with.
Where to go next
- Full feature list — every workspace, including the LLM flow.
- Sample captures — download a capture and try the flock on it.
- Frontend documentation — the Summary frame, context-menu LLM actions, and the flock tool surface in detail.
- FAQ — licensing, privacy, and what is optional.
- Download —
.deb,.rpmand.exe.
Download PacketSnitch and load a capture — the LLM toggle stays off until you turn it on.
