intent injection: codec-driven apk extraction

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

tools used: android apk toolkit, decoding engine, and timed-attempt pipeline.

day 3 again framed the apk around android intent behavior, while the graded evidence code stayed in assets/huntress_puzzle.json. the codec was now base64.

the key insight: by the third variant the analysis lived entirely in a stable library; the day's solver only named the challenge.

artifact anatomy

the same descriptor shape as days 1-2, {"schema": "huntress.mobile.puzzle.v1", "day": 3, "codec": "base64", "data": "..."}, inside an installed apk with a compiled manifest and dex payload. the data is 28 base64 characters, the encoding of a twenty-character code, and it starts with QU5TL because every code starts with ANS-.

extraction method

puzzle = json.loads(asset_bytes)
decoded = base64.b64decode(puzzle["data"], validate=True).decode("utf-8")
assert re.fullmatch(r"ANS-[0-9A-F]{16}", decoded)

the day's parsing adapter contained no codec logic at all:

from ctfkit.hlib import apk

def solve_set(files, fields, questions):
    code = apk.from_files(files)
    return {f: code for f in fields}

apk.from_files reads the json member directly when the delivery was already expanded, or validates and opens the raw apk otherwise.

validation and answer formatting

the decoded value must match ANS- plus sixteen uppercase hex digits; the single answered one such value (ANS-E4C8E35A8A9B5D67), verbatim.

failed approaches and pivots

nothing stalled: the day-2 solver needed only the new codec name. the manifest and deep-link details were again unused by the grader. that is a finding about this task, not about android security; a real assessment would still examine exported activities, implicit intents, uri validation and authorization at the destination.

automation across modes

mastery delivered three apks; the pipeline split them into sets and called the same pure parser three times for set1.answer through set3.answer.

lessons

solve times

public scoreboard · day 3 finish: 1st

  • 0:30.3single#2 of 271 solvers
  • 0:50.1time trial#2 of 257 solvers
  • 1:00.8masteryfirst blood, +1.7 s
  • #1team day finishof 199 teams that cleared it, in 14:26.6
  • #3single 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 24s 1 0
time trial 15s 1 0
mastery 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 6.0s 0.7s 5.3s
mastery 6.0s 0.1s 5.9s

where we got stuck

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

{generated by a clanker}