2026-10-31
Day 31: The Reversing Gauntlet (Final Boss)
Lane: Binary reverse engineering. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
binary-reverse-engineering-day-31-reversing-gauntlet - Name: ⚙️ Final Boss
- Prompt: "The gauntlet: everything you've learned, across platforms and languages, in one campaign. Reconstruct it all, end to end, offline. No hints. Good luck."
What we were given
- One
evidence.zipper set (Single Solve SHA-25602204ab23a36d2dde22c706969251287a47309d966140efb7f11cba217e4f4f7). AES encrypted, passwordinfected. The zips were not saved in this folder. - It bundles 31 days of samples (
dNN--sample.*): ELF, PE, .NET, JAR, WebAssembly and Neko files across many languages. - New today: a
d31ELF that ends with a new record type,HGAU. - Mastery: 15 sets, each its own
evidence.zip.
What was asked
- 434 questions per variant: 14 per day × 31 days. Mastery had 15 sets, so 6,510.
- Each day's 14 questions reuse the month's techniques:
- Structure: ZIP central-directory member counts, per-member SHA-256, ordered-set SHA-256.
- ELF/PE headers: class, machine (
e_machine), byte order, entry point, section names and counts, symbol tables, and.textconditional-branch opcode counts (0x70..0x7f,0f 80..8f). - Runtime fingerprints: Nim, FPC, GNAT, Go, Rust, D and Crystal checks on symbols and strings.
- Config records:
HCFG,HGRFandHGAU, all with the 12-byte header (magic | version | XOR key | length (2 bytes) | CRC32). - Cross-format: format tokens (
elf|pe|pe_cli|jar|wasm|neko_bytecode), .NET CLI runtimemajor.minor, decoy-string checks, packing keys (PK19/RS20overlays). - d31 (new): format, machine, XOR key, the
HGAUCRC32, the config fields (config_*andgauntlet_config_*) andgauntlet_trace_branch(success,decoyorfailure).
How it was solved, start to finish
- The watcher ran the driver first. It did not finish the attempt (
single=None), so the lane was flagged for manual work. - Standard fields:
solve_tm.pyhandled about 379 of the 434 fields per variant (grouped bydNN). - Gauntlet fields: a new helper,
, computes the other ~55 fields straight from the extracted members:tools/gauntlet_bin.py
- structural counts and ordered-set hashes;
- symbol and section counts that work for ELF and PE;
HGRFgraph configs (d30) and theHGAUrecord (d31), taking the last valid record from the end of the file;- the d02 vtable symbol, keeping a COFF
.rdata$prefix when the build is a PE; - the d20 overlay size, computed as file length −
RS20offset.
- Found the last wrong answers with the partial-submit oracle. A first partial submit came back
incorrect(saved aspartial369.json). The Game Master keeps accepted answers across partial submits, so per-day and per-field submits showed which fields were wrong. Two variant-specific fixes came out of this:
- d20
overlay_size= file length −RS20offset (for example 1,201,351 − 1,200,888 = 463 in Single Solve); - d02 vtable =
.rdata$_ZTV15DiscoveryEnginewhen d02 is a PE build. In the Mastery answers, sets 4–10, 13 and 15 use this form; the ELF sets use_ZTV15DiscoveryEngine.
- d31
HGAUrecord: scan back from the end of the d31 ELF forHGAU, check bounds and CRC32, XOR-decode, parse the JSON. The JSON holdsconfigandtrace. Single Solve answers (answers.json):
- format
elf, machinex86-64, XOR key0xa1,HGAUCRC320x5ed06133; - campaign
BR31-000, domaingauntlet-000.day31.example.invalid, mutexGlobal\HuntressBR31-000, urlhttps://gauntlet-000.day31.example.invalid/final/BR31-000(the same forconfig_*andgauntlet_config_*); gauntlet_trace_branch=success.
- Single Solve and Time Trial:
tools/run_gauntlet_bin.pydownloads the zip, runssolve_tm.pyandgauntlet_bin.py, merges the two answer sets and submits once. Result:CORRECTfor both. - Mastery:
tools/run_mastery_bin.pydownloads all 15 sets in parallel, solves each set withsolve_tm.py+gauntlet_bin.py, and submits all 6,510 answers. Result:CORRECT.
Results
| Mode | Result | Flag |
|---|---|---|
| Single Solve | CORRECT (434/434) | 10c35879156f4b1b8f1d5e46a3336eb5 |
| Time Trial | CORRECT (434/434) | 15d0a26fad1a5fb177888339f074cb8e |
| Mastery | CORRECT (6,510/6,510) | 41d2118cc3e03a14f78196e4fe4d55cb |
Saved files:
- Single Solve:
start-response.json,answers.jsonandpartial369.json. No final submit response was saved; the flag comes from the Game Master status recorded in~/.config/huntress/progress.json(and the agent log for Day 31). - Time Trial:
start-response.json,answers.jsonand a latersubmit-response.json(already_solved). - Mastery:
start-meta.json(the 15 download capabilities and 6,510 questions),answers.jsonandsubmit-response.json(CORRECT, with the flag).
Reproduce
The Day 31 zips were not saved, so an offline re-run is not possible. Live driver for Single Solve:
python3 -I ~/.config/huntress/solvers/run_gauntlet_bin.py binary-reverse-engineering-day-31-reversing-gauntlet single_solve /tmp/d31
Mastery (start-meta.json holds the download capabilities and questions):
python3 -I ~/.config/huntress/solvers/run_mastery_bin.py /tmp/d31m mastery/start-meta.json
Both need a Game Master token in ~/.config/huntress/gm-token. Note: for Time Trial and Mastery, run_gauntlet_bin.py sends op=retry, which starts a fresh attempt. Neither tool runs the samples.
Day 31: Mobile Arena Gauntlet
Lane: Mobile (Android). Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
mobile-android-day-31-mobile-arena-gauntlet(Game Master name:📱 Mobile Arena Gauntlet) - Prompt: "Complete a mass-generated multi-app campaign that composes every released mobile primitive under one aggregate clock."
What we were given
- Single Solve and Time Trial: one APK each. Nothing from these two modes was saved in the repo.
- Mastery: 15 bundles, no deadline (
deadline: null). Each bundle is an APK for its case. The original bytes are inmastery/artifacts/:
| Set | Artifact | SHA-256 |
|---|---|---|
| 1 | set-01.zip | cf882f950f8204f0522e75dc5d412513c896bb2e82d1165784e263e1034e341b |
| 2 | set-02.zip | c56ae5588ff146f461db7c7ef875df40c325325fd646db8c7fafb1641a221da6 |
| 3 | set-03.zip | 19bb596490e3759cc995a33d7ba5f630fbed3f6b9175bd06902698f9e74ec032 |
| 4 | set-04.zip | 7a21f6287cb40aa48ab9fd8c7c5c8b7525a733b8ecf8b4f3ca9392e97ee39823 |
| 5 | set-05.zip | b1124b96fcb35c39790c4c7f3cd4eaf42b77d620a019f4e1fe7ac51b0531cd2e |
| 6 | set-06.zip | cce83c58b2f808d1aa2350640dcc9d6476e6de93814e33ba05c9b1ae8b89c43d |
| 7 | set-07.zip | 4423ca10f450ef5f57af8a2726f640a7e43f4c256b4001ef8ff010cf90322217 |
| 8 | set-08.zip | 883bda0ce5fdda15732e62c7e72c148d9615c0c5bcce7e863577740351366cda |
| 9 | set-09.zip | a4b083782eba08407320fb3ccb04c55acd40ebd3b8da7af15c3657320e3d47fc |
| 10 | set-10.zip | 3033faa92ffde2b78780ab80baedbb9a68b17b9ecea28fadbce53c865b0f6f1c |
| 11 | set-11.zip | 7336bbb1ef03d937e6d85f8f02abf423cce85969f4e9b708a18fe2c9739243fc |
| 12 | set-12.zip | 496e59f8d6b84df89e6f6e8254a9a3d8a40c605dacb108fdb774ea3ba763a15b |
| 13 | set-13.zip | 377444eac526fba4764eecc68437ca0ddbb175d721ef6d89f3205d1bc13de720 |
| 14 | set-14.zip | b95e4ed7863b9030f697bf55bb7e5530274202bbccc79e56486654c994fc526d |
| 15 | set-15.zip | ecd700f8b497dc266ccfb71d30453e34d90d3e2e32ba367bc40a60febb82b90a |
- All 15 declare codec
analysisinassets/huntress_puzzle.json. A few carry extra pieces: set 5 has a network security config, sets 7 and 8 havelib/x86_64/libarena.so, and set 10 has a second DEX,assets/payload.dex.
What was asked
- One question per case: "the exact backend answer code returned for its case".
- Answer format:
ANS-plus exactly 16 uppercase hex characters. Submit the code only. - Mastery questions, one per set:
| Answer ID | Case | Package |
|---|---|---|
set1.answer | MOB-02-38E9261315 | com.huntress.mobile.d02.v38e9261315e4 |
set2.answer | MOB-03-236070EE4D | com.huntress.mobile.d03.v236070ee4d6c |
set3.answer | MOB-05-65A0CCE721 | com.huntress.mobile.d05.v65a0cce721bd |
set4.answer | MOB-07-DB46927816 | com.huntress.mobile.d07.vdb46927816e1 |
set5.answer | MOB-10-C91D772815 | com.huntress.mobile.d10.vc91d772815e1 |
set6.answer | MOB-11-99C82461C3 | com.huntress.mobile.d11.v99c82461c3ec |
set7.answer | MOB-14-1B42E6B9AC | com.huntress.mobile.d14.v1b42e6b9ac88 |
set8.answer | MOB-16-214E11B13F | com.huntress.mobile.d16.v214e11b13ffd |
set9.answer | MOB-19-2EBDC84E87 | com.huntress.mobile.d19.v2ebdc84e8719 |
set10.answer | MOB-21-97EDD052B8 | com.huntress.mobile.d21.v97edd052b8bf |
set11.answer | MOB-22-EEF290EF65 | com.huntress.mobile.d22.veef290ef6502 |
set12.answer | MOB-25-932DFBF5E9 | com.huntress.mobile.d25.v932dfbf5e9c2 |
set13.answer | MOB-26-CBB32BD5F9 | com.huntress.mobile.d26.vcbb32bd5f985 |
set14.answer | MOB-28-659AFB110B | com.huntress.mobile.d28.v659afb110b22 |
set15.answer | MOB-31-27E1C3A293 | com.huntress.mobile.d31.v27e1c3a293c4 |
How it was solved, start to finish
No app was installed or run.
- Single Solve and Time Trial at the drop. The watcher ran
run_mode.pyat 07:00 local time. Its log line, 14 seconds later:
[OK] mobile-android single=CORRECT(726ef0597767e2149c3fcc6c483ff96e) TT=CORRECT mastery=no-output
The APKs and answers for these two modes were not saved.
- Mastery: the teammate session. It resumed the assigned Mastery attempt and downloaded the 15 bundles through the Game Master proxy. The hashes above confirm the saved files.
- Evaluated each APK's own code.
tools/dex_answer_vm.pyconverts the DEX instructions for the existing interpreter, including methods inassets/*.dex.tools/smali_analysis.pymodels the asset reads, reflection, string operations and native methods this bundle uses. - First submit: 14 of 15 accepted. The missing piece was an auxiliary DEX and the reflective loader that pulls it in. (Set 10 is the only bundle with a second DEX,
assets/payload.dex.) In the same commit the tools gained:
dex_answer_vm.py: also loadassets/*.dex, not justclasses*.dex,smali_analysis.py:ClassLoader.loadClass,const-class,Assets.readandString.indexOf.
- Second submit: all 15,
CORRECT. The teammate session committed this folder at 13:29:59 UTC.
Same day, second session
A session on this PC also ran the Mastery with ~/.config/huntress/solvers/run_mode.py (from 13:27 UTC). The first runs crashed inside smali_analysis.py. The fixes were:
- add
packed-switchsupport (in that session's own attempt, set 9 dispatches through apacked-switchinReflectionMaze.dispatch), - keep the first copy of a case label. Labels like
:pswitch_5appear twice, at the real code and again inside the switch data table, and the second copy was overwriting the jump target, - pass non-number values (such as strings) into method parameters as they are,
- raise an error on unknown library calls instead of silently returning nothing, and add a trace mode.
At 13:37 UTC the driver printed:
{"mode": "mastery", "n": 15, "result": "CORRECT", "flag": "75bd285cf827f63931da0a38e62eae6e", "remaining": null, "missing": []}
Results
| Mode | Result | Flag |
|---|---|---|
| Single Solve | CORRECT | 726ef0597767e2149c3fcc6c483ff96e |
| Time Trial | CORRECT | 6af707e71b27050e4c52139ec2deb057 |
| Mastery | CORRECT | 75bd285cf827f63931da0a38e62eae6e |
- No Game Master responses or answer codes were saved in this folder. Only the 15 Mastery bundles were kept.
- The flags come from the checkpoint file
~/.config/huntress/progress.json. The Single Solve flag also appears in the watcher log, the Time Trial flag in a session log, and the Mastery flag in the driver output above.
Reproduce
Mastery, with the tools/ copy of the driver:
cd ~/projects/huntress-ctf-writeups/tools
python3 -I run_mode.py mobile-android-day-31-mobile-arena-gauntlet mastery mobile_puzzle /tmp/d31
This copy reaches the Game Master through the CourseStack proxy (http://10.0.0.219/huntress-ctf-proxy). The direct DEX path needs the Python packages androguard and capstone. The older smali path needs Java and baksmali.jar. Both read and evaluate the DEX in Python. Nothing is installed or run on a device.
Day 31: One More Thing
Lane: Warmups. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
warmups-day-31 - Prompt: "Thirty-two, a little pressure, then sixty-four. Unpack that thought."
- New encoding: nested chain: base64, gzip, base32
What we were given
- One blob file per mode (Single Solve and Time Trial), or a zip of multiple blobs (Mastery).
- Each blob has numbered lines (
NN<TAB>fragment). Each line is independently encoded. - The decoded text ends with a slug like
word-word-word-NNto submit.
How it was solved
- Decode the blob. Peel layers: base64-decode, gzip-decompress, base32-decode. The innermost result is plaintext.
- Mastery blobs use multiple encodings from Days 1-31. The solver (
warmup_decode.py) tries every known decoder on each line and picks the one producing printable text. - Concatenate all decoded lines. The text contains a message ending in the answer slug.
- Submit the slug to the Game Master.
Results
- Single Solve:
CORRECT. - Time Trial:
CORRECT. - Mastery:
CORRECT. 153 slugs. Flag:7163e22330522307ac4e4ef7270e8dfa.
Day 31 — Full Stack Incident (Fetch-to-Worker Chain + Detection/Repair)
Lane: Web Exploitation · Challenge ID: web-exploitation-day-31-full-stack-incident
> Reconstruct the unsigned fetch-to-worker incident from the request log. Follow the exposed service routes to reproduce it, then submit a detector and repair that block the attack while preserving signed status checks.
What we were given
A live web target with exposed service routes, a request log, and an incident evidence API. This was the Day 31 capstone — it required both reproducing an attack chain and writing a detection/repair rule.
How it was solved
Step 1 — Recon
- Opened the target and checked
/api/cluesfor the route map: dispatch, audit, and worker endpoints. - Read
/api/requests— the request log. It showed a history of requests includingreq-102: an unsigned queued fetch targeting a specific token (e.g.38fa9180e8d4). This was the incident to reproduce.
Step 2 — Reproduce the attack chain
Replayed the unsigned fetch-to-worker chain using the exposed routes:
GET /dispatch-*?target=38fa9180e8d4— create the fetch eventPOST /audit-*with{"token": "38fa9180e8d4"}— dispatch the workerGET /worker-*?command=cat%20objective— execute the unsigned worker actionGET /api/evidence— confirm the incident was reproduced and read the detector/repair schema
Step 3 — Write the detection and repair rule
The /api/evidence endpoint showed the event history and described the required response format. The detector and repair needed to:
- Detect: Match
worker.dispatchevents wheresigned: false - Repair: Block internal fetches, require signed events, allow only the
statusworker command - Preserve: Signed status checks must continue working (regression test)
Submitted the detector/repair JSON to /api/response. The target validated:
- Attack detection (unsigned dispatch caught)
- Unsigned event rejection
- Internal fetch blocking
- Benign status events still allowed
- Status access preserved
All checks passed — the proof was returned.
Mastery (8 targets)
Targets 1–7 were standard web exploitation types (SSTI, mass assignment, reflected XSS, session fixation, auth bypass, backup exposure, SQLi, IDOR, LFI, stored XSS) solved by web_solve.py. Target 8 was another instance of the fetch-to-worker incident.
Results
| Mode | Targets | Result |
|---|---|---|
| Single Solve | 1 | CORRECT |
| Time Trial | 1 (timed, 16-player pool) | CORRECT |
| Mastery | 8 (timed, 8-player pool) | CORRECT |