compiler says what: two builds, the compiler as a role word
huntress ctf 2026, day 27 · binary reverse engineering · all three modes
tools used: binary analysis and timed-attempt pipeline.
"every compiler signs its work. compare the runtime and linker fingerprints across builds and name the toolchain: attribute this binary to its maker." the day's tag was two builds of one program in the evidence zip, d27--sample-gcc.elf and d27--sample-tcc.elf, and twelve questions about them, six of them naming a build by its compiler.
the key insight is that "name the toolchain" never became a field. the compiler is the role word in the member's name, and the questions are the family's standard ones about that member: its container, its machine and the configuration record it carries. a reader that resolves a role word to a member and reads the standard fields answered both builds with nothing written for the day.
challenge shape
single 324 fields the cumulative tags of days 1-26 plus twelve
d27 fields
time trial 324 fields the same on a fresh zip
mastery 3564 fields the same over eleven sets
the d27 fields:
d27_artifact_sha256_1, d27_artifact_sha256_2
d27_analysis_{gcc,tcc}_{format,machine}
d27_analysis_config_{campaign,domain,mutex,url}
d27_analysis_gcc_config_{campaign,domain}
each role question names its member by the end of its basename ("use the unique d27-- member whose basename ends gcc.elf"); the four plain config_* questions say "decode both d27-- role members and require their config objects to be byte-for-byte equal before using the common value", and every configuration question adds "scan backward from the end of the member for literal hcfg magic and accept the first crc32-valid decoded json record".
artifact anatomy
both members are elf executables. the container is read by magic and parsed header; e_machine is the two-byte field at offset 18 of the elf header, read in the header's own byte order. the configuration record is the family's HCFG blob (magic, version, xor key, length, crc32 and the xor'd json), appended to the member right where the section header table ends, found by scanning backward from the end for the magic and accepting the first record whose crc32 matches. the two builds differ in their runtime and linker fingerprints, which the prompt talks about and no field asks for.
extraction method
the binary analysis readers resolve a role word to the one member whose name carries it, then read the field the rest of the name asks for:
member = role_member(members, role="gcc") # the one *gcc.elf
fmt = container(member) # by magic + parsed header
machine = struct.unpack_from(order + "H", member, 18)[0]
cfg = hcfg_record(member) # backward scan, crc32-checked
answers = {"gcc_format": fmt, "gcc_machine": machine,
"gcc_config_campaign": cfg["campaign"], "gcc_config_domain": cfg["domain"]}
the same lines answered the tcc fields with the other member. the cumulative fields of earlier days, including day 26's crash-dump questions, read as before.
validation and answer formatting
the container is an enum from the question (elf, pe, pe_cli, jar, wasm, neko_bytecode; both builds graded elf); the machine is the unsigned base-10 value of e_machine, never an architecture name (both builds are x86-64, so both machine answers are EM_X86_64's decimal value); the record's fields are exact text from the json body. a record whose crc32 does not match is skipped and the scan continues backward, so a decoy record near the end cannot be accepted. the single's members carried campaign BR27-000, domain node-000.day27.example.invalid, mutex Global\HuntressBR27_000 and url https://node-000.day27.example.invalid/api/BR27-000, the gcc questions' campaign and domain the same two values; the time trial's record named campaign BR27-62CFE909, and the mastery's eleven sets BR27-7F59894C, BR27-EC6F1EAA, BR27-A422EE43 and eight more.
failed approaches and pivots
none on day 27.
automation across modes
every field read on the first run of each mode. the lane's windows were the server's: the evidence zip is tens of mebibytes a set, and fetching it took 5.6 seconds on the single, 3.6 on the time trial and 7.3 on the mastery's eleven sets, against under a second of parsing.
lessons
- a question that names a role ("the gcc build") is a member lookup plus the family's standard fields; a new compiler tomorrow is a new word, not a new reader.
- when the artifact is tens of mebibytes a set, the fetch is the window; the parser's job is to never add to it.
solve times
public scoreboard · day 27 finish: below top 10
- 0:10.6singlefirst blood, +0.56 s
- 0:18.3time trialfirst blood, +1.8 s
- 0:31.4masteryfirst blood, +0.62 s
- #38team day finishof 127 teams that cleared it, in 34:43.1
- #5single orderof the day's 8, by our flag time
from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.
from the mode's first start on the game master to its correct submit.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 6.8s | 1 | 0 |
| time trial | 4.9s | 1 | 0 |
| mastery | 10.5s | 1 | 0 |
the clock
server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | 80.0s | 4.9s | 75.1s |
| mastery | 725.0s | 10.5s | 714.5s |
where we got stuck
- nowhere on day 27; most of the time was the evidence zip's fetch, set by set.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}