Code Examples & Playbooks · FrameAssembly v3.2.2 · 18 Commented Templates · 17 Deep-Dive Playbooks · 276 Wire Frames

Pre-Built .frasm Code Examples & Packet Playbooks

Browse 18 well-commented .frasm code templates organized for network technicians—covering Firewall Rule Testing, SNMP Trap Simulation, Basic Network Scanning, and Pentesting Scenarios—plus 17 deep-dive troubleshooting playbooks below.

Three Core FrameAssembly Workflows

01 · Create (.frasm -> .pcap)

Create stateful L2–L7 captures from scratch

Automatic 4-tuple TCP SEQ/ACK math, 802.1Q/QinQ/MPLS tags, and valid IPv4/IPv6 checksums with zero root sockets.

02 · Reverse & Redact (.pcap <-> .frasm)

Scrub IPs & usernames for vendor TAC ->

Reverse captures into text, redact sensitive headers or variable-length strings, and rebuild cleanly.

03 · Readable Captures in Git & CI

Diffable test fixtures in <1ms ->

Check readable .frasm files into Git and build .pcapng in CI via the standalone CLI or Rust crate.

Commented .frasm Snippet Library · 18 Technician Templates · 5 Operational Categories
New to .frasm? Start Interactive Tutorial ->

Pre-Built .frasm Code Examples by Task

Copy-ready, line-commented .frasm captures grouped by day-to-day network job. Click Preview Packets to inspect the generated wire frames right here in your browser, download a .pcap file directly, or open any template in the Playground to swap IPs, VLAN IDs, and ports.

Filter by Use Case Category
Showing 18 of 18 commented examples
01Firewall Rule Testingfw_vlan20_https_permit.frasm5 frames4 comment lines
Protocols: vlantcptls

Stateful VLAN 20 HTTPS Permit Check

Verifies an inter-VLAN firewall rule permits branch workstations on VLAN 20 to complete a 3-way TCP handshake and TLS 1.3 negotiation to an internal portal on port 443.

Technician Note: Stateful firewalls drop lone TLS packets without a prior SYN -> SYN-ACK -> ACK exchange. Specify srcport and dstport once on the opening syn line and FrameAssembly tracks ports and sequence numbers automatically.
Wireshark filter:vlan.id == 20 && tcp.port == 443
fw_vlan20_https_permit.frasm
Open in Playground
// Devices on Branch VLAN 20 and Internal Portal Subnet
host branch_pc { ip 10.20.10.25 }
host portal_srv { ip 10.20.90.80 }
compile {
// 1. Open TCP port 443 with an 802.1Q VLAN 20 tag (0x8100)
branch_pc -> portal_srv vlan 20 tcp syn srcport 51240 dstport 443 win 65535 mss 1460 wait 1ms
branch_pc <- portal_srv vlan 20 tcp syn ack win 65535 mss 1460 wait 1ms
branch_pc -> portal_srv vlan 20 tcp ack wait 1ms
// 2. Send TLS ClientHello with SNI so NGFW application control can inspect the hostname
branch_pc -> portal_srv vlan 20 tls clienthello sni "portal.corp.internal" alpn "h2" wait 2ms
// 3. Server completes TLS 1.3 ServerHello (0x1301 = TLS_AES_128_GCM_SHA256)
branch_pc <- portal_srv vlan 20 tls serverhello ciphersuite 0x1301
}
Local CLI Build, Inspect & Replay Commands
frameassembly fw_vlan20_https_permit.frasm
02Firewall Rule Testingfw_ssh_deny_policy.frasm4 frames3 comment lines
Protocols: tcpicmp

Blocked Management SSH Policy (TCP RST + ICMP Admin Prohibited)

Simulates a firewall rejecting unauthorized user-VLAN SSH attempts into the out-of-band switch management subnet using both TCP RST-ACK and ICMP Type 3 Code 13.

Technician Note: Great for verifying SIEM alerts on blocked management-plane access and training helpdesk techs to tell the difference between a firewall Reset and a silent drop.
Wireshark filter:tcp.port == 22 || icmp.code == 13
fw_ssh_deny_policy.frasm
Open in Playground
// User workstation, internal firewall interface, and protected core switch
host user_laptop { ip 10.10.40.85 }
host mgmt_fw { ip 10.10.40.1 }
host core_sw { ip 10.99.0.10 }
compile {
// Attempt #1: Workstation tries TCP 22 (SSH) -> Rejected inline with TCP RST-ACK
user_laptop -> core_sw tcp syn srcport 53110 dstport 22 win 65535 mss 1460 wait 1ms
user_laptop <- core_sw tcp rst ack wait 10ms
// Attempt #2: Workstation retries TCP 22 -> Firewall returns ICMP Admin Prohibited (Type 3, Code 13)
user_laptop -> core_sw tcp syn srcport 53111 dstport 22 win 65535 mss 1460 wait 2ms
mgmt_fw -> user_laptop icmp destunreach type 3 code 13
}
Local CLI Build, Inspect & Replay Commands
frameassembly fw_ssh_deny_policy.frasm
03Firewall Rule Testingfw_dmz_postgres_5432.frasm8 frames3 comment lines
Protocols: vlantcppostgres

DMZ Web App to Internal PostgreSQL (TCP 5432) Segmentation Check

Tests a narrow East-West firewall rule allowing a DMZ web server to authenticate and run a health query against an internal PostgreSQL database on TCP port 5432.

Technician Note: Feed this .pcap into Suricata or firewall packet-tracer tools to confirm deep-packet inspection recognizes valid PostgreSQL wire framing over VLAN 50.
Wireshark filter:vlan.id == 50 && tcp.port == 5432
fw_dmz_postgres_5432.frasm
Open in Playground
// DMZ application node and internal database host
host dmz_app { ip 172.16.50.20 }
host prod_db { ip 10.50.20.40 }
compile {
// 1. Complete 3-way TCP handshake on PostgreSQL port 5432 (VLAN 50)
dmz_app -> prod_db vlan 50 tcp syn srcport 52400 dstport 5432 win 65535 mss 1460 wait 1ms
dmz_app <- prod_db vlan 50 tcp syn ack win 65535 mss 1460 wait 1ms
dmz_app -> prod_db vlan 50 tcp ack wait 1ms
// 2. PostgreSQL v3.0 startup, auth OK, and lightweight SQL check
dmz_app -> prod_db vlan 50 postgres startup user "app_svc" db "orders" wait 1ms
dmz_app <- prod_db vlan 50 postgres authok wait 1ms
dmz_app -> prod_db vlan 50 postgres query sql "SELECT 1;" wait 2ms
dmz_app <- prod_db vlan 50 postgres commandcomplete wait 1ms
dmz_app <- prod_db vlan 50 postgres readyforquery
}
Local CLI Build, Inspect & Replay Commands
frameassembly fw_dmz_postgres_5432.frasm
04Firewall Rule Testingfw_pmtud_df_check.frasm5 frames4 comment lines
Protocols: tcphttpicmp

Path MTU Discovery Check (IPv4 DF Bit + ICMP Fragmentation Needed)

Checks that an edge firewall permits ICMP Type 3 Code 4 (Fragmentation Needed) when a Don't-Fragment (df) HTTPS segment hits a lower-MTU IPSec or GRE tunnel.

Technician Note: Blocking ICMP Type 3 Code 4 causes classic "pings work, but HTTPS hangs" tickets. Use df on IPv4 packets to set the Don't-Fragment bit cleanly.
Wireshark filter:ip.flags.df == 1 || (icmp.type == 3 && icmp.code == 4)
fw_pmtud_df_check.frasm
Open in Playground
// Branch client, VPN tunnel router (1400-byte MTU), and remote web server
host branch_client { ip 10.25.1.15 }
host vpn_router { ip 10.25.1.1 }
host remote_web { ip 10.90.5.80 }
compile {
// 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)
branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms
branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms
branch_client -> remote_web tcp ack df wait 1ms
// 2. Client sends HTTP request with Don't-Fragment (df) flag set
branch_client -> remote_web http post uri "/upload" hosthdr "files.corp.internal" body "large-unfragmentable-payload-block" df wait 2ms
// 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)
vpn_router -> branch_client icmp destunreach type 3 code 4
}
Local CLI Build, Inspect & Replay Commands
frameassembly fw_pmtud_df_check.frasm
05SNMP Trap Simulationsnmpv2c_linkdown_trap.frasm2 frames3 comment lines
Protocols: snmp2

SNMPv2c Switch Uplink linkDown Trap (UDP 162)

Sends a standard SNMPv2c linkDown trap on UDP port 162 carrying sysUpTime, snmpTrapOID.0, interface name Gi1/0/24, and operational state varbinds.

Technician Note: No vendor MIB files are needed: 1.3.6.1.6.3.1.1.4.1.0 is snmpTrapOID.0, and oidval 1.3.6.1.6.3.1.1.5.3 identifies standard linkDown (use .5.4 for linkUp).
Wireshark filter:snmp && udp.port == 162
snmpv2c_linkdown_trap.frasm
Open in Playground
// Access switch sending a Trapv2-PDU to your monitoring server
host access_sw { ip 10.30.2.14 }
host nms_srv { ip 10.30.0.100 }
compile {
// SNMPv2c linkDown (.5.3) trap for uplink Gi1/0/24 (ifIndex 24, ifOperStatus 2 = down)
access_sw -> nms_srv snmp2 trap community "noc-traps" reqid 401 sysuptime 245000 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.24 string "Gi1/0/24" varbind 1.3.6.1.2.1.2.2.1.8.24 int 2 wait 500ms
// Recovery: SNMPv2c linkUp (.5.4) trap 500ms later (ifOperStatus 1 = up)
access_sw -> nms_srv snmp2 trap community "noc-traps" reqid 402 sysuptime 245050 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.24 string "Gi1/0/24" varbind 1.3.6.1.2.1.2.2.1.8.24 int 1
}
Local CLI Build, Inspect & Replay Commands
frameassembly snmpv2c_linkdown_trap.frasm
06SNMP Trap Simulationsnmpv3_authpriv_trap.frasm1 frames3 comment lines
Protocols: snmp3

Encrypted SNMPv3 authPriv Trap (SHA-256 + AES-128)

Generates a fully authenticated and AES-128-encrypted SNMPv3 USM trap so NOC teams can verify Zabbix, PRTG, Checkmk, or snmptrapd decryption keys safely.

Technician Note: Enter user "noc-secops", engineid "80001f888001020304", SHA-256 pass "AuthPass2026!", and AES pass "PrivPass2026!" in Wireshark -> Preferences -> Protocols -> SNMP -> Users Table to decrypt.
Wireshark filter:snmp && udp.port == 162
snmpv3_authpriv_trap.frasm
Open in Playground
// Core distribution switch and SNMPv3 trap collector
host core_sw { ip 10.40.1.1 }
host nms_srv { ip 10.40.1.100 }
compile {
// Encrypted SNMPv3 USM trap (HMAC-SHA-256 auth + AES-128-CFB encryption) on UDP 162
// engineid must be an even-length hex string matching your snmptrapd createUser -e setting
core_sw -> nms_srv snmp3 trap user "noc-secops" engineid "80001f888001020304" engineboots 5 enginetime 1840 auth sha256 "AuthPass2026!" priv aes "PrivPass2026!" sysuptime 360000 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/1/0"
}
Local CLI Build, Inspect & Replay Commands
frameassembly snmpv3_authpriv_trap.frasm
07SNMP Trap Simulationsnmpv3_inform_ack.frasm2 frames3 comment lines
Protocols: snmp3

Acknowledged SNMPv3 Inform + NMS Response

Models a confirmed SNMPv3 InformRequest on UDP 162 and the matching Response-PDU returned by the NMS collector so router retry queues clear cleanly.

Technician Note: Unlike fire-and-forget traps, an SNMP inform expects a response with the same reqid; use <- so the NMS reply automatically flips UDP ports (162 -> 49152).
Wireshark filter:snmp
snmpv3_inform_ack.frasm
Open in Playground
// WAN edge router sending a confirmed SNMPv3 Inform to the central NMS
host wan_rtr { ip 172.20.0.1 }
host nms_srv { ip 172.20.0.50 }
compile {
// 1. Router sends encrypted SNMPv3 Inform (reqid 910) reporting BGP neighbor loss
wan_rtr -> nms_srv snmp3 inform user "wan-ops" engineid "80001f8880aabbccdd" engineboots 8 enginetime 4200 auth sha256 "WanAuthKey99!" priv aes "WanPrivKey99!" reqid 910 sysuptime 980000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.15.7.2 varbind 1.3.6.1.2.1.15.3.1.7.1 string "198.51.100.1" wait 4ms
// 2. NMS acknowledges receipt with matching reqid 910 so router stops retransmitting
wan_rtr <- nms_srv snmp3 response user "wan-ops" engineid "80001f8880aabbccdd" engineboots 8 enginetime 4200 auth sha256 "WanAuthKey99!" priv aes "WanPrivKey99!" reqid 910 varbind 1.3.6.1.2.1.15.3.1.7.1 string "198.51.100.1"
}
Local CLI Build, Inspect & Replay Commands
frameassembly snmpv3_inform_ack.frasm
08SNMP Trap Simulationups_battery_trap_syslog.frasm2 frames3 comment lines
Protocols: syslogsnmp2

Rack UPS On-Battery Trap + Syslog Alert Correlation

Combines an RFC 5424 critical Syslog event (UDP 514) with an SNMPv2c UPS battery-power trap (UDP 162) to test NOC event deduplication and paging rules.

Technician Note: Handy for testing Graylog/Splunk + Zabbix alert correlation without flipping the breaker on the server-room PDU.
Wireshark filter:syslog || snmp
ups_battery_trap_syslog.frasm
Open in Playground
// Rack UPS management card and NOC monitoring collector
host rack_ups { ip 10.40.10.15 }
host noc_srv { ip 10.40.1.100 }
compile {
// 1. Critical Syslog alert (facility 16 = local0, severity 2 = critical) on UDP 514
rack_ups -> noc_srv syslog facility 16 severity 2 hostname "ups-row-b02" app "POWER" msg "Utility AC lost: switched to battery (est runtime 18 min)" wait 3ms
// 2. Matching SNMPv2c UPS on-battery trap (1.3.6.1.2.1.33.2.1 = upsTrapOnBattery) on UDP 162
rack_ups -> noc_srv snmp2 trap community "dc-facilities" reqid 77 sysuptime 864000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.33.2.1 varbind 1.3.6.1.2.1.33.1.2.3.0 int 18
}
Local CLI Build, Inspect & Replay Commands
frameassembly ups_battery_trap_syslog.frasm
09Basic Network Scanningscan_arp_lan_sweep.frasm5 frames4 comment lines
Protocols: arp

Local Subnet ARP Discovery Sweep

Broadcasts Layer 2 ARP Who-Has requests across three local subnet IPs, showing two online hosts answering with their MACs and one unused IP staying silent.

Technician Note: arp request automatically sets the Ethernet destination MAC to ff:ff:ff:ff:ff:ff (broadcast), while <- arp reply sends a unicast response straight back to the scanner.
Wireshark filter:arp
scan_arp_lan_sweep.frasm
Open in Playground
// Technician laptop scanning three local /24 addresses on the same VLAN
host tech_laptop { ip 192.168.10.200 mac 00:1a:2b:00:00:aa }
host router_gw { ip 192.168.10.1 mac 00:1c:73:00:00:01 }
host nas_box { ip 192.168.10.50 mac 00:11:32:aa:bb:cc }
host unused_ip { ip 192.168.10.51 }
compile {
// Probe .1 -> Gateway answers with its MAC
tech_laptop -> router_gw arp request senderip 192.168.10.200 targetip 192.168.10.1 wait 1ms
tech_laptop <- router_gw arp reply senderip 192.168.10.1 targetip 192.168.10.200 wait 2ms
// Probe .50 -> NAS answers with its MAC
tech_laptop -> nas_box arp request senderip 192.168.10.200 targetip 192.168.10.50 wait 1ms
tech_laptop <- nas_box arp reply senderip 192.168.10.50 targetip 192.168.10.200 wait 2ms
// Probe .51 -> No host owns this IP, so no ARP reply comes back
tech_laptop -> unused_ip arp request senderip 192.168.10.200 targetip 192.168.10.51
}
Local CLI Build, Inspect & Replay Commands
frameassembly scan_arp_lan_sweep.frasm
10Basic Network Scanningscan_icmp_ping_sweep.frasm6 frames4 comment lines
Protocols: icmp

ICMP Ping Sweep (Live Replies vs. Host Unreachable)

Pings three subnet targets in sequence: two active servers answer with Echo Reply, while the router reports Host Unreachable (Type 3, Code 1) for a dead address.

Technician Note: Use this capture in Wireshark training to compare fast sub-millisecond LAN replies against router-generated ICMP Destination Unreachable responses.
Wireshark filter:icmp
scan_icmp_ping_sweep.frasm
Open in Playground
// Admin workstation, branch router, and three target IPs
host admin_pc { ip 10.12.0.50 }
host branch_rtr { ip 10.12.10.1 }
host dns_01 { ip 10.12.10.10 }
host print_01 { ip 10.12.10.20 }
host offline_pc { ip 10.12.10.99 }
compile {
// Target 1 (.10): Online DNS server replies in 1ms
admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms
admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms
// Target 2 (.20): Online printer replies in 2ms
admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms
admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms
// Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)
admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms
branch_rtr -> admin_pc icmp destunreach type 3 code 1
}
Local CLI Build, Inspect & Replay Commands
frameassembly scan_icmp_ping_sweep.frasm
11Basic Network Scanningscan_tcp_syn_ports.frasm10 frames5 comment lines
Protocols: tcp

TCP SYN Half-Open Port Scan (Ports 22, 80, 443, 3389)

Models an Nmap-style -sS half-open port check across SSH (22), HTTP (80), HTTPS (443), and RDP (3389), contrasting open SYN-ACK ports against closed RST-ACK ports.

Technician Note: In a half-open SYN scan, the scanner immediately sends tcp rst after receiving syn ack instead of completing the 3rd handshake packet.
Wireshark filter:tcp.flags.syn == 1 || tcp.flags.reset == 1
scan_tcp_syn_ports.frasm
Open in Playground
// Vulnerability scanner checking common TCP ports on a Linux web server
host scanner { ip 10.10.99.10 }
host web_srv { ip 10.10.20.40 }
compile {
// Port 22 (SSH) -> Open: server sends SYN-ACK, scanner tears down with RST
scanner -> web_srv tcp syn srcport 55001 dstport 22 win 1024 mss 1460 wait 1ms
scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms
scanner -> web_srv tcp rst wait 2ms
// Port 80 (HTTP) -> Closed: server replies immediately with RST-ACK
scanner -> web_srv tcp syn srcport 55002 dstport 80 win 1024 mss 1460 wait 1ms
scanner <- web_srv tcp rst ack wait 2ms
// Port 443 (HTTPS) -> Open: server sends SYN-ACK, scanner tears down with RST
scanner -> web_srv tcp syn srcport 55003 dstport 443 win 1024 mss 1460 wait 1ms
scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms
scanner -> web_srv tcp rst wait 2ms
// Port 3389 (RDP) -> Closed: server replies with RST-ACK
scanner -> web_srv tcp syn srcport 55004 dstport 3389 win 1024 mss 1460 wait 1ms
scanner <- web_srv tcp rst ack
}
Local CLI Build, Inspect & Replay Commands
frameassembly scan_tcp_syn_ports.frasm
12Basic Network Scanningscan_udp_services.frasm6 frames4 comment lines
Protocols: dnsntpudpicmp

UDP Service Probe (DNS 53, NTP 123 & Closed Port ICMP Unreachable)

Probes UDP 53 (DNS), UDP 123 (NTP), and closed UDP 1900 on an infrastructure host to show open UDP protocol replies vs. ICMP Port Unreachable (Type 3, Code 3).

Technician Note: Closed UDP ports do not send TCP RSTs—instead, the target OS sends an ICMP Destination Unreachable (Code 3: Port Unreachable) packet.
Wireshark filter:dns || ntp || udp.port == 1900 || icmp
scan_udp_services.frasm
Open in Playground
// Audit host checking active UDP services on an internal infrastructure server
host audit_pc { ip 10.15.0.25 }
host infra_srv { ip 10.15.1.10 }
compile {
// 1. UDP 53 (DNS) -> Open: answers standard A-record query
audit_pc -> infra_srv dns query txid 0x1001 qname "ns1.corp.local" qtype "A" wait 2ms
audit_pc <- infra_srv dns response txid 0x1001 qname "ns1.corp.local" qtype "A" rdata "10.15.1.10" wait 3ms
// 2. UDP 123 (NTP) -> Open: answers client mode 3 poll with server mode 4 stratum 2
audit_pc -> infra_srv ntp vn 4 mode 3 poll 6 wait 2ms
audit_pc <- infra_srv ntp vn 4 mode 4 stratum 2 refid "GPS" wait 3ms
// 3. UDP 1900 -> Closed: server OS returns ICMP Port Unreachable (Type 3, Code 3)
audit_pc -> infra_srv udp srcport 55200 dstport 1900 payload "M-SEARCH" wait 2ms
infra_srv -> audit_pc icmp destunreach type 3 code 3
}
Local CLI Build, Inspect & Replay Commands
frameassembly scan_udp_services.frasm
13Pentesting Scenariospentest_ids_xmas_scan.frasm5 frames4 comment lines
Protocols: tcp

TCP Xmas (FIN+PSH+URG), SYN+FIN & Stealth FIN Scan for IDS Validation

Crafts abnormal TCP flag combinations (Xmas FIN+PSH+URG, illegal SYN+FIN, and unsolicited stealth FIN probe) to verify Suricata, Snort, or Zeek scan-detection rules fire in the lab.

Technician Note: Replay against Suricata (suricata -r pentest_ids_xmas_scan.pcap) during purple-team validation without running live scanner binaries on production segments.
Wireshark filter:tcp.flags == 0x029 || tcp.flags == 0x003 || tcp.flags == 0x001
pentest_ids_xmas_scan.frasm
Open in Playground
// Authorized purple-team host testing IDS/IPS abnormal TCP flag signatures
host red_lab_box { ip 172.18.99.50 }
host dmz_target { ip 172.18.10.25 }
compile {
// 1. TCP Xmas Scan: lights up FIN + PSH + URG simultaneously on port 443
red_lab_box -> dmz_target tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0 wait 2ms
red_lab_box <- dmz_target tcp rst ack wait 4ms
// 2. Illegal SYN + FIN combination: tests stateless ACL bypass rules on port 80
red_lab_box -> dmz_target tcp syn fin srcport 56102 dstport 80 win 1024 wait 2ms
red_lab_box <- dmz_target tcp rst ack wait 4ms
// 3. TCP FIN Stealth Scan (-sF): unsolicited lone FIN segment with custom seq 5000 on port 22
red_lab_box -> dmz_target tcp fin srcport 56103 dstport 22 seq 5000 win 1024
}
Local CLI Build, Inspect & Replay Commands
frameassembly pentest_ids_xmas_scan.frasm
14Pentesting Scenariospentest_qinq_vlan_hop.frasm2 frames3 comment lines
Protocols: qinqvlanicmp

802.1ad QinQ Double-Tag VLAN Hopping Trunk Audit

Builds an 802.1ad/802.1Q double-tagged frame (outer S-VLAN 100 + inner C-VLAN 20) to verify access switch ports drop unexpected outer tags instead of forwarding into a protected VLAN.

Technician Note: qinq 100 innervlan 20 stacks outer EtherType 0x88a8 (VID 100) ahead of inner EtherType 0x8100 (VID 20) so you can audit trunk native-VLAN hardening.
Wireshark filter:vlan.id == 100 || vlan.id == 20
pentest_qinq_vlan_hop.frasm
Open in Playground
// Lab test host on VLAN 100 auditing switch isolation toward restricted VLAN 20
host audit_port { ip 10.20.0.99 mac 02:aa:bb:cc:dd:01 }
host restricted { ip 10.20.0.10 mac 00:1c:73:20:00:10 }
compile {
// 1. Send double-tagged frame (outer S-Tag 100, inner C-Tag 20)
audit_port -> restricted qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload "vlan-hop-audit" wait 3ms
// 2. Simulated misconfigured trunk stripping outer tag and delivering single-tagged VLAN 20 frame
audit_port -> restricted vlan 20 icmp echorequest id 0x1337 seq 1 payload "vlan-hop-audit"
}
Local CLI Build, Inspect & Replay Commands
frameassembly pentest_qinq_vlan_hop.frasm
15Pentesting Scenariospentest_ad_kerberos_smb.frasm10 frames3 comment lines
Protocols: kerberostcpsmb

Active Directory RC4 Kerberoasting + ADMIN$ SMB Lateral Check

Simulates an RC4-HMAC (etype 23) Kerberos service ticket request on port 88 followed by an SMB2 ADMIN$ share connection on TCP 445 to validate SOC lateral-movement alerts.

Technician Note: Lets blue-team and SOC engineers verify Zeek kerberos.log / smb_mapping.log and SIEM correlation rules safely without touching a live Domain Controller.
Wireshark filter:kerberos || smb2
pentest_ad_kerberos_smb.frasm
Open in Playground
// Lab workstation, Active Directory KDC, and Windows member server
host lab_wkstn { ip 10.10.20.44 }
host ad_dc01 { ip 10.10.0.10 }
host file_srv { ip 10.10.1.45 }
compile {
// Phase 1: Request SQL SPN ticket downgraded to RC4-HMAC (etype 23 = Kerberoasting test)
lab_wkstn -> ad_dc01 kerberos tgsreq realm "CORP.INTERNAL" cname "svc_test" sname "MSSQLSvc/sql01.corp.internal:1433" etype 23 wait 2ms
lab_wkstn <- ad_dc01 kerberos tgsrep realm "CORP.INTERNAL" cname "svc_test" sname "MSSQLSvc/sql01.corp.internal:1433" etype 23 wait 5ms
// Phase 2: Open TCP 445 to member server and connect to administrative share ADMIN$
lab_wkstn -> file_srv tcp syn srcport 52445 dstport 445 win 65535 mss 1460 wait 1ms
lab_wkstn <- file_srv tcp syn ack win 65535 mss 1460 wait 1ms
lab_wkstn -> file_srv tcp ack wait 1ms
lab_wkstn -> file_srv smb negotiate msgid 0 wait 1ms
lab_wkstn <- file_srv smb negotiate msgid 0 status 0 wait 1ms
lab_wkstn -> file_srv smb sessionsetup msgid 1 sessionid 0x2001 wait 1ms
lab_wkstn <- file_srv smb sessionsetup msgid 1 sessionid 0x2001 status 0 wait 1ms
lab_wkstn -> file_srv smb treeconnect msgid 2 sessionid 0x2001 share "\\file_srv\ADMIN$"
}
Local CLI Build, Inspect & Replay Commands
frameassembly pentest_ad_kerberos_smb.frasm
16Pentesting Scenariospentest_garp_egress_tls.frasm5 frames3 comment lines
Protocols: arptcptls

Gratuitous ARP Spoof Test & Unauthorized Egress TLS SNI Audit

Tests switch Dynamic ARP Inspection (DAI) against an unauthorized Gratuitous ARP claim, followed by an egress TLS ClientHello to an unapproved external domain.

Technician Note: arp gratuitous broadcasts senderip == targetip to ff:ff:ff:ff:ff:ff—ideal for verifying DAI port-shutdown rules in a isolated lab.
Wireshark filter:arp.isgratuitous || tls.handshake.extensions_server_name
pentest_garp_egress_tls.frasm
Open in Playground
// Rogue lab device, default gateway IP, and external cloud endpoint
host rogue_box { ip 10.20.5.99 mac 02:de:ad:be:ef:99 }
host vlan_gw { ip 10.20.5.1 mac 00:1c:73:05:00:01 }
host ext_storage { ip 198.51.100.77 }
compile {
// 1. Gratuitous ARP announcement claiming the gateway's 10.20.5.1 IP (tests switch DAI)
rogue_box -> vlan_gw arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99 wait 5ms
// 2. Outbound TCP 443 + TLS ClientHello to test egress SNI filtering / DLP alerts
rogue_box -> ext_storage tcp syn srcport 54900 dstport 443 win 65535 mss 1460 wait 2ms
rogue_box <- ext_storage tcp syn ack win 65535 mss 1460 wait 2ms
rogue_box -> ext_storage tcp ack wait 1ms
rogue_box -> ext_storage tls clienthello sni "unapproved-drop.example.net" alpn "h2"
}
Local CLI Build, Inspect & Replay Commands
frameassembly pentest_garp_egress_tls.frasm
17Troubleshooting & PCAP Scrubbingtroubleshoot_zero_window.frasm7 frames5 comment lines
Protocols: tcphttp

Application Stall: TCP Zero-Window & Retransmission

Demonstrates the difference between a network packet drop (manual seq retransmission) and an overloaded server advertising TCP win 0 ("buffer full, pause sending").

Technician Note: When application teams blame the network for slow transfers, TCP ZeroWindow in Wireshark proves the receiving server paused the sender because its socket buffer filled up.
Wireshark filter:tcp.analysis.zero_window || tcp.analysis.retransmission
troubleshoot_zero_window.frasm
Open in Playground
// Client uploading report data to a busy backend web server
host client_pc { ip 10.10.15.30 }
host busy_srv { ip 10.10.80.40 }
compile {
// 1. Establish TCP connection on port 8080
client_pc -> busy_srv tcp syn srcport 51800 dstport 8080 win 65535 mss 1460 wait 1ms
client_pc <- busy_srv tcp syn ack win 65535 mss 1460 wait 1ms
client_pc -> busy_srv tcp ack wait 1ms
// 2. Client sends HTTP POST; packet drops on WAN, so client retransmits same seq 1001 after 200ms
client_pc -> busy_srv http post uri "/ingest" hosthdr "reports.corp.local" body "batch-01-payload" wait 200ms
client_pc -> busy_srv seq 1001 http post uri "/ingest" hosthdr "reports.corp.local" body "batch-01-payload" wait 2ms
// 3. Overloaded server ACKs the data with win 0 (TCP ZeroWindow: socket buffer exhausted!)
client_pc <- busy_srv tcp ack win 0 wait 150ms
// 4. Server drains buffer and sends Window Update (win 32768) so transfer can resume
client_pc <- busy_srv tcp ack win 32768
}
Local CLI Build, Inspect & Replay Commands
frameassembly troubleshoot_zero_window.frasm
18Troubleshooting & PCAP Scrubbingtac_sanitized_support.frasm6 frames3 comment lines
Protocols: dnstcptls

Sanitized Vendor TAC Capture (RFC 5737 Safe Subnets)

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

Technician Note: 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
tac_sanitized_support.frasm
Open in Playground
// 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"
}
Local CLI Build, Inspect & Replay Commands
frameassembly tac_sanitized_support.frasm
Extended Field Playbooks · 17 Multi-Protocol Walkthroughs & Tool Comparisons

Deep-Dive Troubleshooting & Lab Playbooks

Explore full background stories, CLI commands, and side-by-side comparisons against Scapy, tcprewrite, and text2pcap across VoIP, routing, tunnels, industrial control, and CI regression suites.

Showing 17 of 17 runnable examples

Role Track

Protocol:

Matching Packet Use Cases

Browser Tab -> Terminal & Git

Have another packet chore worth adding here?

Send a quick note, or grab the local frameassembly binary so your test captures live as readable text in Git instead of capture_final_v4.pcap.

CLI & VS Code ->