# Scapy, Wireshark Filter, tcprewrite & PCAP Reverse Migrations

> **FrameAssembly v3.2.2** · Anthology 12 (L2–L7 Cross-Layer · 14 Recipes) · MIT License · Canonical URL: https://frameassembly-lang.dev/docs/examples/scapy-wireshark-migrations

Side-by-side translations from imperative Python/Scapy scripts, `tcprewrite`, `text2pcap` hex dumps, and Wireshark display filters into `.frasm`, plus full L2–L7 PCAP redaction with `frameassembly reverse`.

## Key Wire & Syntax Takeaways

- Replace manual Scapy `seq`/`ack` length math and duplicated `IP()`/`IPv6()` packet builders with stateful `->`/`<-` lines and `flow(c, s)`.
- Unlike `tcprewrite` (which only rewrites L2/L3 headers), `frameassembly reverse` decompiles L2–L7 fields so redacted DNS/SNI/HTTP strings recompile with valid lengths and checksums.
- Store plain-text `.frasm` fixtures in Git instead of opaque `.pcap` blobs and compile fresh captures in CI for Suricata, Zeek, and `tshark`.

## 12.01 · Scapy Manual TCP Sequence Math -> Stateful .frasm HTTP Exchange (`mig_scapy_stateful_http.frasm`)

In Scapy, crafting a bidirectional HTTP conversation requires manually counting payload byte lengths, flipping IP/MAC/TCP port tuples on every reply, and maintaining seq/ack variables. FrameAssembly tracks the 4-tuple state and <- port swap automatically.

- **Protocols:** `tcp`, `http` (5 Ethernet frames)
- **Wire Behavior:** Specify srcport and dstport once on syn; HTTP frames emit psh ack and advance seq by exact wire byte length.
- **Wireshark Filter:** `http && tcp.port == 8080`
- **CLI Build:** `frameassembly mig_scapy_stateful_http.frasm`

### Equivalent Imperative Scapy Script

```python
from scapy.all import Ether, IP, TCP, Raw, wrpcap
req = b"GET /health HTTP/1.1\r\nHost: api.internal\r\n\r\n"
resp = b"HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\n{\"ok\":true}"
pkts = [
    Ether()/IP(src="10.0.0.10", dst="10.0.0.20")/TCP(sport=51200, dport=8080, flags="S", seq=1000),
    Ether()/IP(src="10.0.0.20", dst="10.0.0.10")/TCP(sport=8080, dport=51200, flags="SA", seq=2000, ack=1001),
    Ether()/IP(src="10.0.0.10", dst="10.0.0.20")/TCP(sport=51200, dport=8080, flags="A", seq=1001, ack=2001),
    Ether()/IP(src="10.0.0.10", dst="10.0.0.20")/TCP(sport=51200, dport=8080, flags="PA", seq=1001, ack=2001)/Raw(req),
    Ether()/IP(src="10.0.0.20", dst="10.0.0.10")/TCP(sport=8080, dport=51200, flags="PA", seq=2001, ack=1001+len(req))/Raw(resp),
]
wrpcap("mig_scapy_stateful_http.pcap", pkts)
```

```frameassembly
host client { ip 10.0.0.10 }
host server { ip 10.0.0.20 }

compile {
    client -> server tcp syn srcport 51200 dstport 8080 win 65535 mss 1460 wait 1ms
    client <- server tcp syn ack win 65535 mss 1460 wait 1ms
    client -> server tcp ack wait 1ms
    client -> server http get uri "/health" hosthdr "api.internal" wait 2ms
    client <- server http status 200 reason "OK" contenttype "application/json" body "{\"ok\":true}"
}
```

## 12.02 · Scapy Dot1AD / Dot1Q Stacking -> Cross-Layer qinq + innervlan Modifier (`mig_scapy_qinq_stack.frasm`)

Replaces nested Scapy Ether(type=0x88a8)/Dot1Q()/Dot1Q() layer constructors with a declarative qinq <svlan> innervlan <cvlan> modifier usable on any L3–L7 protocol.

- **Protocols:** `qinq`, `ospf` (1 Ethernet frame)
- **Wire Behavior:** Writes outer IEEE 802.1ad TPID 0x88a8 (S-VLAN 300, PCP 5) followed by inner 802.1Q TPID 0x8100 (C-VLAN 40).
- **Wireshark Filter:** `vlan.id == 300 && ospf`
- **CLI Build:** `frameassembly mig_scapy_qinq_stack.frasm`

### Scapy 802.1ad + 802.1Q Layer Stack

```python
from scapy.all import Ether, Dot1AD, Dot1Q, IP, wrpcap
from scapy.contrib.ospf import OSPF_Hdr, OSPF_Hello
pkt = (Ether(src="00:1c:73:01:00:01", dst="01:00:5e:00:00:05")
       / Dot1AD(vlan=300, prio=5) / Dot1Q(vlan=40)
       / IP(src="10.30.40.1", dst="224.0.0.5", ttl=1)
       / OSPF_Hdr(src="10.30.40.1", area="0.0.0.0") / OSPF_Hello())
wrpcap("mig_scapy_qinq_stack.pcap", [pkt])
```

```frameassembly
host ce_rtr     { ip 10.30.40.1 mac 00:1c:73:01:00:01 }
host ospf_mcast { ip 224.0.0.5 }

compile {
    ce_rtr -> ospf_mcast qinq 300 innervlan 40 pcp 5 ospf hello routerid 10.30.40.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 ttl 1
}
```

## 12.03 · PySNMP / Scapy USM Boilerplate -> Single-Line Encrypted SNMPv3 Trap (`mig_snmpv3_usm_authpriv.frasm`)

Generating an encrypted RFC 3414/3826/7860 SNMPv3 authPriv trap in Python normally requires PySNMP key localization, ASN.1 BER encoders, and MIB compilation. FrameAssembly performs SHA-256 key localization and AES-128-CFB encryption natively.

- **Protocols:** `snmp3` (1 Ethernet frame)
- **Wire Behavior:** Computes localized Ku -> Kul keys from engineid hex, encrypts the scopedPDU with AES-128, and signs the packet with HMAC-SHA-256.
- **Wireshark Filter:** `snmp && udp.port == 162`
- **CLI Build:** `frameassembly mig_snmpv3_usm_authpriv.frasm`

### net-snmp CLI Equivalent (Requires Live Socket & Daemon)

```bash
snmptrap -v 3 -e 0x80001f888001020304 -u secops \
  -a SHA-256 -A "AuthSecret2026!" -x AES -X "PrivSecret2026!" \
  -l authPriv 10.40.1.100:162 240000 1.3.6.1.6.3.1.1.5.3 \
  1.3.6.1.2.1.2.2.1.2.1 s "TenGigE0/0/1"
```

```frameassembly
host core_rtr { ip 10.40.1.1 }
host nms_srv  { ip 10.40.1.100 }

compile {
    core_rtr -> nms_srv snmp3 trap user "secops" engineid "80001f888001020304" engineboots 3 enginetime 1200 auth sha256 "AuthSecret2026!" priv aes "PrivSecret2026!" sysuptime 240000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.3 varbind 1.3.6.1.2.1.2.2.1.2.1 string "TenGigE0/0/1"
}
```

## 12.04 · Scapy IP() vs IPv6() Script Duplication -> Reusable Dual-Stack flow(c, s) (`mig_dual_stack_tls_flow.frasm`)

Instead of maintaining separate Scapy IP() and IPv6() builders for dual-stack regression suites, write one parameterized flow(c, s) and invoke it for IPv4 and IPv6 host pairs.

- **Protocols:** `tcp`, `tls` (5 Ethernet frames)
- **Wire Behavior:** Emits EtherType 0x0800 on the first call and EtherType 0x86dd (with IPv6 pseudo-header TCP checksums) on the second call.
- **Wireshark Filter:** `tls.handshake.extensions_server_name == "api.example.com"`
- **CLI Build:** `frameassembly mig_dual_stack_tls_flow.frasm`

### Duplicated IPv4 / IPv6 Scapy Construction

```python
# In Scapy, IP() and IPv6() require separate packet lists & L3 headers:
v4_syn = Ether()/IP(src="10.1.1.10", dst="10.1.1.20")/TCP(sport=52443, dport=443, flags="S")
v6_syn = Ether()/IPv6(src="2001:db8::10", dst="2001:db8::20")/TCP(sport=52443, dport=443, flags="S")
```

```frameassembly
host app_v4 { ip 10.1.1.10 }
host gw_v4  { ip 10.1.1.20 }
host app_v6 { ip 2001:db8::10 }
host gw_v6  { ip 2001:db8::20 }

flow tls_sni_probe(c, s) {
    c -> s tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms
    c <- s tcp syn ack win 65535 mss 1440 wait 1ms
    c -> s tcp ack wait 1ms
    c -> s tls clienthello sni "api.example.com" alpn "h2" wait 2ms
    c <- s tls serverhello ciphersuite 0x1301
}

compile {
    tls_sni_probe(app_v4, gw_v4)
    tls_sni_probe(app_v6, gw_v6)
}
```

## 12.05 · Scapy scapy.contrib.bgp Byte Packing -> Native bgp open / update (`mig_scapy_bgp_nlri.frasm`)

Translates verbose scapy.contrib.bgp path-attribute constructors into readable bgp open, keepalive, update, and notification lines.

- **Protocols:** `tcp`, `bgp` (6 Ethernet frames)
- **Wire Behavior:** Automatically prepends the 16-byte all-ones BGP marker (ff..ff) and 16-bit message length.
- **Wireshark Filter:** `bgp`
- **CLI Build:** `frameassembly mig_scapy_bgp_nlri.frasm`

### Scapy BGP Contrib Imports & Path Attributes

```python
from scapy.contrib.bgp import BGPHeader, BGPOpen, BGPUpdate, BGPPAOrigin, BGPPANextHop, BGPNLRI_IPv4
upd = BGPHeader(type=2) / BGPUpdate(
    path_attr=[BGPPAOrigin(origin="IGP"), BGPPANextHop(next_hop="192.0.2.1")],
    nlri=[BGPNLRI_IPv4(prefix="198.51.100.0/24")]
)
```

```frameassembly
host peer_a { ip 192.0.2.1 }
host peer_b { ip 192.0.2.2 }

compile {
    peer_a -> peer_b tcp syn srcport 50179 dstport 179 ttl 1 wait 1ms
    peer_a <- peer_b tcp syn ack ttl 1 wait 1ms
    peer_a -> peer_b tcp ack ttl 1 wait 1ms
    peer_a -> peer_b bgp open asn 64512 holdtime 180 bgpid 192.0.2.1 ttl 1 wait 2ms
    peer_a <- peer_b bgp open asn 64513 holdtime 180 bgpid 192.0.2.2 ttl 1 wait 2ms
    peer_a -> peer_b bgp update prefix "198.51.100.0/24" nexthop 192.0.2.1 asn 64512 ttl 1
}
```

## 12.06 · Scapy VXLAN UDP/4789 Header Flags -> Declarative vxlan vni (`mig_scapy_vxlan_vni.frasm`)

Replaces manual VXLAN(flags=0x08, vni=10500) bitmask setup on UDP 4789 with the native vxlan protocol builder.

- **Protocols:** `vxlan` (1 Ethernet frame)
- **Wire Behavior:** Sets the VXLAN I-flag (0x08), 24-bit VNI 10500, and UDP destination port 4789 automatically.
- **Wireshark Filter:** `vxlan.vni == 10500`
- **CLI Build:** `frameassembly mig_scapy_vxlan_vni.frasm`

### Scapy VXLAN Framing

```python
from scapy.all import Ether, IP, UDP, VXLAN, wrpcap
pkt = Ether()/IP(src="10.250.0.1", dst="10.250.0.2", flags="DF")/UDP(sport=51000, dport=4789)/VXLAN(flags=0x08, vni=10500)
wrpcap("mig_scapy_vxlan_vni.pcap", [pkt])
```

```frameassembly
host leaf_vtep1 { ip 10.250.0.1 }
host leaf_vtep2 { ip 10.250.0.2 }

compile {
    leaf_vtep1 -> leaf_vtep2 vxlan vni 10500 srcport 51000 df payload "inner-tenant-frame"
}
```

## 12.07 · Python struct.pack() Raw Modbus MBAP Bytes -> Native modbus Builder (`mig_scapy_modbus_mbap.frasm`)

OT engineers frequently pack 12-byte Modbus MBAP + PDU structs by hand in Python. FrameAssembly builds request and isresponse MBAP frames natively.

- **Protocols:** `tcp`, `modbus` (5 Ethernet frames)
- **Wire Behavior:** Computes the 16-bit MBAP length field and function code 0x03 / 0x05 payloads on TCP 502.
- **Wireshark Filter:** `mbtcp`
- **CLI Build:** `frameassembly mig_scapy_modbus_mbap.frasm`

### Manual Python struct.pack(">HHHBBHH", ...) MBAP Payload

```python
import struct
from scapy.all import Ether, IP, TCP, Raw
mbap_pdu = struct.pack(">HHHBBHH", 0x0042, 0x0000, 6, 1, 0x03, 100, 2)
pkt = Ether()/IP(src="192.168.1.10", dst="192.168.1.50")/TCP(sport=50200, dport=502, flags="PA")/Raw(mbap_pdu)
```

```frameassembly
host hmi_01 { ip 192.168.1.10 }
host plc_01 { ip 192.168.1.50 }

compile {
    hmi_01 -> plc_01 tcp syn srcport 50200 dstport 502 wait 1ms
    hmi_01 <- plc_01 tcp syn ack wait 1ms
    hmi_01 -> plc_01 tcp ack wait 1ms
    hmi_01 -> plc_01 modbus readholdingregisters txid 0x0042 unitid 1 addr 100 count 2 wait 2ms
    hmi_01 <- plc_01 modbus readholdingregisters isresponse txid 0x0042 unitid 1 count 2
}
```

## 12.08 · Custom DNP3 CRC-16 Python Loops -> Native dnp3 Select-Before-Operate (`mig_dnp3_auto_crc16.frasm`)

Scapy has no built-in DNP3 layer in core, forcing scripts to implement IEEE 1815 reflected 0x3d65 CRC-16 loops over every 16-byte chunk. FrameAssembly emits valid DNP3 CROB frames directly.

- **Protocols:** `tcp`, `dnp3` (6 Ethernet frames)
- **Wire Behavior:** Calculates link-header and per-16-byte user-data CRC-16 octets automatically on port 20000.
- **Wireshark Filter:** `dnp3`
- **CLI Build:** `frameassembly mig_dnp3_auto_crc16.frasm`

### Manual DNP3 Header + Reflected 0x3d65 CRC-16 Requirement

```python
# Without FrameAssembly, every 8B header + 16B chunk needs custom CRC-16:
link_hdr = bytes([0x05, 0x64, 0x0c, 0xc4, 0x0a, 0x00, 0x01, 0x00])
hdr_crc = dnp3_crc16_le(link_hdr)  # custom ~crc16_0x3d65 implementation
```

```frameassembly
host scada_srv { ip 10.100.1.5 }
host rtu_10    { ip 10.100.2.10 }

compile {
    scada_srv -> rtu_10 tcp syn srcport 52010 dstport 20000 wait 1ms
    scada_srv <- rtu_10 tcp syn ack wait 1ms
    scada_srv -> rtu_10 tcp ack wait 1ms
    scada_srv -> rtu_10 dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms
    scada_srv <- rtu_10 dnp3 response src 10 dst 1 group 12 variation 1 wait 2ms
    scada_srv -> rtu_10 dnp3 operate src 1 dst 10 group 12 variation 1
}
```

## 12.09 · Wireshark Filter (dns.flags.rcode == 3 && ipv6) -> Deterministic .frasm Fixture (`mig_wireshark_ipv6_nxdomain.frasm`)

Turns a Wireshark display filter used in DNS threat-hunting detections (IPv6 AAAA NXDOMAIN responses) into a deterministic 2-packet CI test capture.

- **Protocols:** `dns` (2 Ethernet frames)
- **Wire Behavior:** rcode 3 sets DNS Response Code NXDOMAIN (Name Error) inside the 16-bit DNS flags word.
- **Wireshark Filter:** `dns.flags.rcode == 3 && ipv6`
- **CLI Build:** `frameassembly mig_wireshark_ipv6_nxdomain.frasm`

### Target Wireshark / tshark Detection Filter

```text
dns.flags.response == 1 && dns.flags.rcode == 3 && ipv6.src == 2001:db8:53::53
```

```frameassembly
host endpoint_v6 { ip 2001:db8:10::44 }
host resolver_v6 { ip 2001:db8:53::53 }

compile {
    endpoint_v6 -> resolver_v6 dns query txid 0x7a01 qname "dga-8891a.example.invalid" qtype "AAAA" wait 3ms
    endpoint_v6 <- resolver_v6 dns response txid 0x7a01 qname "dga-8891a.example.invalid" qtype "AAAA" rcode 3
}
```

## 12.10 · Wireshark Filter (tcp.analysis.retransmission) -> Exact RTO Replay Capture (`mig_wireshark_tcp_retrans.frasm`)

Generates a reproducible 250ms TCP retransmission fixture matching Wireshark tcp.analysis.retransmission without needing tc/netem packet loss.

- **Protocols:** `tcp`, `http` (6 Ethernet frames)
- **Wire Behavior:** Repeating seq 1001 after wait 250ms triggers Wireshark TCP Retransmission expert analysis.
- **Wireshark Filter:** `tcp.analysis.retransmission`
- **CLI Build:** `frameassembly mig_wireshark_tcp_retrans.frasm`

### Target Wireshark Expert Filter

```text
tcp.analysis.retransmission && tcp.port == 80
```

```frameassembly
host web_client { ip 10.15.1.20 }
host origin_srv { ip 10.15.2.80 }

compile {
    web_client -> origin_srv tcp syn srcport 51900 dstport 80 win 65535 mss 1460 wait 1ms
    web_client <- origin_srv tcp syn ack win 65535 mss 1460 wait 1ms
    web_client -> origin_srv tcp ack wait 1ms
    web_client -> origin_srv http get uri "/report.csv" hosthdr "data.internal" wait 250ms
    web_client -> origin_srv seq 1001 http get uri "/report.csv" hosthdr "data.internal" wait 2ms
    web_client <- origin_srv http status 200 reason "OK" body "id,status\n1,ok\n"
}
```

## 12.11 · tcprewrite L3-Only Rewrite vs. frameassembly reverse Full L2–L7 Redaction (`mig_reverse_l7_redaction.frasm`)

tcprewrite only rewrites Ethernet MACs and IPv4/IPv6 headers—leaving internal DNS qnames, TLS SNI hostnames, and HTTP Host headers exposed inside the payload. frameassembly reverse decompiles L2–L7 into editable .frasm text and recalculates lengths and checksums on recompile.

- **Protocols:** `dns`, `tcp`, `tls`, `http` (6 Ethernet frames)
- **Wire Behavior:** Changing qname, sni, and hosthdr from long internal names to short RFC 2606 .example names automatically updates IP Total Length, TCP seq/acknum, and checksums.
- **Wireshark Filter:** `dns || tls || http`
- **CLI Build:** `frameassembly reverse prod_incident.pcap scrubbed.frasm && frameassembly scrubbed.frasm safe_tac.pcap`

### tcprewrite Limitation (Leaves DNS / SNI / HTTP Host Leaking in Payload)

```bash
# Rewrites outer IPs only; L7 DNS/SNI/HTTP strings remain unredacted!
tcprewrite --pnat=10.0.0.0/8:198.51.100.0/24 -i prod_incident.pcap -o partial.pcap
```

```frameassembly
host host1 { ip 198.51.100.15 mac 02:00:00:00:00:01 }
host host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }
host host3 { ip 203.0.113.80  mac 02:00:00:00:00:03 }

compile {
    host1 -> host2 dns query txid 0x3100 qname "portal.example.com" qtype "A" wait 2ms
    host1 <- host2 dns response txid 0x3100 qname "portal.example.com" qtype "A" rdata "203.0.113.80" ansttl 300 wait 2ms
    host1 -> host3 tcp syn srcport 52100 dstport 443 win 65535 mss 1460 wait 1ms
    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms
    host1 -> host3 tcp ack wait 1ms
    host1 -> host3 tls clienthello sni "portal.example.com" alpn "http/1.1"
}
```

## 12.12 · text2pcap Static Hex Offsets -> Readable .frasm + hexpayload Trailer (`mig_text2pcap_hexpayload.frasm`)

Replaces brittle 0000 00 1c 73 ... text2pcap hex dumps with typed L2/L3/L4 headers and a concise hexpayload trailer for custom proprietary bytes.

- **Protocols:** `vlan`, `udp` (2 Ethernet frames)
- **Wire Behavior:** hexpayload accepts continuous, space-separated, or colon-separated hex octets and computes UDP/IP lengths and checksums automatically.
- **Wireshark Filter:** `vlan.id == 120 && udp.port == 31000`
- **CLI Build:** `frameassembly mig_text2pcap_hexpayload.frasm mig_text2pcap_hexpayload.pcapng`

### Legacy text2pcap Offset Dump (Breaks Checksums on Any Byte Edit)

```bash
# 0000  00 1c 73 00 00 02 00 1c 73 00 00 01 81 00 00 78 ...
text2pcap -u 50000,31000 raw_hex_dump.txt legacy.pcap
```

```frameassembly
host sensor_node { ip 10.120.1.10 mac 00:1c:73:00:00:01 }
host ingest_srv  { ip 10.120.1.20 mac 00:1c:73:00:00:02 }

compile {
    sensor_node -> ingest_srv vlan 120 udp srcport 50000 dstport 31000 hexpayload "ca:fe:ba:be:00:01:02:03" wait 500ns
    sensor_node <- ingest_srv vlan 120 udp hexpayload "ca:fe:ba:be:80:01:00:00"
}
```

## 12.13 · Binary .pcap Git Blobs -> Plain-Text .frasm Suricata & tshark CI Fixture (`mig_ci_suricata_smb_tls.frasm`)

Checking binary .pcap files into Git makes pull-request diffs unreadable. Storing plain-text .frasm fixtures lets CI compile fresh .pcap files on the fly for Suricata and tshark assertions.

- **Protocols:** `tcp`, `tls`, `smb` (12 Ethernet frames)
- **Wire Behavior:** frameassembly show prints the relative-timestamp packet ladder in CI logs without writing temporary files.
- **Wireshark Filter:** `tls || smb2`
- **CLI Build:** `frameassembly show mig_ci_suricata_smb_tls.frasm && frameassembly mig_ci_suricata_smb_tls.frasm ci_out.pcap`

### GitHub Actions / GitLab CI Verification Pipeline

```bash
frameassembly mig_ci_suricata_smb_tls.frasm ci_out.pcap
tshark -r ci_out.pcap -Y "tls.handshake.extensions_server_name || smb2.tree"
```

```frameassembly
host wkstn_ci { ip 10.88.1.15 }
host edge_ci  { ip 198.51.100.44 }
host fs_ci    { ip 10.88.2.45 }

compile {
    wkstn_ci -> edge_ci tcp syn srcport 51443 dstport 443 win 65535 mss 1460 wait 1ms
    wkstn_ci <- edge_ci tcp syn ack win 65535 mss 1460 wait 1ms
    wkstn_ci -> edge_ci tcp ack wait 1ms
    wkstn_ci -> edge_ci tls clienthello sni "updates.example.net" alpn "h2" wait 4ms
    wkstn_ci -> fs_ci tcp syn srcport 51445 dstport 445 win 65535 mss 1460 wait 1ms
    wkstn_ci <- fs_ci tcp syn ack win 65535 mss 1460 wait 1ms
    wkstn_ci -> fs_ci tcp ack wait 1ms
    wkstn_ci -> fs_ci smb negotiate msgid 0 wait 1ms
    wkstn_ci <- fs_ci smb negotiate msgid 0 status 0 wait 1ms
    wkstn_ci -> fs_ci smb sessionsetup msgid 1 sessionid 0x1001 wait 1ms
    wkstn_ci <- fs_ci smb sessionsetup msgid 1 sessionid 0x1001 status 0 wait 1ms
    wkstn_ci -> fs_ci smb treeconnect msgid 2 sessionid 0x1001 share "\\\\fs_ci\\IPC$"
}
```

## 12.14 · Sanitized Vendor TAC Capture (RFC 5737 Safe Subnets) (`tac_sanitized_support.frasm`)

Clean, share-ready template showing a reversed DNS + HTTPS trace scrubbed to RFC 5737 documentation IPs (198.51.100.x) and neutral example hostnames.

- **Protocols:** `dns`, `tcp`, `tls` (6 Ethernet frames)
- **Wire Behavior:** Run frameassembly reverse incident.pcap clean.frasm, swap your 10.x.x.x IPs and internal hostnames once, and rebuild a valid .pcap safe to attach to external tickets.
- **Wireshark Filter:** `dns || tls`
- **CLI Build:** `frameassembly tac_sanitized_support.frasm`

```frameassembly
// Reversed capture scrubbed to RFC 5737 documentation IPs before sending to vendor TAC
host host1 { ip 198.51.100.21 mac 02:00:00:00:00:01 }
host host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }
host host3 { ip 203.0.113.44  mac 02:00:00:00:00:03 }

compile {
    // 1. Redacted DNS lookup (replaced internal domain with sso.example.test)
    host1 -> host2 dns query txid 0x5120 qname "sso.example.test" qtype "A" wait 3ms
    host1 <- host2 dns response txid 0x5120 qname "sso.example.test" qtype "A" rdata "203.0.113.44" ansttl 120 wait 2ms

    // 2. Stateful TCP 443 handshake + TLS ClientHello with recalculated lengths & checksums
    host1 -> host3 tcp syn srcport 53400 dstport 443 win 65535 mss 1460 wait 1ms
    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms
    host1 -> host3 tcp ack wait 1ms
    host1 -> host3 tls clienthello sni "sso.example.test" alpn "h2"
}
```
