2026-10-30

Day 30: Campaign Trail

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 (copied as delivery-1.zip, the driver's file name). It supplied 409 analysis and artifact-hash fields. It cannot read Neko files, so the 11 d30 analysis fields were left.
  3. Checked the 409 answers with the partial-submit oracle. They were submitted one day group at a time (d01 … d29, 14 fields each, then the three d30 hashes). Every group came back accepted, leaving 11 fields (oracle-log.json, accepted-candidates.json).
  4. Decoded the d30 graph records. Each .n file ends with an HGRF record:

Re-checked on the saved files (scanning back from the end):

d30--sample-config.n   len 20916  HGRF offset 20209  key=0xf1 len 695 crc32=0x76c956e7  ends at end of file
d30--sample-library.n  len 20890  HGRF offset 20182  key=0xf1 len 696 crc32=0x8e1f39c8  ends at end of file
d30--sample-loader.n   len 20880  HGRF offset 20173  key=0xf1 len 695 crc32=0xc41517fb  ends at end of file
{"schema": "huntress.binary.campaign_graph.v1", "campaign_id": "DAY30-000",
 "nodes": ["loader.n", "library.n", "config.n"], "edges": ["loader.n->library.n", "library.n->config.n"],
 "load_order": ["loader.n", "library.n", "config.n"],
 "config": {"campaign": "BR30-000", "domain": "campaign-000.day30.example.invalid", "ipv4": "203.0.113.30",
            "url": "https://campaign-000.day30.example.invalid/stage/BR30-000", "mutex": "Global\\HuntressBR30-000", ...},
 "this_role": "config", ...}

The three graphs are the same except for this_role (config, library, loader). So the "graphs match" check passes and both config sets are BR30-000.

  1. Format: all three start with NEKO, so each is neko_bytecode.
  2. Submitted the last 11 fields. Result: CORRECT (final-submit-response.json). All 420 answers are in answers.json.
  3. Time Trial: same flow. 30 oracle groups were accepted one by one, and the last submit returned CORRECT with 420 accepted (oracle-log.json, accepted-candidates.json).
  4. Mastery: all 14 deliveries went through tools/solve_tm.py, then the d30 records in each set were decoded the same way. All 5,880 answers: CORRECT.

A second session worked on Day 30 at the same time and solved some modes in parallel. Every mode was checked against the Game Master directly (agent log for Day 30).

Results

ModeResultFlag
Single SolveCORRECT (420/420)4e52d1a8b97ab5253a3258947f89dbe6
Time TrialCORRECT (420/420)b3c55b4766c3ce52292c30c0ebf160d5
MasteryCORRECT (5,880/5,880)e14b347cfaf1160c8f74a1595843f8b5

Saved files: Single Solve has the evidence, extracted members, oracle log, accepted answers and final submit. Time Trial has no answers.json; its accepted answers are in accepted-candidates.json. Mastery has the 14 deliveries, answers.json, submit-response.json and final-status-response.json.

Reproduce

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

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

Checked on 2026-11-01: this fills 409 fields, all equal to accepted-candidates.json. The 11 d30 analysis fields need the HGRF decode from step 4 (also built into tools/gauntlet_bin.py for Day 31). Nothing here runs the samples.

Day 30 (bonus): SHA1-Hulud

Lane: Binary reverse engineering. Mode: Single Solve. Result: CORRECT. Flag: flag{fdd8f49af5265a34275bdede8179f21e}

The challenge

What we were given

How it was solved, start to finish

  1. First look. Static analysis with objdump, strings and Python.
  1. Found it's a crackme.
  1. Mapped the anti-analysis. The program fights debuggers and emulators hard:

Key detail: the checks don't make it crash or quit. Each check result is quietly mixed into the encryption keys. So if anything looks wrong, the program runs normally but no input can ever pass.

  1. Hashed its own code.
  1. Reversed the input check. It encrypts your input and compares it against six stored answers:
  1. Built an emulator (emulation/emu_v7.py, using Unicorn), because the six expected values only exist at runtime. It fakes enough of Windows (APIs, exception handler, clocks, firmware tables) to reach the compare.
  2. The wall. The six expected values decrypted to garbage, so no input could pass in the emulator. This took most of a day to chase down.
  3. The fix. Windows runs a "TLS callback" before main. Here it saves a hash of the program's load address. Two checks compare that hash against a fresh one. The emulator skipped the callback, so both checks failed silently and corrupted every key. After running it (TLSFIX=1), all six expected values decrypted cleanly:
RoundLengthStarts withWhat it is
118flag{n0tdecoy
338your flag is in another …decoy
2, 4, 515–45binary bytesjunk
638flag{fddthe flag
  1. Recovered the full flag.
  1. Submitted to the Game Master. The result was CORRECT (single-solve/answers-correct.json).

Proof artifacts

GM submission (single-solve/answers-correct.json):

{"flag":"flag{fdd8f49af5265a34275bdede8179f21e}"}

GM returned CORRECT at 2026-10-31T13:17:54Z.

Key crypto values (all reproduced in Python, verified byte-for-byte against the emulator):

ArtifactValue
.text SHA-1eaa003f961ae616e4e724e767acaa54174a5ef3d
Runtime key (extra compress round)88ebb8c74e2e6f070d9af49b90e39e1a62b3b5e5
TLS callback stored valuemix(0x140000000) → 0xab93ea50037ac248
Wrong value (no TLS fix)0xd771fa00b2eb2d8d

Round 6 decrypt chain (the flag round):

Self-hash reproduction (emulation/sha1c.py): standard SHA-1 compress over .text section (0x140001000, 0x7e000 bytes) plus 0x44-byte header trailer, then one more compress round: compress(H, LE(H) || 0^44) + H.

Tooling

All in emulation/:

FilePurpose
emu_v7.pyUnicorn-based emulator — fakes Windows APIs, exception handler, TLS callback, timing
sha1c.pySelf-hash key reproduction
hcipher.pyE1 cipher (16-round 128-bit ARX/T-function, CBC). Forward encrypt + decrypt
gpass.pyG pass (reverse-chained 16-round, keyed by d640). Forward + inverse
oracle.pyInverts a round's expected value using per-block E1 keys from a prefix-matched run
step.pyBlock-by-block CBC decrypt using keys from oracle runs
inv_log.pyAnti-analysis accumulator inversion (confirmed all checks pass with TLS fix)

See EMULATION-NOTES.md for the full crypto chain and ANALYSIS-NOTES.md for early static analysis.

Day 30: Seeing Double

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: hash each file's exact bytes with SHA-256. Files with the same digest are exact copies. Report every group with more than one member.

  1. Single Solve. Hashed every artifact in cluster-001.zip. Each family of six was one group of identical files: 5 groups of 6. In the manifest, five members of each family have producer_id duplicate_ref. The accepted answer lists artifact IDs from the manifest (alpha-01), not file names (alpha-01.txt):
[["alpha-01","alpha-02","alpha-03","alpha-04","alpha-05","alpha-06"],
 ["bravo-01","bravo-02","bravo-03","bravo-04","bravo-05","bravo-06"],
 ["charlie-01","charlie-02","charlie-03","charlie-04","charlie-05","charlie-06"],
 ["delta-01","delta-02","delta-03","delta-04","delta-05","delta-06"],
 ["echo-01","echo-02","echo-03","echo-04","echo-05","echo-06"]]

(Sent as one compact line.) CORRECT.

  1. Added two handlers to the driver (~/.config/huntress/solvers/run_meta.py), per the Day 30 agent log:
names = [n for n in z.namelist() if not n.endswith('/')]
groups = {}
for n in names:
    groups.setdefault(hashlib.sha256(z.read(n)).hexdigest(), []).append(n)
dup = [v for v in groups.values() if len(v) > 1]
return json.dumps(sorted(sorted(os.path.basename(x) for x in v) for v in dup), separators=(',', ':'))

In the Time Trial and Mastery cluster zips the member files have no extension (for example artifacts/marble-06), so the base name is the ID.

  1. Time Trial. All 35 answered and CORRECT at 13:17:05 UTC. Duplicate groups from answers.json:
[["cascade-63","fathom-28","garnet-50","garnet-87","lagoon-26"],["falcon-35","raven-08","raven-86","thicket-45","willow-47"],["falcon-66","prairie-34"],["lantern-06","marble-06"],["marble-52","yarrow-87"]]
  1. Mastery. For each of the 14 bundles: hashes and file properties as before, plus the cluster groups and the synthesis order. The candidates were built from the extracted files and checked in groups against the partial-submit oracle:

Mastery was completed on attempt ef3987bb-e26e-46d8-a77d-8677ac746eee: 490 of 490 accepted, CORRECT at 13:23:57 UTC, solved by grizzlybear.

Two sessions worked Day 30 at the same time. That explains some odd records:

Results

ModeResultFlag
Single SolveCORRECTd763c6cbae2ddbd75693309311f730dd
Time TrialCORRECT046cb0081f2fa40987b43cea568af43e
MasteryCORRECTd3d9f2b3af6c4f9899568164e532973b

The completion records are single-solve/submit-response.json and the final-status-response.json files in time-trial/ and mastery/. No screenshots were captured.

Reproduce

python3 -I -c '
import zipfile, hashlib, sys
z = zipfile.ZipFile(sys.argv[1]); g = {}
for n in z.namelist():
    if not n.endswith("/"): g.setdefault(hashlib.sha256(z.read(n)).hexdigest(), []).append(n)
print([sorted(v) for v in g.values() if len(v) > 1])' single-solve/extracted/cluster-001.zip
python3 -I ~/.config/huntress/solvers/run_meta.py metadata-forensics-day-30-seeing-double time_trial /tmp/d30

The first command only reads the saved zip. The second 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.

Day 30: Layered Protections

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

The challenge

What we were given

{"schema": "huntress.mobile.puzzle.v1", "day": 30, "codec": "layered", "data": "TU49OyInJlUlJSQkKilcKDFOUF4=", "key": 12}

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 layered.
  2. Checked the DEX. The Single Solve DEX is thin. An activity accepts answer and case_id and forwards them to the case evidence endpoint. It has no decoder and no Release.code(). So the transform had to be worked out from the puzzle alone.
  3. Single Solve: the layered transform. Base64-decode data to 20 bytes:
4d4e3d3b22272655252524242a295c28314e505e

Then reverse the bytes and XOR byte i with (12 XOR 19) XOR i, where 19 is the last index. The result is ANS-3F023201F46243CA. The teammate session cracked this at 13:36 UTC and the Game Master replied CORRECT.

The same transform, as later added to run_mode.py (codec == 'layered'):

raw=base64.b64decode(pj['data']); k=pj.get('key',0)
s=''.join(chr(raw[i]^((k+i)&0xff)) for i in range(len(raw)))
return s[::-1]

That is: XOR byte i with key + i, then reverse. Both forms give ANS-3F023201F46243CA on the saved puzzle.

  1. Time Trial: analysis. The answer is computed by the APK-owned Release.code(). The teammate session evaluated it statically with tools/dex_answer_vm.py (see Day 29). It gave ANS-F1945C6835299137, graded CORRECT.
  2. Mastery. The same evaluator gave one answer per set. One batched submit of all 14 came back CORRECT.

Note: the headless day agent's log says it reversed the layered codec, added it to run_mode.py, and "took the TT". The saved Time Trial APK, however, is analysis-coded. Two sessions worked this day in parallel, and the same log notes that the Game Master dedupes repeat solves. The Game Master's solved_by time for the Time Trial (13:39:44 UTC) falls right after the saved analysis attempt started (13:39:17 UTC), so that saved attempt was the first one graded CORRECT.

Results

ModeResultFlag
Single SolveCORRECT8289748563c8efe991dab61bae05f534
Time TrialCORRECT68cf02e2030c8a8a559f3a2e84b742b8
MasteryCORRECT9359d79d84fd5520839c5170a3109e50

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

Reproduce

Single Solve, offline:

python3 -I -c 'import base64; r=base64.b64decode("TU49OyInJlUlJSQkKilcKDFOUF4="); print("".join(chr(r[i]^(12+i)) for i in range(len(r)))[::-1])'

Time Trial and Mastery, with the tools/ copy of the driver:

cd ~/projects/huntress-ctf-writeups/tools
python3 -I run_mode.py mobile-android-day-30-layered-protections time_trial mobile_puzzle /tmp/d30

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 that the tools/ copy of run_mode.py has no layered branch; that branch is only in ~/.config/huntress/solvers/run_mode.py.

Day 30: Spill the Beans

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: decoded with tools/solve_day24.py on the extracted archive and single-solve/start-response.json. It decodes the PowerShell, Python, shell, Batch, marker and other-language files (see Day 24).
  2. JScript: a new static decoder, tools/jsdec.js. It does not run the fixtures. It reads each file as text and has one branch per fixture pattern (keyBytes, storedMaterial, characters, item1, packedText). Each branch applies that pattern's transform: repeating-key XOR, rolling XOR, reverse, add or subtract a constant, or Base64. Some keys are written into the decoder (for example ^ 118 for %XX text), so it is tuned to this day's fixtures. It prints the decoded descriptor. One branch, as written:
} else if (source.includes("var storedMaterial")) {
  const bytes = text(/var\s+storedMaterial\s*=\s*\[([^\]]+)\]/)
    .split(",").map((x) => parseInt(x, 16));
  let previous = 44;
  decoded = bytes.map((value) => {
    const result = value ^ previous;
    previous = value;
    return result;
  });
  1. Checked with the partial-submit oracle (see Day 3). single-solve/oracle-log.json records 12 submits, one family at a time:
GroupAnswersResultRemaining after
resource / collection / impact5 + 5 + 5accepted1,787
jscript (first part)8accepted1,779
batch72accepted1,707
vbscript72accepted1,635
python126accepted1,509
bash168accepted1,341
nodejs56accepted1,285
polyglot1,056accepted229
host165accepted64
jscript (rest)64CORRECT + flag—

The accepted set (accepted-candidates.json) is the same as answers.json. The Single Solve was solved at 13:11:53 UTC. Real answers for the new files:

{"host-jsp-beanshell-beanshell-host-profile": "jsp_beanshell",
 "host-jsp-beanshell-beanshell-steps": "profile_host>decode_configuration>dispatch_language",
 "host-jsp-beanshell-beanshell-next-language": "jscript",
 "polyglot-beanshell-staged-chain-role": "staged_chain",
 "polyglot-beanshell-staged-chain-obfuscation": "base64",
 "polyglot-beanshell-staged-chain-stage-profile": "two_stage_download_execute"}
  1. Time Trial: tools/solve_day23.py on the hash-named archive.
  1. Mastery: tools/solve_day23.py on each of the 14 sets. The answers were merged under their setN. prefixes and submitted together, CORRECT (13:27:38 UTC).
  2. A second session was also working Day 30 at the same time. The Game Master deduplicates, so a correct result counts once. The final state was checked against the Game Master directly.

Results

ModeResultFlag
Single SolveCORRECTb1d4143d38b6ff3ab945996f7756d000
Time TrialCORRECTd2a5f52ec829e6ddf22599162c942988
MasteryCORRECT83649c741e59beffe2e6ce877f6c661b

The flags are from single-solve/status-response.json and the final-status-response.json files. Every mode folder keeps the raw evidence, the generated answers, the submit replies and the final status. No screenshots were taken.

Reproduce

Offline, from the repo root:

mkdir -p /tmp/d30/ex
7z x -pinfected -o/tmp/d30/ex repos/day-30-script-analysis-spill-the-beans/single-solve/evidence.zip
python3 -I tools/solve_day24.py /tmp/d30/ex \
  repos/day-30-script-analysis-spill-the-beans/single-solve/start-response.json /tmp/d30/answers.json

For Time Trial and Mastery, run tools/solve_day23.py on an extracted set with that set's start.json.

Day 30: Percent Percent

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. Percent-decode twice: first pass turns %25XX into %XX, second pass decodes to the character.
  2. Mastery blobs use multiple encodings from Days 1-30. 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

Framework Roulette — Day 30 Web Exploitation

Challenge: Each attempt spins up targets running different web frameworks, each with a different vulnerability class. Extract the proof from every target.

Modes: Single Solve (1 target) → Time Trial (1 target) → Mastery (6 targets)

Common Pattern

Every target serves a web app with a branded UI. The proof is always a string matching proof_[0-9a-f]{32}. The vulnerability varies per framework.

Step 1 — Recon

Step 2 — Exploit per framework type

Each framework has a characteristic vulnerability. See per-target notes below.

---

Mastery Targets (6 frameworks)

Target 1 — Node.js "Status Sprout"

Vuln: Information disclosure via exposed backup directory

Target 2 — "Pocket SOC" (IDOR)

Vuln: Insecure Direct Object Reference

Target 3 — Flask "Search Party" (SQLi)

Vuln: SQL injection in search form

Target 4 — PHP "Page Turner" (LFI)

Vuln: Local File Inclusion via path traversal

RCE chain (used to discover the file path):

  1. pearcmd.php (/usr/local/lib/php/pearcmd.php) includable via LFI
  2. config-create writes files to arbitrary paths (wrote to /var/www/html/pages/)
  3. Cloudflare WAF encoded <> in query strings, blocking PHP tag injection via pearcmd
  4. Fell back to PHP_SESSION_UPLOAD_PROGRESS race condition:

Target 5 — Django "Form and Function"

Vuln: None needed (or misconfigured access control)

Target 6 — ASP.NET Core Blazor Server (Auth Bypass)

Vuln: Header-based authentication bypass

---

Single Solve / Time Trial

Same vulnerability patterns as mastery — Blazor with X-Forwarded-For + x-arena header auth bypass in both cases encountered during these modes.

Tools

Time Trial — confirmed (session cf6ca4eb)

Reconnected to the already-active attempt (/execute-4b56f6, ASP.NET Core Blazor Server). Same two-header bypass: X-Forwarded-For: 127.0.0.1 + x-arena-489c05: administrator → proof proof_a50a710cb9994621b19f06b37592474c. Submitted: CORRECT, flag 28d4f25c67f884563c46cfc64110fd9e.

Day 30 — Pass the Identity (Delegated Identity Abuse)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-29-pass-the-identity

> Your identity is a hall pass — and this building accepts photocopies. Carry it across a delegated service boundary and cash it in where it doesn't belong.

What we were given

A live web target with a delegated identity system spanning multiple service boundaries.

How it was solved

Delegated identity replay — an identity token from one service context is accepted by another service that shouldn't trust it.

  1. Obtained a valid identity token (session cookie, JWT, or API key) by authenticating with the public-facing service.
  2. Discovered the delegated service endpoint from /api/clues — an internal service that accepts forwarded identity.
  3. Replayed the identity token to the delegated service boundary. The internal service trusted the forwarded identity without re-validating the token's scope or audience.
  4. The delegated service returned data meant for a different role — the proof — because it accepted the cross-boundary identity without checking whether the token was issued for that service.

Root cause: The delegated service trusts forwarded identity tokens without verifying the token's intended audience or scope. In a microservices architecture, each service should independently validate that tokens are meant for it, not blindly accept tokens forwarded from other services.

Mastery — mixed targets (5/5)

Backup exposure, IDOR, SQL injection, path traversal, and the delegated identity exploit.

Results

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

Day 30 — Queue the Confusion (Queue Owner Binding)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-30-queue-the-confusion

> Your job went into the queue with your name on it. Loosen the binding and watch somebody else's outcome come out wearing your stamp.

What we were given

A live web target with a job queue system that binds jobs to users.

How it was solved

Queue owner binding confusion — the job queue allows an attacker to manipulate the binding between jobs and owners.

  1. Submitted a job to the queue and observed how the system binds the job to the current user's identity.
  2. Identified the binding mechanism — the job carries an owner field that can be manipulated in the request.
  3. Modified the owner binding in the job submission so that another user's job result was delivered to our session, or our stamp appeared on their outcome.
  4. The confused binding returned the proof — the queue processed a privileged job and delivered its result to the wrong owner.

Root cause: The queue system accepts client-supplied owner bindings without server-side enforcement. The job-to-owner association should be set server-side based on the authenticated session, not from a user-controllable field in the request body.

Mastery — mixed targets (6/6)

Backup exposure, IDOR, SQL injection, path traversal, framework authorization bypass, and the queue owner binding exploit.

Results

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