cleartext session: a network story in the dex, and the answer in a reversed string
huntress ctf 2026, day 8 · mobile android · all three modes
tools used: android apk toolkit and timed-attempt pipeline.
the prompt asked us to "recover a synthetic session from allowed cleartext traffic and replay it against the backend." the apk was built around that story: its dex code assembles a plain-http request with a session secret in the query string. the graded answer, as on every mobile day so far, sat in the puzzle asset.
the key insight: nothing had to be replayed. the asset named its codec, reverse, the same codec day 2 used, and the existing codec chain read it.
challenge shape
one answer field, answer, with the familiar ANS- code shape (sixteen uppercase hex characters after the prefix). the single and the time trial delivered one apk each; the mastery delivered five, one per field from set1.answer to set5.answer.
artifact anatomy
the apk unpacks to AndroidManifest.xml, classes.dex, the signing files under META-INF/ and one asset, assets/huntress_puzzle.json. the asset is a small json object:
{"schema": "huntress.mobile.puzzle.v1", "day": 8, "codec": "reverse", "data": "..."}
the dex carries the cleartext story: string constants for an http:// url on the loopback address with a case-id parameter, a query fragment with a client secret and a proof value, and a label naming the day's theme (cleartext session transport). the manifest asks only for the internet permission. none of it is needed for the answer, and replaying a request against a target would be out of scope for an artifact-only task.
extraction method
the decoder splits the codec name into steps, runs them in order and accepts the result only if it has the answer shape; otherwise it falls back to a keyed search and then to a peel that looks for the shape:
def decode(puzzle) -> str:
codec = _codec_text(puzzle.get("codec", "plain"))
data = _data_text(puzzle.get("data", ""))
steps = _steps(codec) # "reverse" -> ["reverse"]
for out in _chain(steps, data, puzzle): # every reading, depth first
found = _answer(out)
if found is not None:
return found
... # keyed search, then a peel for the shape
reverse reverses the text, so the stored string ends with the prefix read backwards (-SNA) and decodes to an ANS- code. by hand it is puzzle["data"][::-1].
validation and answer formatting
the answer must match ANS-[0-9A-F]{16} exactly; anything else raises instead of being submitted. the code is submitted as decoded.
failed approaches and pivots
none on the answer. the prompt's network story was a distraction for a reader who starts from the dex; the asset-first order of the toolkit skipped it.
automation across modes
the day-7 solver read all three modes unchanged. on day 8 we widened the codec name table for encodings the warmups lane had used (escapes, nato, css escapes) and let data be a list of numbers as well as a string, so a puzzle that stores bytes as a json array decodes through the same steps.
lessons
- a prompt's story can describe the app rather than the answer: read the delivered data first, and treat network indicators as context.
- a codec that comes back after six days needs no new code when the registry keeps every codec it has ever read.
solve times
public scoreboard · day 8 finish: top 10
- 0:04.0single#5 of 210 solvers
- 5:22.0time trial#9 of 200 solvers
- 5:23.5mastery#7 of 197 solvers
- #7team day finishof 177 teams that cleared it, in 12:43.6
- #1single 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 | 1s | 1 | 0 |
| time trial | 5m18s | 20 | 0 |
| mastery | 2s | 2 | 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 | 8.0s | 1.2s | 6.8s |
| mastery | 8.0s | 0.8s | 7.2s |
where we got stuck
- time trial: timed starts failed for about five minutes, first with http 503
training_rotation_invalid, then with rate limits; they went through once our start request asked for the ranked pool explicitly (run_for_time: true). the solver was ready throughout; once a start went through, the time trial and the mastery took 1.2s and 0.8s on the clock.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}