Misc • 500 points (Dynamic Decay) • Hard
DYNAMIC SCORING Current: 500 pts Range: 500 pts → 350 pts • Solves: 0 Nine links, four characters each, each one depending on the last. Guessing is not an option. Challenge Artifacts: chain Submit Flag* CTF{...}
A statically linked, stripped x86-64 ELF. Let me get more info and try running it.
It prompts seal> and reads input. Let me dig into strings and find the entry point.
Standard glibc static binary. The user code is small — let me locate the prompt strings and find the code around them.
There's a custom .acgseal section with exactly 0x24 = 36 bytes = nine links × 4 chars. Let me look at it.
Nine 32-bit words. Let me find the code that references .acgseal (0x497da0) and the main routine.
The check is fully visible: input must be 36 chars, split into nine 4-byte links, each CRC-32'd (table at 0x4aa2e0) with the state chained across links, compared against the nine words in .acgseal. Let me verify the table and the small strings.
The table at 0x4aa2e0 is actually in .bss — it's built at runtime. Let me find the code that fills it.
main builds a CRC table at runtime (vectorized bit-by-bit construction). Let me read the constants: poly, masks, initial values.
Standard CRC-32 table (poly 0xEDB88320). The scheme is now fully known:
- input: exactly 36 chars = nine 4-byte links
link_0:crc32(0x5c5, link_0) == words[0]link_i:crc32(words[i-1], link_i) == words[i]
CRC-32 over exactly 4 bytes is a GF(2)-affine bijection, so each link has a unique 4-byte preimage — solvable directly, no guessing. Let me solve the linear system:
Bit-mapping bug in my elimination. Let me redo it properly with the RHS as an augmented bit per row:
The unique preimage is fully printable: CACTF{l1n34r_ch3cksums_f0rg3_b4ck!!}. Let me verify against the binary:
accepted — the binary verifies it.
Solution
Flag: CACTF{l1n34r_ch3cksums_f0rg3_b4ck!!}
(If your grader wants the literal CTF{...} wrapper, drop the leading CA: CTF{l1n34r_ch3cksums_f0rg3_b4ck!!})
How it works
chain is a stripped static ELF, but the user code is tiny (main at 0x401660, verifier at 0x4015xx–0x4017d5):
mainbuilds a standard CRC-32 table (poly0xEDB88320) at runtime into.bssat0x4aa2e0(vectorizedc = (c>>1) ^ (c&1 ? 0xEDB88320 : 0)loop), so no table exists statically.- The verifier reads a line, requires
strlen == 0x24(36 chars), and processes it as nine 4-byte links with state chained between them:- raw state starts at
0x5c5, inverted (not) before each link's byte loop and after it ~state_after_link_imust equal word i of the custom.acgsealsection (0x497da0, 36 bytes = nine little-endian words)- the un-inverted state carries into the next link
- raw state starts at
In zlib terms: crc32(0x5c5, link_0) == words[0], then crc32(words[i-1], link_i) == words[i] — the "each one depending on the last" chain.
Why "guessing is not an option" — and why none was needed
CRC-32 over exactly 4 bytes of input is a GF(2)-affine bijection of the 32 input bits (the linear part is invertible). So for each fixed previous state and each target word there is exactly one 4-byte preimage. I built the 32×32 linear system from the images of the unit-bit inputs, solved it by Gaussian elimination per link, and each solution came out printable ASCII — nine links chained into the seal:
CACT | F{l1 | n34r | _ch3 | cksu | ms_f | 0rg3 | _b4c | k!!}
Confirmed by running the binary: seal> accepted (exit 0).
