Tactical LogHuntress CTF 2026 // team archive

Days / Day 28 / Mobile Android / Protocol Reconstruction

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

Protocol Reconstruction

Mobile Android SSTTMM Modes reported CORRECT in this write-up

Result

Single Solve, Time Trial, and Mastery were all accepted by the Game Master. The Time Trial and Mastery starts used the default practice pool (run_for_time:false), so the server returned no deadline and the clock was not running.

The player-facing prompt for all three modes was: “Reconstruct the app-to-backend protocol and preserve nonce and ordering semantics.” Each question asked: “Reconstruct the app-to-backend protocol and preserve nonce and ordering semantics. Submit only the exact backend answer code returned for this case.” Every answer uses the exact format ANS- followed by 16 uppercase hexadecimal characters, with exact normalization. “Done” means submitting one matching answer under each case's answer ID.

The challenge IDs were mobile-android-day-28-protocol-reconstruction, mobile-android-day-28-protocol-reconstruction/time_trial, and mobile-android-day-28-protocol-reconstruction/mastery. The challenge name was 📱 Protocol Reconstruction.

The exact answer IDs and accepted codes were:

ModeCasePackageAnswer IDAccepted answer
Single SolveMOB-28-3EBDABD670com.huntress.mobile.d28.v3ebdabd670adanswerAnswerANS-601D3906BB5885AC
Time TrialMOB-28-839BF49C69com.huntress.mobile.d28.v839bf49c6913answerAnswerANS-195095C38146A010
Mastery 1MOB-01-00CE6B14FFcom.huntress.mobile.d01.v00ce6b14ffa5set1.answerAnswerANS-3CCC43BF82DDC297
Mastery 2MOB-04-4A0BA83D13com.huntress.mobile.d04.v4a0ba83d139cset2.answerAnswerANS-B701E1B1697EFF46
Mastery 3MOB-07-E547E800F9com.huntress.mobile.d07.ve547e800f91fset3.answerAnswerANS-879E164116635645
Mastery 4MOB-08-39CD84B6EBcom.huntress.mobile.d08.v39cd84b6eb5eset4.answerAnswerANS-41FDFD673661E152
Mastery 5MOB-11-0F0D612428com.huntress.mobile.d11.v0f0d61242807set5.answerAnswerANS-ECA7C36E95C65316
Mastery 6MOB-14-DA060B60CDcom.huntress.mobile.d14.vda060b60cd6cset6.answerAnswerANS-B4EC2006F1F423EF
Mastery 7MOB-17-738435CF8Ccom.huntress.mobile.d17.v738435cf8cd5set7.answerAnswerANS-658C8652D6F980CA
Mastery 8MOB-18-2620282A8Bcom.huntress.mobile.d18.v2620282a8b8aset8.answerAnswerANS-83520DA307B37554
Mastery 9MOB-22-16411FCFD5com.huntress.mobile.d22.v16411fcfd532set9.answerAnswerANS-7F394D7B384CDEBE
Mastery 10MOB-24-D4167863FAcom.huntress.mobile.d24.vd4167863fa38set10.answerAnswerANS-585951826AF78EFD
Mastery 11MOB-26-FE7D979F2Ccom.huntress.mobile.d26.vfe7d979f2c21set11.answerAnswerANS-98146930A23B52C8
Mastery 12MOB-28-89A40AD781com.huntress.mobile.d28.v89a40ad7817dset12.answerAnswerANS-E37526B11FAF5617

Protocol reconstruction

Single Solve framing

The APK asset huntress_puzzle.json contains the packet bytes:

48 41 14 41 4e 53 2d 36 30 31 44 33 39 30 36 42 42 35 38 38 35 41 43 11

The framing is 48 41 | length | payload | 11: 48 41 begins the frame, 14 is the payload length in hexadecimal (20 bytes), the 20-byte ASCII payload is the answer, and 11 closes the frame. Strip framing only after honoring the length; the decoded answer is AnswerANS-601D3906BB5885AC.

Time Trial protocol

I inspected the DEX methods called by Release.code() and evaluated the actual bytecode. Release.token() applies mixPacket02, then sessionSession08, then mixNonce57. The session routine processes seven frames in sequence. Each frame includes message type 0x15, the nonce selected for that round, and the one-based round number. The next nonce index depends on the rolling state after the current frame; the supplied order table therefore must be followed as state changes. Reordering the nonce bytes or treating them as an unordered set changes the result.

The final code path applies Mix.f1, then Util.finSession63, XORs the embedded 64-bit constant, and renders all 16 nibbles as uppercase hexadecimal after ANS-. The DEX interpreter preserves Java's signed shifts and 64-bit wraparound while following that call chain.

Mastery variants

The 12 deliveries use different versions of the same app-to-backend exercise. Their Release.code() methods lead through varying helpers for probes, trust checks, nonce/session state, and frame handling. I ran the assigned APK DEX instructions themselves so each delivery's constants, loops, branch decisions, and 64-bit arithmetic remained intact.

Delivery 11 is an .apks split package. Its base APK reads huntress_feature.bin (challenge artifact, not published) from the feature APK, then assembles the two eight-byte values in byte order before continuing the release calculation. The solver reads the feature asset from the supplied split bundle and preserves that ordering.

The hardcoded client_secret and proof URL in the public app are request plumbing, not the answer. The accepted answer comes from the APK's release calculation (or, for Single Solve, the framed packet payload).

Reusable scripts

Files in this directory:

  • solve_dex.py interprets the DEX release method in APK and APKS files.
  • fetch_artifacts.py downloads the current assignment through the supported proxy and prints each SHA-256.
  • submit_answers.py submits a JSON answer map through the proxy.
  • requirements.txt pins Androguard 4.1.4.
  • answers_single_solve.json, answers_time_trial.json, and answers_mastery.json preserve the submitted answer maps.

Set up and use the tools:

python3 -m venv .venv
.venv/bin/pip install -r work/protocol-reconstruction/requirements.txt

.venv/bin/python work/protocol-reconstruction/solve_dex.py path/to/assigned.apk

For a mastery assignment with 12 deliveries:

.venv/bin/python work/protocol-reconstruction/fetch_artifacts.py \
  mobile-android-day-28-protocol-reconstruction/mastery \
  work/protocol-reconstruction/new_mastery --deliveries 12

for apk in work/protocol-reconstruction/new_mastery/delivery_*; do
  .venv/bin/python work/protocol-reconstruction/solve_dex.py "$apk"
done

Keep the output order aligned with the delivery numbers, then batch-submit all answers in one request:

.venv/bin/python work/protocol-reconstruction/submit_answers.py \
  mobile-android-day-28-protocol-reconstruction/mastery \
  work/protocol-reconstruction/answers_mastery.json

For a later attempt, first use the answer_ids, artifact filenames, and delivery count from that attempt's start response. Single Solve and Time Trial have one artifact each; Mastery uses delivery=0 through delivery=N-1. Compare local hashes with the SHA-256 values returned by the Game Master.

Assigned artifacts

Every link below is the exact root-relative download path returned by the Game Master for this playthrough. Each is the assigned app build to inspect for its case; Mastery delivery 11 is the split package described above.

DeliveryArtifactSHA-256
Single Solveprotocol_reconstruction.apk1146daecc34e9b3cd727c7a83f135091dc10b01c4081e430d7b4f6bb4a4efbd5
Time Trialprotocol_reconstruction_time_trial.apk2ea21adcdc4a615bccf0164ebeaf76ccc74b082822fb443d59954f6db4c512f6
Mastery 1protocol_reconstruction_mastery_01.apk5d571fbcd9b3f10d9039648304d45a00aa5fa968b65652f32c40b13b6acab2fa
Mastery 2protocol_reconstruction_mastery_02.apkf537cbd9fa8dba27e6dbe07dfee2b83c846352686b2950b3f2bfb0180c431abf
Mastery 3protocol_reconstruction_mastery_03.apk1dbb8026ca928b8146ba2e1335550d8591ce5c1cb557d0b343b9862561083807
Mastery 4protocol_reconstruction_mastery_04.apkb0e5526a3c6f7d51b7cb5fbbf324cd9a31221868a8f1c82cb6552c107a8ad308
Mastery 5protocol_reconstruction_mastery_05.apkeebcd37bdad002657690039d4aed07b6887870de4b95cbc141f2a68d2263cbb1
Mastery 6protocol_reconstruction_mastery_06.apka31345e63fffc1eaf162825aa3aa06c65bda731e7ffa1744aa26cb1da9839299
Mastery 7protocol_reconstruction_mastery_07.apkdd293ed1adf6f95a05bb8d756c6682fa1332b563d617dabb7f84ff8bb1414974
Mastery 8protocol_reconstruction_mastery_08.apk69e66aef8ee0b5e280d51f2e1e3dc9fd362a4d18e53167d8b47dfffe56a24be1
Mastery 9protocol_reconstruction_mastery_09.apk77e784e0de9533d522518e7852e677dddc74e51d8c35cb63028ac194777f1ff1
Mastery 10protocol_reconstruction_mastery_10.apkb54a4527586b09e009b64d3bddee81a6504b6a06bd7e49abdf9a60f8d37150e8
Mastery 11protocol_reconstruction_mastery_11.apks0cf2dc29302f2a80e23c760fafc962e9c77df197b9268f746986418b991ebba1
Mastery 12protocol_reconstruction_mastery_12.apk5e4417e673844fc669af7cd429c278df6af53304d3cca370cc94029e4cc05601