Chapter 6: Reverse .pcap -> Scrub Secrets -> Rebuild .pcap

Decompile binary captures into .frasm text, wipe internal subnets & secret hostnames, and recompile with valid lengths and checksums.

Labs completed0/7
The Situation · 6 min

Vendor TAC wants your failing login .pcap, except it has 10.99.4.x and "payroll.secret-corp.internal" plastered all over DNS and TLS SNI — scrub it before uploading.

What You'll Pull Off Here

  • Decompile .pcap / .pcapng bytes into canonical .frasm (host1, host2, ...) locally in the browser or via frameassembly reverse.
  • Swap private IPs once in host so every packet header and pseudo-header checksum updates automatically.
  • Scrub Layer 7 strings (qname, sni, hosthdr) without blowing up IP total lengths or TCP seq counters.
Interactive Lab Check

Lab 6: Scrub 10.99.4.x & "payroll.secret-corp.internal"

Wipe every 10.99.4.x host IP (swap to 198.51.100.21, 198.51.100.53, and 198.51.100.80) and replace "payroll.secret-corp.internal" with "app.example.test".

  1. 1.Change host1, host2, and host3 from 10.99.4.x to 198.51.100.21, 198.51.100.53, and 198.51.100.80.
  2. 2.Replace "payroll.secret-corp.internal" on both DNS lines and the TLS sni line with "app.example.test".
  3. 3.Click Check Exercise to grab your TAC-safe .pcap!

1. Why .pcap -> .frasm -> .pcap Beats tcprewrite

Hex-editing a .pcap corrupts IP lengths and TCP checksums the instant "payroll.secret-corp.internal" shrinks to "app.example.test". Meanwhile tcprewrite swaps outer Layer 3 IPs and happily leaves your confidential domain names sitting in plaintext inside DNS and TLS SNI.

Running frameassembly reverse incident.pcap clean.frasm (or clicking "Decompile Sample .pcap" in the sandbox) turns the binary capture into readable host1, host2, ... lines. Find-and-replace whatever you want, recompile, and ship a valid .pcap to TAC.

  • Zero cloud uploads: reversing and compiling happen inside WebAssembly in your current tab.
  • Weird proprietary payload bytes survive round-trips intact via hexpayload "...".
Word-by-Word Syntax Breakdown
The 3-step .pcap -> .frasm -> .pcap scrubbing loop:
frameassembly reverse customer_trace.pcap sanitized.frasm
reverse customer_trace.pcap1. DecompileReads .pcap / .pcapng bytes and emits host1, host2, ...
sanitized.frasm2. Find & ReplaceSwap private IPs, MACs, VLANs, and internal hostnames in any editor
frameassembly sanitized.frasm3. RecompileBuilds sanitized.pcap with fresh lengths, seq offsets, and checksums
tac_ticket_sanitized.frasmLoading WASM…
Try two-way reverse right in your browser:
Wireshark filter: dns || tls
Open in Playground
0 B · 0.000 ms
Compiling capture in WebAssembly…
Learn .frasm — Labs, Guides & 81 Protocols | FrameAssembly