Anthology 07Layer 713 CapturesFrameAssembly v3.2.2
Raw .mdllms-full.txt

TLS 1.3 SNI, QUIC, HTTP/1.1, HTTP/2, gRPC & WebSocket APIs

Modern web, reverse-proxy, WAF, and service-mesh traffic fixtures: TLS 1.3 clienthello SNI/ALPN, quic long/short headers, http hosthdr REST calls, http2 streams, grpc status trails, and websocket frames.

Key Takeaways
  • Use hosthdr "<domain>" on http and ssdp frames (host is reserved for top-level endpoint declarations).
  • tls clienthello populates SNI and ALPN extensions cleanly over a 3-way TCP handshake so NGFW application-ID rules trigger reliably.
  • http2, grpc, and websocket frame binary stream identifiers, length prefixes, and masking bits on top of stateful TCP.
Companion walkthrough:Poke Firewalls, Suricata & OT
Example 07.017 Ethernet framesFilter: http

HTTP/1.1 API Authentication & Rate-Limit Response (429 Too Many Requests)

Tests WAF and API-gateway rules with repeatable custom header key/value pairs, JSON POST bodies, and HTTP 429 rate-limit replies.

Wire details: Uses hosthdr for the HTTP Host header and computes Content-Length automatically from body.

http_api_ratelimit_429.frasm12 lines
Open in Playground
host api_client { ip 10.42.10.15 }
host waf_edge { ip 10.42.90.80 }
compile {
api_client -> waf_edge tcp syn srcport 51080 dstport 80 win 65535 mss 1460 wait 1ms
api_client <- waf_edge tcp syn ack win 65535 mss 1460 wait 1ms
api_client -> waf_edge tcp ack wait 1ms
api_client -> waf_edge http post uri "/v2/tokens" hosthdr "auth.corp.internal" contenttype "application/json" header "X-Request-Id" "req-9012" body "{\"grant\":\"client_credentials\"}" wait 2ms
api_client <- waf_edge http status 200 reason "OK" contenttype "application/json" body "{\"active\":true}" wait 3ms
api_client -> waf_edge http post uri "/v2/tokens" hosthdr "auth.corp.internal" contenttype "application/json" header "X-Request-Id" "req-9013" body "{\"grant\":\"client_credentials\"}" wait 2ms
api_client <- waf_edge http status 429 reason "Too Many Requests" header "Retry-After" "60" body "{\"error\":\"rate_limited\"}"
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly http_api_ratelimit_429.frasm
Protocol references:tcp(TCP & RFC 7323)http(HTTP/1.1)
Example 07.027 Ethernet framesFilter: http2 || grpc || tcp.port == 50051

Service-Mesh gRPC Unary Call & Status Code Verification (TCP 50051)

Establishes a TCP 50051 channel between two Kubernetes pods and exercises a unary gRPC call returning grpcstatus 0 (OK) followed by grpcstatus 14 (UNAVAILABLE).

Wire details: Builds HTTP/2 HEADERS + length-prefixed gRPC data + trailing grpc-status frames over stateful TCP.

service_mesh_grpc_check.frasm12 lines
Open in Playground
host checkout_pod { ip 10.244.1.18 }
host ledger_pod { ip 10.244.2.44 }
compile {
checkout_pod -> ledger_pod tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms
checkout_pod <- ledger_pod tcp syn ack win 65535 mss 1460 wait 1ms
checkout_pod -> ledger_pod tcp ack wait 1ms
checkout_pod -> ledger_pod grpc service "ledger.v1.LedgerService" method "ReserveFunds" streamid 1 payload "order-8841" wait 2ms
checkout_pod <- ledger_pod grpc service "ledger.v1.LedgerService" method "ReserveFunds" streamid 1 grpcstatus 0 wait 4ms
checkout_pod -> ledger_pod grpc service "ledger.v1.LedgerService" method "CommitBatch" streamid 3 payload "batch-99" wait 2ms
checkout_pod <- ledger_pod grpc service "ledger.v1.LedgerService" method "CommitBatch" streamid 3 grpcstatus 14
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly service_mesh_grpc_check.frasm
Protocol references:tcp(TCP & RFC 7323)grpc(gRPC)
Example 07.035 Ethernet framesFilter: vlan.id == 20 && tcp.port == 443

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.

Wire details: 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.

fw_vlan20_https_permit.frasm16 lines
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
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly fw_vlan20_https_permit.frasm
Example 07.045 Ethernet framesFilter: http

Minimal Two-Block HTTP/1.1 (http) Quickstart

Smallest zero-boilerplate host + compile capture for Hypertext Transfer Protocol HTTP/1.1 (TCP 80, Dual-Stack IPv4/IPv6).

Wire details: Defaults to TCP destination port 80 with psh ack flags and advances TCP seq by the exact HTTP header + body byte count.

http_quickstart.frasm10 lines
Open in Playground
host client { ip 10.10.1.20 }
host web_srv { ip 10.10.1.80 }
compile {
client -> web_srv tcp syn srcport 52100 dstport 80 wait 1ms
client <- web_srv tcp syn ack wait 1ms
client -> web_srv tcp ack wait 1ms
client -> web_srv http get uri "/healthz" hosthdr "api.corp.internal" useragent "kube-probe/1.30" wait 2ms
client <- web_srv http status 200 reason "OK" contenttype "application/json" body "{\"status\":\"healthy\"}"
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly http_quickstart.frasm
Protocol references:http(HTTP/1.1)
Example 07.054 Ethernet framesFilter: http2

Minimal Two-Block HTTP/2 (http2) Quickstart

Smallest zero-boilerplate host + compile capture for Hypertext Transfer Protocol Version 2 Binary Framing (TCP 443, Dual-Stack IPv4/IPv6).

Wire details: Defaults to TCP destination port 443 (psh ack) and keeps TCP seq / acknum synchronized across multiplexed frames.

http2_quickstart.frasm9 lines
Open in Playground
host app_client { ip 10.20.1.10 }
host api_gw { ip 10.20.1.44 }
compile {
app_client -> api_gw http2 preface dstport 8080 wait 1ms
app_client <- api_gw http2 settings wait 1ms
app_client -> api_gw http2 headers streamid 1 wait 1ms
app_client <- api_gw http2 data streamid 1 payload "{\"ok\":true}"
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly http2_quickstart.frasm
Protocol references:http2(HTTP/2)
Example 07.065 Ethernet framesFilter: tls

Minimal Two-Block TLS 1.2 / 1.3 (tls) Quickstart

Smallest zero-boilerplate host + compile capture for Transport Layer Security Record & Handshake Layer (TCP 443, Dual-Stack IPv4/IPv6).

Wire details: Defaults to TCP destination port 443 (psh ack), TLS record version 0x0303 (RFC 8446 compatibility layer), and TLS 1.3 cipher suite 0x1301 (TLS_AES_128_GCM_SHA256).

tls_quickstart.frasm10 lines
Open in Playground
host workstation { ip 10.10.5.20 }
host https_edge { ip 198.51.100.44 }
compile {
workstation -> https_edge tcp syn srcport 53443 dstport 443 wait 1ms
workstation <- https_edge tcp syn ack wait 1ms
workstation -> https_edge tcp ack wait 1ms
workstation -> https_edge tls clienthello sni "portal.corp.internal" ciphersuite 0x1301 alpn "h2" wait 2ms
workstation <- https_edge tls serverhello ciphersuite 0x1301
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly tls_quickstart.frasm
Protocol references:tls(TLS 1.2 / 1.3)
Example 07.072 Ethernet framesFilter: quic

Minimal Two-Block QUIC (HTTP/3) (quic) Quickstart

Smallest zero-boilerplate host + compile capture for QUIC v1 & v2 Encrypted UDP Transport (UDP 443, Dual-Stack IPv4/IPv6).

Wire details: Defaults to UDP destination port 443, QUIC v1 (version 1 0x00000001), and sets the mandatory Fixed Bit (0x40) in byte 0.

quic_quickstart.frasm7 lines
Open in Playground
host browser { ip 10.20.4.15 }
host cdn_vip { ip 198.51.100.44 }
compile {
browser -> cdn_vip quic initial version 1 dcid 0x1122334455667788 scid 0xaabbccddeeff0011 pktnum 1 wait 2ms
browser <- cdn_vip quic handshake version 1 dcid 0xaabbccddeeff0011 scid 0x1122334455667788 pktnum 1
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly quic_quickstart.frasm
Protocol references:quic(QUIC (HTTP/3))
Example 07.087 Ethernet framesFilter: http

HTTP/1.1 (http): REST API JSON Webhook POST + WAF 403 Block Scenario

Completes a TCP handshake on port 8080, sends an authenticated JSON POST request with custom HTTP headers, and captures a 403 Forbidden gateway response.

Wire details: Defaults to TCP destination port 80 with psh ack flags and advances TCP seq by the exact HTTP header + body byte count. Computes and inserts Content-Length: <bytes> automatically whenever body is present, formatting all header lines with standard \r\n CRLF terminators.

http_api_waf_test.frasm15 lines
Open in Playground
host ext_client { ip 198.51.100.45 }
host waf_proxy { ip 172.16.20.80 }
compile {
// 1. Complete TCP 3-way handshake on port 8080 (so Suricata stream engine tracks state)
ext_client -> waf_proxy tcp syn srcport 54320 dstport 8080 win 65535 mss 1460 wait 1ms
ext_client <- waf_proxy tcp syn ack win 65535 mss 1460 wait 1ms
ext_client -> waf_proxy tcp ack wait 1ms
// 2. HTTP POST with custom headers and JSON body
ext_client -> waf_proxy http post uri "/v1/login" hosthdr "portal.example.com" useragent "Mozilla/5.0" contenttype "application/json" header "X-Request-ID" "req-9041" header "X-Forwarded-For" "203.0.113.9" body "{\"user\":\"admin\"}" wait 3ms
// 3. WAF blocks request with HTTP 403 Forbidden + TCP FIN
ext_client <- waf_proxy http status 403 reason "Forbidden" contenttype "application/json" body "{\"error\":\"blocked_by_policy\"}" wait 1ms
ext_client <- waf_proxy tcp fin ack wait 1ms
ext_client -> waf_proxy tcp ack
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show http_api_waf_test.frasm
Protocol references:http(HTTP/1.1)tcp(TCP & RFC 7323)
Example 07.0911 Ethernet framesFilter: http2

HTTP/2 (http2): Cleartext h2c Connection Preface, Stream 1 Request, PING & Graceful GOAWAY

Establishes a TCP port 8080 connection, exchanges HTTP/2 connection prefaces, serves a Stream 1 request/data exchange, tests liveness with ping, and closes cleanly via goaway.

Wire details: Defaults to TCP destination port 443 (psh ack) and keeps TCP seq / acknum synchronized across multiplexed frames. Enforces RFC 9113 frame size rules automatically: 24-byte magic string + SETTINGS on preface, 8-byte payload on ping (streamid 0), 4-byte window increment on windowupdate, and 8-byte last_stream_id + error_code on goaway.

http2_multiplexed_session.frasm19 lines
Open in Playground
host mesh_sidecar { ip 172.16.30.11 }
host upstream_svc { ip 172.16.30.80 }
compile {
mesh_sidecar -> upstream_svc tcp syn srcport 53080 dstport 8080 win 65535 mss 1460 wait 1ms
mesh_sidecar <- upstream_svc tcp syn ack win 65535 mss 1460 wait 1ms
mesh_sidecar -> upstream_svc tcp ack wait 1ms
// 1. Client magic preface + server SETTINGS
mesh_sidecar -> upstream_svc http2 preface wait 1ms
mesh_sidecar <- upstream_svc http2 settings wait 1ms
// 2. Stream 1 request headers + response data + flow-control window update
mesh_sidecar -> upstream_svc http2 headers streamid 1 wait 2ms
mesh_sidecar <- upstream_svc http2 headers streamid 1 wait 1ms
mesh_sidecar <- upstream_svc http2 data streamid 1 payload "{\"items\":[]}" wait 1ms
mesh_sidecar -> upstream_svc http2 windowupdate streamid 0 wait 5ms
// 3. Keepalive PING & graceful connection drain (GOAWAY on stream 0)
mesh_sidecar -> upstream_svc http2 ping streamid 0 wait 2ms
mesh_sidecar <- upstream_svc http2 goaway streamid 0
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show http2_multiplexed_session.frasm
Protocol references:http2(HTTP/2)tcp(TCP & RFC 7323)
Example 07.107 Ethernet framesFilter: grpc || http2

gRPC (grpc): gNMI Router Telemetry Subscription + Backend UNAVAILABLE Failover

Opens a TCP 50051 connection, invokes a telemetry.Collector/Export RPC succeeding with grpcstatus 0, and captures a second call returning grpcstatus 14 (UNAVAILABLE).

Wire details: Defaults to TCP destination port 50051 (psh ack) and formats HTTP/2 HEADERS (:method POST, :path /<service>/<method>, content-type: application/grpc). Wraps request payloads in the 5-byte gRPC Length-Prefixed-Message header (Compressed-Flag = 0 + 32-bit big-endian message length).

grpc_service_mesh_lab.frasm14 lines
Open in Playground
host edge_agent { ip 172.16.40.12 }
host mesh_gw { ip 172.16.40.50 }
compile {
edge_agent -> mesh_gw tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms
edge_agent <- mesh_gw tcp syn ack win 65535 mss 1460 wait 1ms
edge_agent -> mesh_gw tcp ack wait 1ms
// 1. Healthy gRPC Export call -> OK (0)
edge_agent -> mesh_gw grpc service "telemetry.Collector" method "Export" wait 2ms
edge_agent <- mesh_gw grpc grpcstatus 0 wait 4ms
// 2. Upstream maintenance -> UNAVAILABLE (14)
edge_agent -> mesh_gw grpc service "auth.TokenVerifier" method "Validate" wait 2ms
edge_agent <- mesh_gw grpc grpcstatus 14
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show grpc_service_mesh_lab.frasm
Protocol references:grpc(gRPC)tcp(TCP & RFC 7323)
Example 07.1110 Ethernet framesFilter: websocket

WebSocket (websocket): Full HTTP 101 Upgrade Handshake Into Masked WebSocket Stream & Close

Performs a TCP handshake + HTTP 101 Switching Protocols WebSocket upgrade so Wireshark and Suricata track the protocol switch, then exchanges masked client JSON, server events, ping/pong, and close.

Wire details: Defaults to TCP destination port 80 (psh ack), text frame (opcode 0x1), and finbit 1 (complete unfragmented message). Encodes RFC 6455 extended 16-bit (126) or 64-bit (127) payload lengths automatically when payloads exceed 125 bytes.

websocket_upgrade_session.frasm17 lines
Open in Playground
host dashboard_ui { ip 172.16.10.25 }
host realtime_gw { ip 172.16.10.80 }
compile {
// 1. TCP 3-way handshake + HTTP 101 WebSocket Upgrade
dashboard_ui -> realtime_gw tcp syn srcport 52800 dstport 80 win 65535 mss 1460 wait 1ms
dashboard_ui <- realtime_gw tcp syn ack win 65535 mss 1460 wait 1ms
dashboard_ui -> realtime_gw tcp ack wait 1ms
dashboard_ui -> realtime_gw http get uri "/ws" hosthdr "noc.corp.internal" header "Upgrade" "websocket" header "Connection" "Upgrade" header "Sec-WebSocket-Version" "13" header "Sec-WebSocket-Key" "dGhlIHNhbXBsZSBub25jZQ==" wait 2ms
dashboard_ui <- realtime_gw http status 101 reason "Switching Protocols" header "Upgrade" "websocket" header "Connection" "Upgrade" wait 2ms
// 2. Masked client text frame + unmasked server push + Ping/Pong + Close
dashboard_ui -> realtime_gw websocket text maskkey 0x12345678 payload "{\"op\":\"subscribe\",\"channel\":\"bgp\"}" wait 2ms
dashboard_ui <- realtime_gw websocket text payload "{\"peer\":\"10.0.0.2\",\"state\":\"Established\"}" wait 10ms
dashboard_ui <- realtime_gw websocket ping payload "hb" wait 1ms
dashboard_ui -> realtime_gw websocket pong maskkey 0xabcdef01 payload "hb" wait 5ms
dashboard_ui -> realtime_gw websocket close maskkey 0x11223344
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show websocket_upgrade_session.frasm
Example 07.1211 Ethernet framesFilter: tls

TLS 1.2 / 1.3 (tls): Full TLS 1.3 Handshake (sni + alpn "h2"), Encrypted AppData & Alert Teardown

Completes a TCP 443 handshake, negotiates TLS_CHACHA20_POLY1305_SHA256 (0x1303) with SNI and ALPN, exchanges encrypted Application Data records, and closes with a TLS alert.

Wire details: Defaults to TCP destination port 443 (psh ack), TLS record version 0x0303 (RFC 8446 compatibility layer), and TLS 1.3 cipher suite 0x1301 (TLS_AES_128_GCM_SHA256). Automatically encodes Extension 0x0000 (server_name when sni is set), Extension 0x002b (supported_versions advertising TLS 1.3 0x0304 + TLS 1.2 0x0303), and Extension 0x0010 (alpn when alpn is set).

tls13_sni_handshake.frasm18 lines
Open in Playground
host branch_pc { ip 172.16.12.34 }
host saas_gw { ip 203.0.113.100 }
compile {
branch_pc -> saas_gw tcp syn srcport 54443 dstport 443 win 65535 mss 1460 sackperm wait 1ms
branch_pc <- saas_gw tcp syn ack win 65535 mss 1460 sackperm wait 1ms
branch_pc -> saas_gw tcp ack wait 1ms
// 1. TLS 1.3 ClientHello + ServerHello + Encrypted Handshake / AppData
branch_pc -> saas_gw tls clienthello sni "api.saas-vendor.example" ciphersuite 0x1303 alpn "h2" wait 2ms
branch_pc <- saas_gw tls serverhello ciphersuite 0x1303 wait 1ms
branch_pc <- saas_gw tls certificate wait 1ms
branch_pc <- saas_gw tls finished wait 1ms
branch_pc -> saas_gw tls finished wait 2ms
// 2. Encrypted TLS Record Type 23 (Application Data) + Record Type 21 (Alert)
branch_pc -> saas_gw tls appdata hexpayload "9f4a1c880021bc773310aa55" wait 3ms
branch_pc <- saas_gw tls appdata hexpayload "41e82209ff12008ac491bb02" wait 5ms
branch_pc -> saas_gw tls alert
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show tls13_sni_handshake.frasm
Example 07.136 Ethernet framesFilter: quic

QUIC (HTTP/3) (quic): QUIC v1 Retry Token Challenge, Handshake & 1-RTT Connection Migration

Shows a server challenging an initial client packet with retry, completing the QUIC handshake, and maintaining the same dcid across a NAT source-port rebind on short packets.

Wire details: Defaults to UDP destination port 443, QUIC v1 (version 1 0x00000001), and sets the mandatory Fixed Bit (0x40) in byte 0. Encodes 8-byte dcid and scid Connection IDs plus RFC 9000 variable-length integer payload lengths automatically on Long Header packets.

quic_connection_migration.frasm14 lines
Open in Playground
host mobile_app { ip 198.51.100.70 }
host edge_pop { ip 203.0.113.44 }
compile {
// 1. Initial attempt -> Server sends stateless Retry token
mobile_app -> edge_pop quic initial srcport 51443 dcid 0x0102030405060708 scid 0x1111222233334444 pktnum 0 wait 2ms
mobile_app <- edge_pop quic retry dcid 0x1111222233334444 scid 0x9999888877776666 token "addr-verified-tok" wait 2ms
// 2. Client resends Initial with token + Handshake completion
mobile_app -> edge_pop quic initial dcid 0x9999888877776666 scid 0x1111222233334444 token "addr-verified-tok" pktnum 1 wait 2ms
mobile_app <- edge_pop quic handshake dcid 0x1111222233334444 scid 0x9999888877776666 pktnum 1 wait 3ms
// 3. 1-RTT Short Header packets (client migrates from srcport 51443 -> 60222 keeping dcid)
mobile_app -> edge_pop quic short dcid 0x9999888877776666 pktnum 2 payload "h3-stream-frame-1" wait 5ms
mobile_app -> edge_pop quic short srcport 60222 dstport 443 dcid 0x9999888877776666 pktnum 3 payload "h3-migrated-port"
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show quic_connection_migration.frasm
Protocol references:quic(QUIC (HTTP/3))