root of trust: modeled root signals and the code behind them

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

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

"model and bypass multiple synthetic root signals without globally patching success." in the story the app gates a backend answer code behind several root-detection checks; the question asks for that code, in the shape the question states ("ANS- followed by exactly 16 uppercase hexadecimal characters; no spaces or explanatory text").

the key insight: the root checks exist only as story. the dex holds a root_detection key, the words "synthetic root detection", a case reference and one describe method, and no check to bypass. the code sits in assets/huntress_puzzle.json under codec base64; decoding it offline answers the question without running a device or patching a branch.

challenge shape

single         1 field    the answer code for one case and package
time trial     1 field    the same, a fresh apk
mastery        6 fields   six apks, one case each

artifact anatomy

each apk has a binary android manifest, one classes.dex (three classes) and the puzzle asset:

{"schema": "huntress.mobile.puzzle.v1", "day": 22, "codec": "base64",
 "data": "<28 base64 characters>"}

there is no key material and no step list: the codec name is the whole chain, the same base64 as days 3, 9 and 13. the mastery's six apks carried earlier days' codecs, one per set: plain, hex twice, base64, indexed, and today's base64.

extraction method

the android package reader reads the puzzle asset, maps base64 to its decoding step through the codec alias table and runs it on the data. the result must match the answer pattern; a chain whose output does not is never submitted. by hand, with the standard library:

import base64, json, zipfile

puzzle = json.loads(zipfile.ZipFile("root_of_trust.apk")
                    .read("assets/huntress_puzzle.json"))
print(base64.b64decode(puzzle["data"]).decode())  # ANS-...

validation and answer formatting

the code is checked against the stated pattern (ANS-[0-9A-F]{16}, graded exact) before submission; the code must come from the bytes, not from any one check's branch.

failed approaches and pivots

none on day 22: the day's framing was new, the puzzle format was not.

automation across modes

one reader serves the single and every case of the timed modes.

lessons

solve times

public scoreboard · day 22 finish: below top 10

  • 0:03.5single#2 of 168 solvers
  • 0:06.5time trial#3 of 163 solvers
  • 0:09.1mastery#2 of 162 solvers
  • #26team day finishof 145 teams that cleared it, in 10:39.5
  • #3single orderof the day's 7, 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 1.2s 1 0
time trial 0.6s 1 0
mastery 1.2s 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.6s 49.4s
mastery 200.0s 1.2s 198.8s

where we got stuck

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

{generated by a clanker}