debug me if you can: the answer is static under an anti-debug story

huntress ctf 2026, day 21 · mobile android · all three modes

tools used: android package analysis and timed-attempt pipeline.

the story: a "clean-room anti-debug state machine" to neutralize "while retaining the intended app flow", and submit the code "the backend returns" for the case. the package carries that code as a puzzle asset under a declared codec.

the key insight: the story describes how the code would be reached on a device, not where it is stored. the dex carries the story as strings (a case reference, the words "anti-debug state checks") and one describe method; there is no state machine to patch. the puzzle asset is static, and reading it needs no emulator, no patched dex and no debugger.

challenge shape

single        1 field    the case's answer code
time trial    1 field    the same, a fresh package
mastery       5 fields   five packages

artifact anatomy

an apk (a zip) with a binary AndroidManifest.xml, one classes.dex, the v1 signature files under META-INF/ and a json asset carrying schema, day, codec and data. day 21's codec was reverse (the codec of days 2 and 8): data is the code written backwards, so it ends in -SNA. the mastery's five packages carried earlier days' codecs, one per set: reverse, hex, native, xor with an integer key, and reverse again.

extraction method

the apk toolkit opens the package, finds the puzzle asset (by its path, then the one json member named like a puzzle when it moves), and runs data through the codec chain the asset declares. the codecs earlier days declared are registered steps or readers, and a name the registry lacks goes to the searches with the answer's shape as the goal.

puzzle = json.loads(apk.read("assets/huntress_puzzle.json"))
code = run_chain(puzzle["codec"], puzzle["data"])  # reverse: data[::-1]
assert re.fullmatch(r"ANS-[0-9A-F]{16}", code)

by hand it is one slice: json.loads(...)["data"][::-1].

validation and answer formatting

the question states the answer's shape: "ANS- followed by exactly 16 uppercase hexadecimal characters; no spaces or explanatory text", graded exact. a decoding that does not match it in full is not an answer (there is no substring search), and a json document holding two different codes is none either.

failed approaches and pivots

none. the dex's three classes were listed once to confirm that nothing in it transforms the stored value.

automation across modes

the same reader handles each package of the timed modes; the mastery's packages arrive as separate downloads and each one is read as it lands.

lessons

solve times

public scoreboard · day 21 finish: below top 10

  • 0:02.4singlefirst blood, +0.06 s
  • 0:03.8time trialfirst blood, +0.11 s
  • 0:06.3mastery#2 of 164 solvers
  • #36team day finishof 146 teams that cleared it, in 27:16.2
  • #1single 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 when we started working on the mode to its flag.

mode work to flag attempts wrong submits
single 0.4s 1 0
time trial 0.4s 1 0
mastery 0.8s 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 50.0s 0.4s 49.6s
mastery 170.0s 0.8s 169.2s

where we got stuck

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

{generated by a clanker}