2026-10-20

Day 20: Resourceful

Lane: Binary reverse engineering. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.

The challenge

What we were given

What was asked

How it was solved, start to finish

  1. Ran the driver run_tm.py: start the attempt, download the zip, run solve_tm.py, submit.
  2. d01–d19 were answered as on Day 19.
  3. Read the RS20 header. The question gave the layout:
  1. Config: the resource at +48 is a normal HCFG record. solve_tm.py finds it with its first step, the plain HCFG scan.
  1. Overlay fields: both overlay questions name PK19 and RS20. The solver picks the magic whose number matches the day (RS20 for d20), finds it, and reads the size field at +8.

Re-checked on the saved sample:

d20 length 1201351, RS20 at 1200888
resource size (u32 at +8) = 380, scratch size (u16 at +12) = 35, ends at end of file: True
scratch SHA-256 matches; bytes at +48 = b'HCFG'
HCFG offset=1200936 version=1 xor_key=0x51 len=368 crc32=0x570dddce
JSON: {"campaign":"BR20-000","domain":"node-000.day20.example.invalid","ipv4":"198.51.100.130","url":"https://node-000.day20.example.invalid/api/BR20-000","mutex":"Global\\HuntressBR20_000", ...}

Answers: d20_analysis_overlay_offset = 1200888, d20_analysis_hcfg_resource_size = 380, CRC32 0x570dddce, campaign BR20-000.

  1. Submitted all 240 answers (answers.json). Result: CORRECT.
  2. Time Trial: a fresh variant, same steps. Result: CORRECT.
  3. Mastery: five deliveries (1,200 answers), same steps. Result: CORRECT.

Results

ModeResultFlag
Single SolveCORRECTd682a3eda342c249a3666a3134edd492
Time TrialCORRECT557935f78feafd5d2e13f6bbd06c6d39
MasteryCORRECTbc62211f26677a7746208165568b2d95

Each mode folder has the raw start-response.json, answers.json, submit-response.json and final-status-response.json.

Reproduce

Offline, from this folder (no Game Master needed):

mkdir -p /tmp/d20/deliveries && cp single-solve/evidence.zip /tmp/d20/deliveries/delivery-1.zip
python3 -I ~/.config/huntress/solvers/solve_tm.py single-solve/start-response.json /tmp/d20/deliveries /tmp/d20/answers.json

Checked on 2026-11-01: this gives the same 240 answers as answers.json. It only parses the samples and never runs them.

Live driver:

python3 -I ~/.config/huntress/solvers/run_tm.py binary-reverse-engineering-day-20-resources-and-overlays single_solve /tmp/d20

This needs a Game Master token in ~/.config/huntress/gm-token.

Day 20: Universal Appeal

Lane: Metadata forensics. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.

The challenge

What we were given

What was asked

How it was solved, start to finish

  1. Wrote a Mach-O parser. Read the magic number first:
  1. First answer was wrong. The first version mapped CPU numbers to names. It returned ["arm64"] and the Game Master said incorrect.
  2. Found the format by testing one value at a time on the Single Solve. These were all incorrect: arm64, ARM64, 16777228, 0x0100000c, CPU_TYPE_ARM64, arm64 (0x0100000c), ["arm64"], arm64,x86_64, ["x86_64","arm64"], 12, MACH64 ARM64, [16777228], ["16777228"], [12]. This one was CORRECT:
["0x0100000c"]

So the grader wants each cputype as an 8-digit hex string with 0x, inside a JSON array. (0x0100000c is ARM64.)

  1. Fixed the handler in run_meta.py:
seen = set(); names = []
for t in types:                    # header order, no duplicates
    h = '0x%08x' % t
    if h not in seen: seen.add(h); names.append(h)
return json.dumps(names, separators=(',', ':'))
  1. Time Trial and Mastery. run_meta.py answered all 25 and all 125. Every macos-001.bin today gave ["0x0100000c"]. Example synthesis answer (Time Trial): ["shortcut-001.lnk","macos-001.bin","document-001.pdf","evidence-note.txt"]. Both CORRECT.

Later note: on Day 23, fat files with several CPU types appeared. A format search there showed the grader wants the list sorted, so the handler now returns sorted(names).

Results

ModeResultFlag
Single SolveCORRECTe426ff4805f25d881886829b48115ec0
Time TrialCORRECT07fe4cc090cfb448ee34f23a4e9a7932
MasteryCORRECT69f95042538542df7dc6448cc4a4fcbf

Each mode folder has answers.json, start-response.json, submit-response.json and final-status-response.json. The Single Solve folder also has the zip; its saved submit says already_solved because it is a re-run, and the final status shows CORRECT. No screenshots were captured.

Reproduce

python3 -I ~/.config/huntress/solvers/run_meta.py metadata-forensics-day-20-universal-appeal single_solve /tmp/d20

This needs a Game Master token in ~/.config/huntress/gm-token. For time_trial and mastery it calls op=retry first, which spends one of the unique attempts. It reads the Mach-O header bytes. It never runs the program.

Day 20: Loaded Later

Lane: Mobile (Android). Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.

The challenge

What we were given

What was asked

How it was solved, start to finish

The app was never installed or run. The secondary DEX was never loaded or run either.

  1. Started the Single Solve and downloaded the APK.
  2. Read the puzzle asset. New codec today: dynamic. data is not the code. It is a path inside the APK:
{"schema":"huntress.mobile.puzzle.v1","day":20,"codec":"dynamic","data":"assets/payload.dex"}
  1. Followed the path. Read the bytes of assets/payload.dex from the APK zip and searched them for the answer pattern:
import json, re, zipfile
z = zipfile.ZipFile('single-solve/loaded_later.apk')
p = json.loads(z.read('assets/huntress_puzzle.json'))
m = re.search(rb'ANS-[A-Fa-f0-9]{8,}', z.read(p['data']))
print(m.group().decode())

Output: ANS-ED497119EFACC9FF.

  1. Taught the driver. The same dynamic branch went into mobile_puzzle() in run_mode.py.
  2. Ran the lane driver for all three modes:
python3 -I ~/.config/huntress/solvers/run_mode.py mobile-android-day-20-loaded-later <mode> mobile_puzzle <workdir>
  1. Results: Single Solve (ANS-ED497119EFACC9FF), Time Trial (ANS-43ED6F08E3A1A6E2) and all five Mastery answers came back CORRECT.

Results

ModeResultFlag
Single SolveCORRECT2e2ea5a3263099379f0fc73ddf80ad53
Time TrialCORRECTd493fdbfb2ceb42571efb5ccfc8d34b5
MasteryCORRECTaea22fb7ba9a94326bac22f938b7f263

Each mode folder has answers.json, start-response.json, submit-response.json and final-status-response.json. The Single Solve submit-response.json says already_solved because it is a resubmit. Its final-status-response.json holds the CORRECT result and flag. No screenshots were taken.

Reproduce

Offline: run the Python snippet above from this folder.

A fresh run with the driver:

python3 -I ~/.config/huntress/solvers/run_mode.py mobile-android-day-20-loaded-later single_solve mobile_puzzle /tmp/d20

This needs a Game Master token in ~/.config/huntress/gm-token. It only unzips the APK and reads files inside it. It never installs or runs the app.

Day 20: The Butler Did It

Lane: Script analysis. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.

The challenge

What we were given

What was asked

How it was solved, start to finish

  1. Started the untimed Single Solve and downloaded evidence.zip. Extracted it with 7z x -pinfected.
  2. Ran the existing solver (solve_expansion.py, driven by run_expansion.py). Each family has its own decoder:
FamilyFilesHow the config is recoveredFirst seen
PowerShell*-sample.ps1Base64 JSON inside FromBase64String('...')Day 1
JScript*.jsjsdec.js loads the fixture in a Node vm sandbox (pure-computation globals only) and calls its decode functionsDay 3
Batch*.bat, *.cmdjoins the :HUNTRESS_INSPECT fragments and drops ^ caretsDay 3
VBScript*.vbsMaterial_ + Codec_, transform search until the text starts `v=1\steps=`Day 4
Python*.pyMATERIAL_ read with ast.literal_eval, same transform searchDay 5
Bash*.shquoted Material_ + Codec_; "advanced" files start `v=1\feature=`Day 6, Day 7
Node.jsnode-*.mjsMaterial_ + Codec_ with \x, \u and hex-array formatsDay 7
host, polyglothost-*, polyglot-*HUNTRESS_ANALYSIS_V1:<ENC>-<data> marker (B64, HEX, HB64, FRAG)Day 8

Role comes from the ordered steps, and ATT&CK from the role and the language (rules in Day 3). Host and polyglot configs already contain their role and ATT&CK ID.

  1. No new code was needed. The Jenkins, Classic ASP and Groovy files carry the usual marker. A pre-check of the Single Solve came back CORRECT.
  1. Then the five file lanes ran as parallel agents for the timed modes. The script lane came back CORRECT in all three modes.
  1. Real answers from single-solve/answers.json:
{
 "host-jenkins-pipeline-groovy-role": "staged_chain",
 "host-jenkins-pipeline-groovy-attack": "T1059",
 "host-jenkins-pipeline-groovy-adapter": "operation_graph",
 "host-jenkins-pipeline-groovy-campaign": "GROOVY-49671532",
 "host-jenkins-pipeline-groovy-url": "https://groovy-49671532e9.example.invalid/stage",
 "host-jenkins-pipeline-groovy-stage-count": "3",
 "host-jenkins-pipeline-groovy-steps": "decode_embedded>write_file>dispatch_process",
 "host-jenkins-pipeline-groovy-host-profile": "jenkins_pipeline"
}
  1. Time Trial and Mastery used the same solver on fresh variants.

Results

ModeResultFlag
Single SolveCORRECT154d4259f651eb0ff758369fdc1e71f5
Time TrialCORRECT547a9df584ff76d9c40d7feb17d118bf
MasteryCORRECTf1de734232c93d9540fe2ea89281819f

Each mode folder has answers.json and the Game Master JSON (start-, submit-, final-status-response.json). The evidence archives were not kept. No screenshots were taken.

Reproduce

The evidence archive was not kept, so the saved answers cannot be rebuilt offline. For a fresh attempt of this format:

mkdir -p /tmp/d20/ex
7z x -pinfected -o/tmp/d20/ex evidence.zip
python3 -I tools/solve_expansion.py /tmp/d20/ex start-response.json /tmp/d20/answers.json

Then submit answers.json to the Game Master (needs a token in ~/.config/huntress/gm-token). The tools/ copy decodes JScript with the pure-Python jsdec_py_emu.py, not the Node sandbox.

On the day, run_expansion.py drove the live modes. Since Day 23 that driver sends any question set with polyglot- IDs to solve_day23.py, which does not handle this format's host- and resource- IDs. So use solve_expansion.py directly, as above.

Day 20: Big Entrance

Lane: Warmups. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.

The challenge

What we were given

How it was solved

  1. Decode the blob. Hex string representing UTF-16 big-endian bytes. Hex-decode, then interpret as UTF-16BE.
  2. Mastery blobs use multiple encodings from Days 1-20. The solver (warmup_decode.py) tries every known decoder on each line and picks the one producing printable text.
  3. Concatenate all decoded lines. The text contains a message ending in the answer slug.
  4. Submit the slug to the Game Master.

Results

Day 20 — Administratively Speaking (Missing Authorization)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-05-administratively-speaking

> A staff-only door with no lock on it — just a sign.

What we were given

A live Django web target with API endpoints.

How it was solved

The challenge demonstrates a missing authorization check on a privileged endpoint.

  1. Queried /api/clues — a recon endpoint present on most Web Exploitation targets. It returned the framework (Django), a feature_route (/dispatch-fa3df6), and the current role (analyst).
  2. The route name suggests an admin dispatch function. Navigated to /dispatch-fa3df6 directly — no authentication token, no role escalation, no header spoofing needed.
  3. The endpoint returned a success response with effect: framework_authorization_bypassed and the proof: proof_cfcd5162b3f942558ec35aa13c2cc4d3.

Root cause: The admin route exists and is functional but has no authorization middleware. The /api/clues endpoint helpfully discloses the route path. Any unauthenticated request to the dispatch endpoint succeeds.

Automated with web_solve.py (ex_auth): /api/clues scrape → follow feature_route → extract proof.

Results

ModeResultFlag
Single SolveCORRECTc6eb94b0e87ca2fda3c524d08f2cec81
Time TrialCORRECTsame technique, fresh target
MasteryCORRECTmixed vuln types across targets

Day 20 — Stay in Your Directory (LFI / Path Traversal)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-04-lfi

> The viewer should stay inside its pages directory; proof is mounted at /run/huntress/objective.txt.

What we were given

A live PHP web target with a document viewer.

How it was solved

The challenge is local file inclusion via path traversal — the viewer includes whatever file path you give it.

  1. The app has a viewer at /reader.php?doc=<name> that loads documents from a pages directory.
  2. The doc parameter has no path confinement. The prompt tells us the proof is at /run/huntress/objective.txt.
  3. Requested GET /reader.php?doc=../../../../../run/huntress/objective.txt — the traversal sequence escapes the pages directory and reaches the absolute path.
  4. The server included the file contents in the response, revealing the proof: proof_1415dbfdece14135ac9246cbf064051e.

Root cause: The PHP include/readfile call uses the doc parameter without sanitizing ../ sequences or restricting to a directory. An attacker can read any file the web server process can access.

Automated with web_solve.py (ex_lfi): discovers viewer endpoints from the HTML, fuzzes parameter names (doc, page, file, path), and tries traversal prefixes to reach the known proof path.

Results

ModeResultFlag
Single SolveCORRECT25279d7513cf80cd3b01a75b740461d8
Time TrialCORRECTsame technique, fresh target
MasteryCORRECTmixed vuln types across targets