Chapter 0: Introduction and Use Cases
Why FrameAssembly exists for network technicians, four everyday packet jobs it solves without Python or root sockets, and a 30-second live sandbox warm-up.
Why FrameAssembly Exists
Building a 5-packet test .pcap—or changing two IP addresses inside an existing capture—should not require a Python environment, root privileges, or three lab VMs.
On a real shift, network technicians need test packets fast: verifying that Zabbix or PRTG actually pages on an encrypted SNMPv3 linkDown trap, proving a Friday-night VLAN 20 firewall ACL passes HTTPS before Monday morning, testing IDS scan alerts, or scrubbing private customer subnets before attaching a .pcap to a vendor TAC ticket.
Traditional packet tools get in the way. Python + Scapy forces you to wrestle imports, sudo raw-socket permissions, and manual TCP sequence math. Meanwhile tcprewrite can swap outer Layer 3 IPs, only to break packet lengths and checksums the moment an internal DNS hostname or TLS SNI changes length.
FrameAssembly (.frasm <-> .pcap) treats packet captures like a readable whiteboard ladder diagram: list your devices in host, draw -> and <- packet lines inside compile, and let the local compiler build every Ethernet tag, IP length, stateful TCP counter, and SNMPv3 key—or reverse any existing .pcap back into plain text.
host fw { ip 10.20.90.80 }
pc -> fw vlan 20 tcp syn dstport 443
Draw -> and <- arrows instead of debugging Python scripts
If you know what an IP address, VLAN ID, TCP SYN, or ping reply is, you can read and write .frasm in minutes. Every built-in keyword is plain lowercase letters and digits with zero underscores.
Builds .pcap & .pcapng files safely in user space
No sudo, no Npcap kernel drivers on a locked-down admin laptop, and zero live traffic put on the wire until you choose to replay the file with tcpreplay or suricata -r.
Tracks seq / acknum & flips ports on <- replies automatically
Stateful firewalls and IDS sensors drop lone spoofed packets. FrameAssembly tracks 4-tuple TCP handshakes and calculates every Layer 2–7 length and checksum automatically.
Reverse existing .pcap files into text, scrub secrets, and rebuild
Convert any binary Wireshark trace into .frasm text, replace private IPs, MACs, VLANs, or internal hostnames, and rebuild a clean .pcap with valid checksums.
Load a Real Use Case into the Live Sandbox
Click any preset below to load commented .frasm code into the right-hand sandbox and inspect the resulting Ethernet, VLAN, IP, TCP, and SNMPv3 headers immediately.
Dry-run a Friday-night VLAN 20 firewall ACL and IPS policy to verify branch users can establish HTTPS (TCP 443) to an internal portal before Monday morning.
Builds a complete 3-way -> / <- TCP handshake, auto-swaps ports, and stamps 802.1Q VLAN 20 onto every frame.
Origin Story & Full Lab Syllabus (Chapters 1–6)
Chapter 1: Core Syntax & Basic Ping (host + compile)
A user ticket claims "the LAN is down." Build a clean 4-packet ping capture (laptop -> gateway and laptop -> dns_srv) to test Wireshark display filters and baseline connectivity.
Chapter 2: Basic Examples — Reply Arrows (<-), Timing (wait) & DNS
Users at a remote branch complain logins take forever. Build a capture showing a sluggish 250ms WAN DNS lookup followed by a quick ping so junior techs can spot DNS lag in Wireshark.
Chapter 3: Firewall Rule Testing (802.1Q vlan & Stateful TCP)
You need to validate a firewall ACL permitting VLAN 100 clients to reach an internal API on TCP port 8080—and Windows/macOS NIC drivers keep stripping 802.1Q tags from live captures.
Chapter 4: SNMP Trap Simulation & Syslog Alerts (snmp2, snmp3 & syslog)
Verify your NMS pages the on-call engineer when building uplink Gi1/0/24 goes down—without unplugging the fiber feeding Building 2.
Chapter 5: Multi-Subnet Policy Checks with Reusable flow(c, s)
Three campus user VLANs (floor1_pc, floor2_pc, wifi_user) all need to pass the same 4-packet TCP + TLS handshake to sso_gw without copy-pasting 12 lines.
Chapter 6: Reverse .pcap -> Scrub Secrets -> Rebuild .pcap
Vendor TAC asks for your failing login .pcap, except it exposes 10.99.4.x and "payroll.secret-corp.internal" inside DNS and TLS SNI — scrub both before uploading.
Pre-Built Code Examples, Cursed Packets & Cheat Sheets
Cursed Packets Cookbook
Forged middlebox RSTs, QinQ native-VLAN leaks, TCP seq puzzles & OT breaker audits.
Edit & Scrub .pcap Files
Reverse captures into text, redact internal IPs/SNIs, and rebuild clean checksums.
Test Firewalls, Suricata & OT
3-line TCP handshakes for flow:established rules, Xmas scans, and IPv4 fragments.
Wireshark / Scapy -> .frasm
One-page map from Wireshark display filters and tcpdump flags to exact v3.2.2 syntax.
30-Second Warm-Up: Swap a Host IP & Watch Every Header UpdateChange one IP in the sandbox and watch every packet header & checksum update live
Test any of the 4 use-case presets above or edit the .frasm code on the right. To complete Chapter 0, change the first host IP address (for example 10.20.10.25 -> 10.20.10.50) and click Check Warm-Up.
- 1.Locate the first
hostdeclaration near the top of the editor on the right. - 2.Change its IPv4 address to another valid host IP (e.g.
10.20.10.50) — plain IP only, no/24subnet mask. - 3.Click Check Warm-Up and confirm every packet header and checksum updates cleanly.
vlan.id == 20 && tcp.port == 443