2026-10-29

Day 29: Fraternal Twins

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. The watcher ran the driver first. The Game Master answered incorrect, so the lane was flagged for manual work.
  2. Ran tools/solve_tm.py on the Single Solve archive. Its first output covered 355 of 406 fields. A full partial submit of those came back incorrect.
  3. Used the partial-submit oracle. Submitting the answers in day groups (d01 … d29) accepted every group except d20. Testing the d20 fields one by one showed d20_analysis_overlay_size was wrong.
  4. Fixed d20. The member length is 1,201,351 bytes and the RS20 magic is at offset 1,200,888, so the size is 463.
  1. Added the missing handlers to solve_tm.py (commit 99da660), for the question types first seen on Day 28 and the new d29 roles:
  1. d29 config check. Both builds end with the same record. Re-checked on the saved files:
d29--sample-O0.elf  length 43931  HCFG offset=43544 key=0xe1 len=375 crc32=0x78a90ef3
d29--sample-O3.elf  length 43931  HCFG offset=43544 key=0xe1 len=375 crc32=0x78a90ef3
JSON (both): {"campaign":"BR29-000","domain":"variant-000.day29.example.invalid","ipv4":"198.51.100.90","url":"https://variant-000.day29.example.invalid/v/BR29-000","mutex":"Global\\HuntressBR29-000_000", ...}

Both builds: format elf, machine 62. The configs match, so the common and the optimized_config_* answers are the same.

  1. Submitted the corrected answers in per-day groups. All 29 groups were accepted, and the last group (d29) completed the attempt: CORRECT. validation-observations.json records each oracle step.
  2. Time Trial: all 406 fields from the assigned archive. Result: CORRECT.
  3. Mastery:

Results

ModeResultFlag
Single SolveCORRECT (406/406)577e5da68e5b369b4d24a81d0d373b12
Time TrialCORRECT (406/406)67274a0aaf33bdcd4d105ad9e4dfab36
MasteryCORRECT (5,278/5,278)110b25d935f0ebbefe2e282729a9370f

Each mode folder has the archive(s), the answers, submit-response.json and final-status-response.json. Single Solve also keeps partial-submit-response.json (the first incorrect try) and validation-observations.json.

Reproduce

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

mkdir -p /tmp/d29/deliveries && cp single-solve/artifact.zip /tmp/d29/deliveries/delivery-1.zip
python3 -I ../../tools/solve_tm.py single-solve/start-response.json /tmp/d29/deliveries /tmp/d29/answers.json

Checked on 2026-11-01: this answers 406/406, and every answer matches answers.json. It only parses the samples and never runs them.

Day 29: Trust Issues

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

The method: a certificate's SHA-256 fingerprint is the SHA-256 of its DER bytes. A PEM file is that DER, Base64-encoded between BEGIN/END CERTIFICATE lines.

  1. Single Solve. Started the untimed attempt and downloaded artifact.zip. Ran OpenSSL on the PEM:
openssl x509 -in certificate-001.pem -noout -fingerprint -sha256

Removed the colon separators and lowercased the 64 hex digits to match the answer format. Submitted under d29-x509-001-x509-sha256-fingerprint. CORRECT.

Re-checking the saved PEM without OpenSSL gives a 483-byte DER with SHA-256 b466fdbf8b8b8cb2d0b632bd24eb875576b44edb85f18f90f53dcdea1a0ec781.

  1. Added the same rule to the driver. The tools/run_meta.py copy got an x509 handler:
m = re.search(rb'-----BEGIN CERTIFICATE-----\s*(.*?)\s*-----END CERTIFICATE-----', fb, re.S)
der = base64.b64decode(re.sub(rb'\s+', b'', m.group(1)))
return hashlib.sha256(der).hexdigest()

This copy talks to the Game Master through the CourseStack proxy and reads the mode's artifact.zip from its work folder, which is why each mode folder here has one.

  1. Time Trial. The 34-field bundle was solved from its downloaded archive. Examples from answers.json: fingerprint 97b70bca945248acf0555404206ff36db0b91b93da7c4d2607d9621ef513c6b2, audio codec opus, partitions [242,300]. The final status reports CORRECT.
  2. Mastery, first pass. tools/run_meta.py answered all 442 fields. Six of them turned out to be wrong.
  3. Found the wrong fields with the partial-submit oracle. Submitting part of the answers returns accepted if all of them are right, or incorrect if any is wrong. Halving the fields of each set narrowed it down. For set 1:

So the audio codec was wrong. The same search found one wrong field in six sets, always media.primary_audio_codec_name: sets 1, 2, 5, 7, 12 and 13. All 60 oracle calls are in oracle-localization.json.

  1. Fixed the six codecs. They were checked on the assigned WAV files with MediaInfo and mapped to the stream codec names the grader uses: mp3 (sets 1, 12, 13) and pcm_s16le (sets 2, 5, 7).
  2. Mastery, final submit. The corrected map returned CORRECT.

Results

ModeResultFlag
Single SolveCORRECTff8d0ef20b51e6f47ed7a49abc46e66d
Time TrialCORRECT2af7973863eafc15a2f9f129393ac42c
MasteryCORRECT163f0ac6ad6f1d991575444e3de25357

Each mode folder has the downloaded artifact.zip, start-response.json, submit-response.json and final-status-response.json. Time Trial and Mastery also have answers.json; Mastery has the oracle record. No screenshots were captured.

Reproduce

openssl x509 -in single-solve/extracted/certificate-001.pem -noout -fingerprint -sha256
python3 -I ~/.config/huntress/solvers/run_meta.py metadata-forensics-day-29-trust-issues single_solve /tmp/d29

The first line only needs the saved PEM. The second needs a Game Master token in ~/.config/huntress/gm-token; this copy of the driver also has an x509 handler (SHA-256 over the DER). For time_trial and mastery it calls op=retry first, which spends one of the unique attempts.

Day 29: White Box Key Recovery

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

The challenge

What we were given

{"schema":"huntress.mobile.puzzle.v1","day":29,"codec":"table","data":"6a7a825f767a6c82787c8b8d8592948a9d9597a5","key":41}

What was asked

How it was solved, start to finish

No app was installed or run.

  1. The driver failed at the drop. The watcher ran run_mode.py on Single Solve at 07:00 local time. It logged single=incorrect -> NEEDS MANUAL SOLVER (new wrinkle). The driver had no branch for table.
  2. Single Solve: the table transform. The 20 data bytes and the key (41 = 0x29) are enough. Byte i of the answer is data[i] - (key + 3 × i), modulo 256. For example 0x6a (106) − 41 = 65 = A.
import json
p = json.load(open('single-solve/extracted/assets/huntress_puzzle.json'))
d, k = bytes.fromhex(p['data']), p['key']
print(''.join(chr((b - (k + 3 * i)) % 256) for i, b in enumerate(d)))

Output: ANS-AB1D78DC8BA4D98C. It was submitted under answer and graded CORRECT. (The DEX of this APK has no Release class. It only has MainActivity, ChallengeActivity and WhiteBoxKeyRecovery.)

  1. Time Trial: the analysis chain. The answer comes from Release.code() in the DEX. A helper agent rebuilt the chain from the baksmali output:

Its Python port printed ANS-3F3675ECB5A05D1F, the same as the saved answer. The Time Trial was already graded CORRECT by the teammate session. Both constants above are present in the saved Time Trial DEX.

  1. Mastery: a DEX evaluator. Local attempts hit two gaps. Delivery 9 uses Java reflection (Class.forName + Method.invoke), and the simple interpreter could not run the walkSbox loop and arrays. Both local sessions then stopped on a usage limit. The teammate session finished Mastery with tools/dex_answer_vm.py:

The 13-answer map came back CORRECT at 13:34 UTC.

Results

ModeResultFlag
Single SolveCORRECT09b0023ca2df2d778f45003930e47761
Time TrialCORRECT2c8e2c9b6610de6ebca25cd04b8e5ceb
MasteryCORRECT6da46735fb0f1cf603ffc120e66c5132

Saved answers: Single Solve ANS-AB1D78DC8BA4D98C, Time Trial ANS-3F3675ECB5A05D1F. The thirteen Mastery answers are in mastery/answers.json. Each mode folder has the artifact(s), answers.json, start-response.json, submit-response.json and final-status-response.json.

Reproduce

Single Solve, offline: run the Python snippet above from this folder.

Mastery, with the tools/ copy of the driver:

cd ~/projects/huntress-ctf-writeups/tools
python3 -I run_mode.py mobile-android-day-29-white-box-key-recovery mastery mobile_puzzle /tmp/d29

This copy reaches the Game Master through the CourseStack proxy (http://10.0.0.219/huntress-ctf-proxy) and needs androguard for dex_answer_vm.py. It reads and evaluates the DEX in Python. Nothing is installed or run on a device.

Note from the code: run_mode.py reads the puzzle from the top of the zip, so it cannot open the split bundle (delivery-12). dex_answer_vm.answer() can, because it opens base.apk itself. How the bundle was fed in on the day was not recorded.

Day 29: Make It Make Sense

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. Single Solve. Started the untimed attempt and downloaded artifact.zip. Decoded the PowerShell, JScript, Batch, VBScript, Python, Bash, Node.js, host and polyglot files with the repo's expansion solver (tools/solve_expansion.py).

Real answers for a new Makefile file:

{"polyglot-makefile-staged-chain-role": "staged_chain", "polyglot-makefile-staged-chain-attack": "T1059",
 "polyglot-makefile-staged-chain-campaign": "MAKEFILE-0854134e",
 "polyglot-makefile-staged-chain-obfuscation": "plain_hex",
 "polyglot-makefile-staged-chain-stage-profile": "single_descriptor",
 "polyglot-makefile-staged-chain-next-language": "vbscript"}
  1. Time Trial. Decoded the 1,833-field bundle with tools/solve_day23.py. The submit was CORRECT (13:16:17 UTC). Example answers (layered LYR obfuscation):
{"polyglot-makefile-d7e615-role": "persistence_descriptor", "polyglot-makefile-d7e615-attack": "T1053",
 "polyglot-makefile-d7e615-obfuscation": "b32_b32", "polyglot-makefile-d7e615-stage-profile": "onyx_weave",
 "polyglot-makefile-d7e615-next-language": "xslt"}
  1. Mastery.

Results

ModeResultFlag
Single SolveCORRECT648f8d36d2c6563bb90bc09620914861
Time TrialCORRECT05b66114766be0730363eb9b6eb09016
MasteryCORRECTb43a836b24c84be185cf41bad998c9e4

The flags are from each mode's final-status-response.json. Each mode folder keeps its archive, the extracted files, answers.json and the Game Master JSON. No screenshots were taken.

Reproduce

Offline, from the repo root:

mkdir -p /tmp/d29/ex
7z x -pinfected -o/tmp/d29/ex repos/day-29-script-analysis-make-it-make-sense/single-solve/artifact.zip
python3 -I tools/solve_expansion.py /tmp/d29/ex \
  repos/day-29-script-analysis-make-it-make-sense/single-solve/start-response.json /tmp/d29/answers.json

This rebuilds all 1,747 saved Single Solve answers (re-checked on 2026-11-01). It only parses the files.

Mastery check: run tools/solve_day23.py on mastery/extracted/set-01 with set 1's questions (the set1. prefix removed), with node off PATH. It rebuilds all 1,833 saved set 1 answers (re-checked on 2026-11-01). With node on PATH, solve_day23.py first calls the jsdec.js next to it; the tools/ copy of that file is a static decoder.

Day 29: Rotten Base

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. Apply ROT13 letter rotation to the text, then base64-decode the result.
  2. Mastery blobs use multiple encodings from Days 1-29. 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 29 — Internal Affairs (SSRF + IDOR Chain)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-27-internal-affairs

> Two service boundaries, one hallway. Use the public fetch to knock on the internal door, then borrow somebody else's records on the way out.

What we were given

A live web target with a public-facing fetch endpoint and an internal service.

How it was solved

SSRF chained with IDOR — the public fetch endpoint reaches an internal service, and the internal service has broken object-level authorization.

  1. Explored the target application. /api/topology disclosed the architecture: a public-facing app and an internal case service running on loopback (127.0.0.1:8080), not exposed to the internet.
  2. The public app has a fetch/proxy endpoint (the feature route from /api/clues) that accepts a target URL parameter.
  3. The internal service has an account/case endpoint with an IDOR — you can access any record by ID without ownership checks.
  4. Chained the two weaknesses: GET /action-*?url=http://127.0.0.1:8080/account-*?id=13465 — the public fetch proxied the request to the internal service, which returned the restricted record containing the proof with effect: ssrf_then_object_authorization.

Root cause: Two independent weaknesses combine into a critical chain: (1) the public fetch endpoint doesn't restrict target URLs, allowing SSRF to internal services; (2) the internal service trusts all requests from localhost and doesn't enforce per-object authorization.

Mastery — mixed targets (5/5)

TargetVulnerability
1Backup exposure — exposed archive file
2IDOR — reference-only case accessible via session
3SQL injection — /explore endpoint injectable
4LFI — handbook viewer traversal to /run/huntress/objective.txt
5SSRF → internal service IDOR chain

Results

ModeResult
Single SolveCORRECT
Time TrialCORRECT
Mastery (5/5)CORRECT

Day 29 — Trust the Build (Dependency Confusion / Supply Chain)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-26-trust-the-build

> The updater trusts its packages like old friends. Slip a tampered dependency into the build and watch it install your version of the truth.

What we were given

A live web target with a package update mechanism.

How it was solved

Supply chain attack via dependency confusion — the update mechanism verifies some package fields but not all, allowing a tampered dependency to be accepted.

  1. Read /api/updates to see the current package manifest — names, versions, hashes, and signatures.
  2. Read /api/update-policy to understand the verification process — which fields are checked and which aren't.
  3. Discovered the verification gap: the updater checks package, version, hash, and signature but does not verify the artifact_hook field.
  4. Submitted an update with all the original verified fields intact but changed the artifact_hook from passive_health (benign) to privileged_export (escalated).
  5. The endpoint accepted the tampered package — verification passed on the checked fields — and returned effect: unverified_update_activated with the proof.

Root cause: The update verification is incomplete. It validates package identity and integrity (name, version, hash, signature) but ignores the behavioral hook field. An attacker who can submit update requests can change what the package does while passing all integrity checks.

Mastery — mixed targets (5/5)

TargetVulnerability
1Backup exposure — robots.txt → release archive → JSON backup
2IDOR — activity feed leaks executive incident → direct access
3SQL injection — /search endpoint injectable
4LFI — handbook viewer traversal to /run/huntress/objective.txt
5Dependency confusion — tampered artifact hook in update payload

Results

ModeResult
Single SolveCORRECT
Time TrialCORRECT
Mastery (5/5)CORRECT