name collapse: a permutation, one character per index
huntress ctf 2026, day 17 · mobile android · all three modes
tools used: android apk toolkit and timed-attempt pipeline.
the prompt: "restore behavior after deterministic identifier shrinking and decoy insertion." as on every mobile day, the apk carries assets/huntress_puzzle.json, and the answer is its data decoded per its codec.
the key insight: the codec indexed gives data as one string and order as a list exactly as long. order[i] is the position of data[i] in the answer: day 5's split rule with one-character parts. the story about shrinking and decoys is flavor.
challenge shape
single 1 field answer, from one apk
time trial 1 field a fresh apk
mastery 5 fields five apks, one answer each
artifact anatomy
{"schema": "huntress.mobile.puzzle.v1", "day": 17, "codec": "indexed",
"data": "<20 characters>", "order": [<a permutation of 0..19>]}
the order list is a permutation of 0..19, one entry per character of the 20-character answer. the mastery's five apks carried earlier days' codecs, one per set: reverse, hex, base64, native, and indexed again.
extraction method
two readings of a permutation are possible: order[i] as the position of data[i] ("placed"), or as the index of the character to take next ("gathered"). the answer shape decides: only one reading starts with the answer prefix. the decoder runs the split rule with one-character parts, and any name for a permutation (indexed, permutation, shuffle, scatter) works as one step of a chain, so indexed+base64 decodes the joined text next:
def indexed(puzzle, data):
order = puzzle.get("order")
return "parts" not in puzzle and isinstance(order, list) \
and len(order) == len(data) > 1
out = [""] * len(data)
for i, position in enumerate(order):
out[position - base] = data[i] # base 0, or 1 for a one-based list
by hand, with the standard library (the zero-based "placed" reading, the one the grader took):
import json, zipfile
puzzle = json.loads(zipfile.ZipFile("name_collapse.apk")
.read("assets/huntress_puzzle.json"))
out = [""] * len(puzzle["data"])
for char, position in zip(puzzle["data"], puzzle["order"]):
out[position] = char
print("".join(out)) # ANS- and sixteen uppercase hex digits
validation and answer formatting
the result must match the answer shape (a prefix and sixteen hex digits); a reading that does not is never returned. the answer is the decoded string as is.
automation across modes
every apk carries its own puzzle; the same reading applies.
lessons
- an index list with as many entries as the data has characters is a per-character permutation; try both readings and keep the one with the answer's shape.
solve times
public scoreboard · day 17 finish: below top 10
- 0:19.7single#4 of 177 solvers
- 0:35.3time trial#6 of 172 solvers
- 0:36.6mastery#4 of 172 solvers
- #15team day finishof 162 teams that cleared it, in 1h45m
- #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 | 18.2s | 1 | 0 |
| time trial | 0.5s | 1 | 0 |
| mastery | 0.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 | 50.0s | 0.5s | 49.5s |
| mastery | 170.0s | 0.5s | 169.5s |
where we got stuck
- the single:
indexedwas a codec name nothing mapped anddatawas a string rather than a list of parts; readingorderas positions by hand gave the answer at 18.2s.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}