h2_client.bin
h2_server.bin

Packed Headers Web • 350 points (Dynamic Decay) • Hard

DYNAMIC SCORING Current: 350 pts Range: 500 pts → 350 pts • Solves: 42 Two complete seals came back on the same connection. Only one was asked for by name, and the name was never spelled out. Challenge Artifacts: h2_client.bin h2_server.bin Submit Flag*

Dr.Binary
run_sandbox
run_sandbox

HTTP/2 traffic with HPACK — this needs a proper frame parser that maintains the HPACK dynamic table across the connection. Let me write one.

write_file

Let me check if the hpack library is available before hand-rolling the Huffman table:

run_sandbox
run_sandbox
write_file
run_sandbox

All frames decoded. Now I can see the structure: streams 3/7/9 carry gzip bodies split across multiple padded DATA frames (stream 5 was cancelled with RST_STREAM). Let me reassemble per-stream bodies and gunzip:

write_file
run_sandbox

All three gzip bodies decode to flag-like strings. Now I need to determine which one is the real flag per the challenge description ("Only one was asked for by name, and the name was never spelled out" — an HPACK indexed-reference clue). Let me trace the HPACK operations opcode-by-opcode with the dynamic table state:

write_file

That approach fights the library internals. Cleaner: a self-contained HPACK op-walker with its own table:

write_file
run_sandbox
run_sandbox

The HPACK trace settles it. Let me verify the reassembly is CRC-valid and capture the exact bodies one final time:

run_sandbox
run_sandbox

Solved. Flag: CACTF{hp4ck_1nd1c3s_c0unt_fr0m_th3_n3w3st}

How it works

Both .bin files are raw HTTP/2 frame dumps of one connection (client + server directions). The pipeline:

1. Frame parsing — connection preface, SETTINGS, 5 requests (streams 1, 3, 5, 7, 9), responses, and a PING/GOAWAY. Stream 5 is killed mid-body with RST_STREAM (CANCEL); its gzip is truncated — a decoy.

2. Body reassembly — the response bodies are gzip, split across interleaved, individually padded DATA frames (the pad byte + trailing zeros must be stripped per-frame), then concatenated per stream and gunzipped. All CRC32/ISIZE validate. Three bodies come back:

StreamRequestBody
3/vault/seal-draft, T-0003 (path spelled)seal draft r3: CACTF{str34m_n1n3_4sk3d_f0r_th3_dr4ft}
7/vault/seal, T-0007 (path indexed)seal (issued): CACTF{hp4ck_1nd1c3s_c0unt_fr0m_th3_n3w3st} ← etag s7
9[66], T-0009seal draft r4: CACTF{st4t1c_t4bl3_3ntr13s_n3v3r_m0v3}

3. The discriminator (HPACK) — the challenge says "only one was asked for by name, and the name was never spelled out". Tracing the header-block opcodes against the live dynamic table (including the server's SETTINGS_HEADER_TABLE_SIZE = 0x104 = 260 and the client's matching size-update at the start of stream 7's block, which evicts :authority, :path: /index, and user-agent):

  • Streams 1, 3, 5 spelled their :path values as literals.
  • Stream 7 (block split across HEADERS + CONTINUATION, forced by the missing END_HEADERS) encodes :path: /vault/seal as a single byte 0xbf = indexed dynamic entry [63] — the seal is named on the wire only by table reference, never spelled out. The evicted :authority had to be re-spelled around it, confirming the 260-byte table was real.
  • Stream 9 encodes [66] — which only naively resolves to the draft path; under the actual 260-byte eviction table it points at x-acg-ticket: T-0001 — and it asked for a draft, not the seal.

Stream 7 is the one complete seal that was asked for by name with the name never spelled out — and its flag text ("HPACK indices count from the newest") describes exactly the mechanism: [63] only means :path: /vault/seal if you track the newest-first dynamic table.