7 min read

Before vs After: Finding New Connections with Capture Diff

You changed a firewall rule. How do you prove it added only the connection you intended — and no surprise egress? Here's how to load two offline captures into PcapDecoder's capture diff and read added / removed / delta across endpoints, conversations, protocols, and anomalies.

Before vs After: Finding New Connections with Capture Diff
SummaryKey Points
  • The scenario: two captures around a rule change need to prove only expected connections were added
  • Open the Capture Comparison card on the statistics page — current document is the baseline, then pick a compare file
  • Four dimensions: endpoints, conversations, protocols, and anomalies, each with added / removed / delta
  • A diverging bar chart shows green for added and red for removed; zero-difference items are hidden

After a Change, How Do You Prove Nothing Extra Slipped In?

This afternoon a new firewall policy goes live: the application servers get access to one new third-party API, and nothing else. Afterward your manager asks a perfectly fair question: "How do you know this only opened that one connection and didn't let something else out?"

Memory isn't evidence, and trawling logs is easy to get wrong. The solid approach is to capture before and after the change, then diff the two: treat "before" as the baseline, subtract "after" from it item by item, and see what appeared and what disappeared. What appears should be exactly that one new API connection. If a pile of unfamiliar external addresses shows up, you hold the change right there.

PcapDecoder's Capture Comparison (capture diff) exists for this. It works on two already-captured offline pcaps — anything you've captured by whatever means and can open and analyze. A boundary worth stating up front: the app's live capture page was hidden on 2026-10-17, so live capture, SSH remote capture, and plugin installation aren't available in the current build. This feature doesn't depend on any of them — it's pure offline analysis. In other words, you bring two capture files; the comparison happens after that.

Set It Up: One Baseline, One Comparison

Step 1: Open the "before" capture first. This matters: the diff baseline is the document you currently have open. The order can't be reversed — open and parse the baseline first, then go find the comparison file.

Step 2: Find the "Capture Comparison" card on the statistics page. It carries a compare-arrows icon. In its initial state it shows a single button: Choose compare file…. Click it and pick the "after" capture with the file picker — .pcap, .pcapng, .cap, and .gz are supported, and gzip captures decompress transparently. You pick one file at a time.

Step 3: Let it finish. The comparison moves through a few phases: a loading state while it analyzes, a ready state with results, and an error state that shows the failure reason and lets you re-pick. Two thoughtful details: the second file is opened through the same parsing path as the main document, and the diff result releases that file's resources immediately — it never replaces your currently open baseline document. And if you switch the main document mid-way, the old comparison is invalidated and the state resets, because once the baseline changes the old deltas mean nothing. Picking another comparison file also resets the previous result.

Four Dimensions: Reading added / removed / delta

When the result lands, the card opens with a one-line overview: how many packets the baseline holds, how many the comparison holds, and which file you compared against. Below that is the core — four dimensions of difference. Understanding their framing matters more than the numbers themselves.

Dimension 1: Endpoints. Which IPs exist only on the comparison side (added), and which only on the baseline side (removed)? An endpoint present in "after" but not "before" is an added endpoint; the reverse is removed. Bar length tracks the packet-count difference. This is the most direct place to hunt for a "new external connection" — in our scenario, the new API server's IP should appear under endpoints added, and nothing else should.

Dimension 2: Conversations. More granular than endpoints, this looks at add/remove at the endpoint A ↔ endpoint B level, with labels that include the protocol, such as a ↔ b (TCP). Endpoints tell you "a new address appeared"; conversations tell you "who it talks to and over which protocol." A new conversation containing an address pair entirely absent from the baseline is a strong signal of surprise egress.

Dimension 3: Protocols. How each protocol's packet count changed — packetDelta, comparison minus baseline. This dimension answers "what kind of traffic changed": if TCP packets spike while everything else is flat, the change affected TCP traffic specifically.

Dimension 4: Anomalies. How anomaly items changed — delta — listing only those added or removed. Watch this one most closely: a new anomaly type appearing after the change is almost always a side effect of the rule adjustment and deserves a look even if it lands on an expected endpoint. The visualization filters out zero-difference items automatically — dimensions that didn't change take up no rows, so a wall of zeroes won't distract you.

One rule runs through all four dimensions: added / positive delta = new on the comparison side (green); removed / negative delta = gone from the baseline side (red). Fix the direction — comparison minus baseline — in your head, or you'll read "less" as "more."

The Diverging Chart: Green Added, Red Removed

The four dimensions are also drawn as a diverging bar chart: split around a center line, green bars to the right (added/increased), red bars to the left (removed/decreased), with length proportional to the difference. The chart is grouped by dimension, shows at most the ten largest differences per group, and normalizes linearly within each group so the longest bar fills the width.

The chart doesn't rely on colour alone: every bar carries a text legend explaining the direction, plus a label — endpoints show the IP, conversations show a ↔ b (protocol), protocols show the protocol name, and anomalies show the engine's built-in display name. So even if red/green is hard for you to distinguish, you can still tell added from removed. Each dimension's detail card also has a text version — chips and tables listing the added/removed counts, protocol packet deltas, and anomaly changes — that cross-checks the chart.

When there are actual changes, the card offers an optional Ask AI button that passes the key diff data to the assistant for a summary of what changed and why. It's opt-in — you click it, and it never rewrites the conclusion on its own.

Back to our scenario: you need to confirm "only the expected connection was added." Read against the chart — is the new API IP the only thing under endpoints added? Is the only new conversation the TCP flow to it? In the protocol dimension, is only the expected protocol up? Did anything new appear in anomalies? When all four check out, the change is signed off. If all four dimensions are zero — the visualization card simply doesn't render — there's no visible difference between the two captures, meaning the change produced no observable network behaviour.

From 'Looks Fine' to 'Signed Off'

The value of capture diff is turning "looks about the same to me" into "I have four dimensions of data behind this conclusion." Concretely:

  1. Positive list: go through endpoints added and conversations added item by item, confirming each is expected — one extra entry you can't explain means go back to the rule;
  2. Negative list: check endpoints removed and conversations removed for collateral damage — a connection that shouldn't have dropped is just as much a problem;
  3. Protocol and anomaly cross-check: new anomaly items get top priority — rule them out before explaining protocol packet swings;
  4. Leave evidence: put the overview (baseline packets / comparison packets / comparison filename) and the four-dimension deltas into the change ticket so a reviewer can reproduce the check.

One final note on scope: this is an offline comparison tool. It consumes two captures you've already made, touches no live capture, and doesn't alter the baseline document you have open. It won't decide "the change succeeded" for you — that judgment is still yours. Diff just puts the changes that matter on the table, so the claim "only what should have been added was added, and nothing else" is something you can actually back up.

Capture DiffBaselineFirewallChange VerificationNetwork Troubleshooting
Share
Back to home