exported trust: extracting a puzzle from an apk
huntress ctf 2026, day 1 · mobile android · all three modes
tools used: android apk toolkit and timed-attempt pipeline.
the challenge presentation emphasized an exported activity and a custom deep link. those are reasonable places to start an android review, but the graded backend evidence code was static data inside the apk.
the key insight: enumerate the apk before decompiling it. the answer sat in an asset, and no emulator, activity launch or backend was needed.
artifact anatomy
an apk is a zip. besides the compiled manifest and dex code it carried assets/huntress_puzzle.json, a small descriptor:
{"schema":"huntress.mobile.puzzle.v1","day":1,"codec":"plain","data":"ANS-DACC86F43B0B1C1A"}
the manifest defined an exported ChallengeActivity with a browsable VIEW intent filter for huntress01://exported-trust/unlock: real context for the story (the question asked us to invoke that deep link with the case reference), not the answer source.
extraction method
unzip -l exported_trust.apk
unzip -p exported_trust.apk assets/huntress_puzzle.json
import io, json, re, zipfile
with zipfile.ZipFile(io.BytesIO(apk)) as zf:
puzzle = json.loads(zf.read("assets/huntress_puzzle.json"))
answer = puzzle["data"] # codec == "plain": verbatim
assert re.fullmatch(r"ANS-[0-9A-F]{16}", answer)
validation and answer formatting
the answer is ANS- followed by exactly sixteen uppercase hex digits. the shape check is the real validation: a decode step that succeeds is not proof that the right codec was applied. later days added codec chains and a bounded search fallback for when a declared codec fails to produce this shape.
failed approaches and pivots
the exported-component narrative pointed toward dynamic analysis and a live backend. there was none; time spent confirming that before trusting a static asset was the main cost of the single.
automation across modes
mastery assigned set1.answer to set3.answer, with one apk delivery per set, fetched by a zero-based delivery index: delivery 0 is set1, delivery 2 is set3. the solver starts the attempt, downloads every apk, extracts all answers and submits once. if the clock expires it renews the attempt and re-fetches instead of reusing old downloads.
lessons
- assets, resources and the manifest often answer a static question more directly than control-flow analysis.
- a manifest's security story can be real and still irrelevant to the grader.
solve times
public scoreboard · day 1 finish: below top 10
- 2h48msingle#64 of 425 solvers
- 2h48mtime trial#58 of 392 solvers
- 2h50mmastery#57 of 388 solvers
- #54team day finishof 358 teams that cleared it, in 3h04m
- #5single 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 our first start of the mode to its flag; earlier preparation was not recorded.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 19m14s | 1 | - |
| time trial | 2s on the clock (prep not logged) | 1 | - |
| mastery | 3s on the clock (prep not logged) | 1 | - |
the clock
server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock. day 1-2 deadlines were not logged per attempt.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | not recorded | 1.6s | not recorded |
| mastery | not recorded | 3.2s | not recorded |
where we got stuck
- the manifest and exported-component story suggested a live backend; there was none. the answer sat in a static asset, and time went into confirming that before trusting it.
- mastery delivered one apk per set through a delivery index, and an
expiredtimer needed a renew-and-resubmit path rather than a fresh start.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}