backup spill: an answer split into shuffled parts

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

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

as on days 1-4, the apk carried assets/huntress_puzzle.json and the answer was hidden in it. day 5's codec, split, left the data field empty and spread the answer over a list of fragments plus a list of indices.

the key insight: the index list gives the position of each fragment, not the order in which to read the fragments. the two readings differ for any permutation that is not its own inverse, and only one of them produces the ANS- shape.

challenge shape

one field, answer, per apk: ANS- plus sixteen uppercase hex digits. the time trial carried one apk, mastery three. the backup-themed manifest was flavor; the puzzle asset was the whole problem again.

artifact anatomy

{"schema": "huntress.mobile.puzzle.v1", "day": 5, "codec": "split",
 "data": "", "parts": ["0A353BE7B", "ANS-5", "709E18"],
 "order": [2, 0, 1]}

parts[i] is a fragment of the answer and order[i] says where that fragment goes. with order = [2, 0, 1] the first fragment is the tail of the answer, the second the head and the third the middle. reading "take part 2, then part 0, then part 1" produces a different, wrong string.

extraction method

by hand:

parts, order = puzzle["parts"], puzzle["order"]
placed = [parts[i] for i in sorted(range(len(parts)), key=order.__getitem__)]
answer = "".join(placed)               # order[i] = position of parts[i]

the toolkit's apk._arrangements keeps both readings:

def _arrangements(puzzle):
    parts, order = _parts(puzzle)          # strings or {index, value} objects
    placed = [parts[i] for i in sorted(range(len(parts)), key=order.__getitem__)]
    out = [placed]
    base = min(order)
    if sorted(order) == list(range(base, base + len(parts))):
        out.append([parts[i - base] for i in order])   # order as a sequence
    ...

the position reading comes first because it is the one the grader confirmed. the sequence reading is the fallback. sorting the indices by position makes zero-based, one-based and sparse positions the same input.

validation and answer formatting

a joined string is accepted only if it fully matches ANS-[0-9A-F]{16}. if neither reading matches, the join is treated as data for the rest of the codec chain. a split+base64 puzzle is joined, then decoded like any other puzzle. when nothing produces the shape, the decoder raises instead of guessing. the answer format itself was unchanged from days 1-4.

failed approaches and pivots

the shared decoder had no split codec and no notion of a puzzle without data. its generic fallback (a breadth-first search over encodings of the data string) had nothing to search, so the first run failed with "no decoding path found". adding the codec was a few lines once the json was in view. we also generalized it straight away: fragments given as {index, value} objects, the other index reading, and split as one step of a longer chain.

automation across modes

one decode call per apk handled all three modes. every apk we saw (the single, the time trial and mastery's three) used the same order of [2, 0, 1] over different fragments, so the sequence reading would have failed on all five.

lessons

solve times

public scoreboard · day 5 finish: 1st

  • 1:16.4single#4 of 233 solvers
  • 1:23.2time trial#2 of 219 solvers
  • 1:25.1mastery#2 of 217 solvers
  • #1team day finishof 188 teams that cleared it, in 3:35.1
  • #4single 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 1m15s 2 0
time trial 7s 1 0
mastery 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 6.0s 0.7s 5.3s
mastery 7.0s 0.8s 6.2s

where we got stuck

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

{generated by a clanker}