routine check: a kotlin jar, and making the next runtime fail loudly

huntress ctf 2026, day 7 · binary reverse engineering · all three modes

tools used: binary-analysis toolkit and timed-attempt pipeline.

the prompt talked about kotlin coroutines: functions that suspend, resume and hop between states, compiled into a state machine. the delivered bundle was the cumulative one (the c elf, c++ elf, .net dll, go and rust builds and day 6's java jar) plus d07--variant-000.jar, a kotlin build.

the key insight: kotlin compiles to the same jvm class files as java, so the day-6 path read it unchanged. the configuration blob sits base64-encoded in a class-file constant, exactly where the java loader kept it. the interesting work of the day was making sure the next runtime does not get answered as if it were one we know.

challenge shape

the d07_ fields matched the jar fields from day 6: analysis_format, the hcfg configuration (config_campaign, config_crc32_hex, config_domain, config_mutex, config_url), analysis_hcfg_version and artifact_sha256_1, alongside every earlier day's fields for its own member.

artifact anatomy

a jar is a zip with class files and a META-INF/MANIFEST.MF. this one also bundles the kotlin runtime, so it holds far more classes than day 6's loader. the coroutine state machine is visible in a generated continuation class (<main class>$<function>$1, Day07Variant000$staged$1 in the single) and its invokeSuspend method, but no question asked about it. the hcfg blob (the validated, single-byte-xor'd json config from day 2, with a crc32 over the plaintext) is stored as one base64 utf-8 constant in a class's constant pool.

extraction method

unchanged from day 6: list the jar members, read every class file's constant pool, decode each base64-looking utf-8 constant, and scan the decoded bytes for an hcfg blob whose bounds, crc32 and json all check out. analysis_format is jar; the sha256 is over the jar's bytes as delivered; analysis_hcfg_version is the header's version byte as an integer. the day-6 shell pipeline (unzip -p <jar> '*.class' | strings -n 16 | grep -o 'SENGR[A-Za-z0-9+/=]*') still finds the one encoded blob among the bundled kotlin runtime classes.

validation and answer formatting

the hcfg scanner accepts a blob only if its declared length fits, its crc32 matches the decrypted plaintext and the plaintext parses as json; two distinct valid blobs are an error, never a choice.

failed approaches and pivots

none on the day. on day 7 we checked what the solver would do with the runtimes most likely to come next (android after kotlin, swift on mach-o, webassembly), and two answers would have been silently wrong:

the format is now named from the bytes (apk, dex, macho, macho-fat, wasm) with a warning that the label is unseen, and those members are accepted as a day's main file. the config search also reads a dex file's parsed string table (the raw string data carries a length byte that can glue onto a base64 constant), and new readers cover mach-o architecture, sections, symbols and disassembly, and webassembly sections, imports, exports and function names. a tool failure now raises instead of returning an empty list, because an empty disassembly is a well-formed wrong answer. details in the binary-analysis toolkit.

automation across modes

the cumulative dispatch answers each dNN_ field from that day's member, so the time trial and mastery ran the same code on new variants in one to two seconds of their clocks.

lessons

solve times

public scoreboard · day 7 finish: top 3

  • 0:05.1single#2 of 205 solvers
  • 0:08.9time trialfirst blood, +0.28 s
  • 0:12.5mastery#2 of 193 solvers
  • #3team day finishof 179 teams that cleared it, in 4:44.3
  • #2single orderof the day's 5, 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 when we started working on the mode to its flag.

mode work to flag attempts wrong submits
single 2s 1 0
time trial 4s 1 0
mastery 3s 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 11.0s 1.3s 9.7s
mastery 12.0s 2.0s 10.0s

where we got stuck

flags: single, time trial, and mastery [redacted].

{generated by a clanker}