Tactical LogHuntress CTF 2026 // team archive

Days / Day 05 / Mobile Android / Backup Spill

DAY 05//LANE: MOBILE ANDROID//STATUS: CORRECT x3

Backup Spill

Mobile Android SSTTMM Modes reported CORRECT in this write-up

Challenge

  • Category: Mobile Android (Day 05), GM id mobile-android-day-05-backup-spill
  • Prompt: "Extract synthetic application state admitted by a flawed backup boundary."
  • Question shape: For case MOB-05-<id> in package com.huntress.mobile.d05.v<id> ... Submit only the exact backend answer code returned for this case.
  • Flag format: ANS- followed by exactly 16 uppercase hex characters (answer code, not flag{})
  • Same recurring family as Day 04's "Pending Intent Relay": a small synthetic fixture APK whose real answer is bundled in a JSON puzzle asset, not derived by exploiting the themed Android mechanic (a "flawed backup boundary" here, a "mutable PendingIntent relay" on Day 04) at runtime.

Artifacts

  • backup_spill.apk (challenge artifact, not published) - AndroidManifest.xml, classes.dex (challenge artifact, not published), assets/huntress_puzzle.json, fixture-signed META-INF.

Triage

Per the established pattern for these fixture APKs: check assets/*.json first before any decompilation - the dex is small and decorative, the real answer lives in the bundled puzzle asset.

Investigation

  1. Unzip the APK; read assets/huntress_puzzle.json:
    {"schema": "huntress.mobile.puzzle.v1", "day": 5, "codec": "split",
     "data": "", "parts": ["0A353BE7B", "ANS-5", "709E18"], "order": [2, 0, 1]}
  2. codec = "split": the real string is parts reassembled in the order given by order - order[i] is the position of parts[i] in the final string, so sort indices by their order value and concatenate:
    parts, order = p["parts"], p["order"]
    "".join(parts[i] for i in sorted(range(len(parts)), key=lambda i: order[i]))
  3. This reassembles order positions 0,1,2 -> parts[1]="ANS-5", parts[2]="709E18", parts[0]="0A353BE7B" -> AnswerANS-5709E180A353BE7B.

Flag Recovery

Reassembling the split-codec puzzle parts by their declared order yields AnswerANS-5709E180A353BE7B (16 uppercase hex characters after the ANS- prefix, matching the required answer format exactly) - derived directly from the bundled asset, independently reproduced.

Flag

<REDACTED_TOKEN>

(Single Solve, Time Trial, and Mastery were all confirmed CORRECT by the Game Master on 2026-10-05 - done.json lists all three modes solved. The raw completion tokens were not preserved locally at solve time, hence the redacted placeholder; the decode above is independently re-verified against the actual staged artifact bytes.)

Minimal Reproduction

import zipfile, json
z = zipfile.ZipFile('backup_spill.apk')
p = json.loads(z.read('assets/huntress_puzzle.json'))
parts, order = p['parts'], p['order']
print(''.join(parts[i] for i in sorted(range(len(parts)), key=lambda i: order[i])))

General solver (handles split/reverse/plain/base64 codec variants and nested-APK artifacts): scripts/solve_backup_spill.py in this folder.

Lessons Learned

  • This "mobile fixture puzzle asset" family (Day 04 Pending Intent Relay, Day 05 Backup Spill) is now recurring with a growing codec set (xor, split, reverse, plain, base64 seen so far) - always check assets/*.json for a schema: huntress.mobile.puzzle.* document before any dex/manifest reversing; the themed Android mechanic in the prompt is flavor, not the actual exploitation path.
  • split codec: order[i] gives the position of parts[i], not the reverse - sort indices by order value, don't naively zip parts with order as (value, index) pairs.