Challenge
- Lane: Mobile Android (Day 04), GM id
mobile-android-day-04-pending-intent-relay - Prompt: "Recover and redirect a mutable PendingIntent while preserving every earlier component check."
- Question shape:
For case MOB-04-0C53CC9C9F in package com.huntress.mobile.d04.v0c53cc9c9f40 ... Submit only the exact backend answer code returned for this case. - Flag format:
ANS-<16 hex>(answer code, notflag{})
Artifacts
pending_intent_relay.apk(challenge artifact, not published) (12,704 bytes), SHA-256162473efc2528e0f9bfab83733925b73982238e2af89e86b614ed27e91b557e3- Contents:
AndroidManifest.xml,classes.dex(challenge artifact, not published) (2.6 KB),assets/huntress_puzzle.json, fixture-signed META-INF. - Extracted copy in
output/; solver inscripts/solve_pending_intent_relay.py.
Triage
Mobile/Android, tiny synthetic fixture APK. Simplest-first: unzip, read the assets, strings on the dex, parse manifest strings. No apktool/jadx installed; not needed for an APK this small.
Investigation
unzip -l: only a manifest, one dex, one asset. The asset is the obvious first target.assets/huntress_puzzle.json:{"schema":"huntress.mobile.puzzle.v1","day":4,"codec":"xor","data":"XFNOMCstXCxeXCVYJSQkKiUpKy8=","key":29}- Manifest (binary AXML, strings extracted as UTF-16LE): package
com.huntress.mobile.d04.v0c53cc9c9f40; INTERNET permission; meta-datahuntress.day/huntress.mechanic= "mutable PendingIntent relay";MainActivity(launcher);ChallengeActivityexported with a VIEW/BROWSABLE filter for schemehuntress04, hostpending-intent-relay, pathPrefix/unlock. classes.dex(challenge artifact, not published) strings: classesChallengeActivity,MainActivity,PendingIntentRelay; constantsCODEC,CONTROL,DAY, mechanicmutable_pending_intent;getQueryParameter/getStringExtraforanswerandcase_id, an error "Missing challenge answer or case_id", and aWebView.loadUrlof a loopback evidence URL withcase_id=(plus a secret-looking fixture string, intentionally not reproduced here). Note: the dex has noandroid.app.PendingIntentreferences at all. The "mutable PendingIntent" mechanic is thematic metadata; the exported deep-link activity that forwards an attacker-suppliedanswer/case_idis the modelled relay boundary. The real answer is not obtained by exploiting it dynamically.- Decode the asset: base64-decode
data, XOR each byte withkey(29).
Flag Recovery
The XOR/base64 decode of the bundled puzzle asset yields the backend answer code. Reproduced by the script and independently by an inline one-liner (same result). I did not contact the Game Master, so acceptance of this value by the backend is not re-verified here (the GM previously showed CORRECT for all three modes, but the values submitted then were never recorded).
Flag
- AnswerANS-60A1CA8E89978462
Original completion tokens were never captured at solve time and are not recoverable.
Minimal Reproduction
python scripts/solve_pending_intent_relay.py pending_intent_relay.apk
Lessons Learned
- For these fixture APKs, check
assets/*.json(codec + key + data) before any decompilation; the dex is small and mostly decorative. - Time Trial / Mastery APKs are mutated per attempt (different case id / key / data), so reuse the method, not this value.
- Save writeup, solver and token immediately after each CORRECT.