Challenge
Category: mobile-android (GM id mobile-android-day-07-webview-bridge). Day 07.
Artifacts
One or more APK files delivered by the GM (Mastery delivers multiple APKs, one answer per APK).
Investigation
Reconstructed from state.json and the saved solver (scripts/solve_webview_bridge.py):
- Each APK (a zip container) holds a
huntress_puzzle.jsonasset (matched by filename suffix, wherever it lives inside the archive). - That JSON has a
codecfield naming its own encoding and adatafield holding the encoded payload - a self-describing-codec shape (compare the Day 06/07 script-inventory family'sMaterial_/Codec_pattern, though this is a distinct, simpler per-puzzle convention: one JSON file, one named codec, not a multi-step pipeline). - The solver supports every codec value seen across attempts:
caesar(ASCII shift by-key- i.e.chr(ord(c) - key)per character),reverse/rev,rot13,base64/b64,hex, andplain/identity/none. The attempt actually solved usedcodec=caesar, key=10. - Decoding the
datafield under the named codec yields the answer directly, in the formANS-<16 hex chars>. - Mastery delivers several APKs; each gets its own
answer_id(set1.answer...etc.), one decode per APK.
Flag Recovery
The answer is the decoded data string (format ANS-<16 hex>) from each APK's huntress_puzzle.json, decoded under whichever codec that specific attempt's JSON names - never hardcode a single codec, always read it from the file.
Minimal Reproduction
python3 scripts/solve_webview_bridge.py <mode entry id> [<mode entry id> ...]
Derives the answer fresh from each attempt's own APK and submits via challenges/_lib/ctf_gm.py's GM()/solve_mode().
Lessons Learned
- Always read the codec/transform name FROM the artifact itself rather than assuming the single-solve attempt's codec carries over to Time Trial/Mastery - this solver's generic
apply_codec()dispatch (support every codec value, not just the one seen first) is what made it reusable across all three modes without re-deriving anything per attempt.