2026-10-27

Day 27: Compiler Says What

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 accepted: 318 of 324 correct, 6 missing. The watcher flagged the lane: NEEDS MANUAL SOLVER (new wrinkle).
  2. Found the gap. The six missing fields were exactly the new selectors: d27_analysis_gcc_format, gcc_machine, tcc_format, tcc_machine, gcc_config_campaign and gcc_config_domain. solve_tm.py did not know gcc or tcc as file selectors.
  3. Patched solve_tm.py (the copy in ~/.config/huntress/solvers/): gcc|tcc were added to the selector list, next to stripped|symbolized|compact|direct|loader|plugin|corrected|vulnerable. Now d27_analysis_gcc_machine uses the member whose name contains gcc, and so on. The existing handlers do the rest:
  1. Config check. In both builds the record is the last 379 bytes of the file, so a scan from the end finds it first. Re-checked on the Day 29 copies:
gcc.elf  length 108155  HCFG offset=107776 version=1 xor_key=0xc1 len=367 crc32=0x577e10d4  (after all sections)
tcc.elf  length 462379  HCFG offset=462000 version=1 xor_key=0xc1 len=367 crc32=0x577e10d4  (after all sections)
JSON (both): {"campaign":"BR27-000","domain":"node-000.day27.example.invalid","ipv4":"198.51.100.30","url":"https://node-000.day27.example.invalid/api/BR27-000","mutex":"Global\\HuntressBR27_000", ...}

The two configs are equal, as the question requires.

  1. Single Solve: the six missing answers were filled in (see answers.json: both formats elf, both machines 62, GCC campaign BR27-000). The attempt was then solved.
  2. Time Trial and Mastery: a second watcher run with the patched solver solved both on the first try. Its log: single=already_solved(None) TT=CORRECT mastery=CORRECT.

Results

ModeResultFlag
Single SolveCORRECTa4207a63fac38ce746896f17dde8a3c7
Time TrialCORRECT28c97e744f41bd43868e6f778bf1a814
MasteryCORRECT574bb5439b35b217de3cd7512742b72d

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

Notes on the saved files:

Reproduce

The Day 27 bundles were not saved. The two builds can be checked from the Day 29 folder (from this folder):

X=../day-29-binary-reverse-engineering-fraternal-twins/single-solve/extracted
sha256sum $X/d27--*      # same hashes as d27_artifact_sha256_1 and _2
python3 -I ~/.config/huntress/solvers/hcfg.py $X/d27--sample-gcc.elf
python3 -I ~/.config/huntress/solvers/hcfg.py $X/d27--sample-tcc.elf

Live driver:

python3 -I ~/.config/huntress/solvers/run_tm.py binary-reverse-engineering-day-27-compiler-attribution single_solve /tmp/d27

This needs a Game Master token in ~/.config/huntress/gm-token. Nothing here runs the samples.

Day 27: Packet Loss Prevention

Lane: Metadata forensics. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT (3/3).

The challenge

What we were given

What was asked

How it was solved, start to finish

The step-by-step log for this lane is not among the saved logs. It was solved and committed early that day (commit be8afde, 07:09 local time). The steps below are the techniques recorded for this day, with the parser code that was later merged into run_meta.py (Day 28).

  1. Packet count. A classic pcap file has a 24-byte global header. Then each packet has a 16-byte record header followed by its data. The captured length (incl_len) is at +8 in the record header. Walk the records and count them:
magic = fb[:4]
end = '<' if magic in (b'\xd4\xc3\xb2\xa1', b'\x4d\x3c\xb2\xa1') else '>'
off = 24; cnt = 0
while off + 16 <= len(fb):
    incl = struct.unpack_from(end + 'I', fb, off + 8)[0]
    off += 16 + incl; cnt += 1

The merged handler also counts packet blocks (types 6, 3 and 2) in pcapng files.

  1. The other new-ish fields were computed next to run_meta.py, which did not have them yet:
  1. All other fields came from run_meta.py.
  2. Single Solve. capture-001.pcap had 3 packets. Submitted 3. CORRECT.
  3. Time Trial. 32 fields. Examples from answers.json: packets 7, EVTX records 46, registry root XipmRgJ7zXCG2zxZKlaKworah, Prefetch name NOTIFIER.EXE. CORRECT.
  4. Mastery. 352 fields across 11 sets. Packet counts per set: 6, 7, 18, 11, 18, 37, 23, 20, 11, 10, 30. CORRECT.

Results

ModeResultFlag
Single SolveCORRECT3849c7ab2d1db424ef200e138e5f2b9a
Time TrialCORRECT0be43c643029d868a77b218656476379
MasteryCORRECTbb6c7751ab492f43dc89007707932744

Each mode folder has answers.json, start-response.json and a short submit-response.json with the result and flag. No screenshots were captured.

Reproduce

python3 -I ~/.config/huntress/solvers/run_meta.py metadata-forensics-day-27-packet-loss-prevention single_solve /tmp/d27

This needs a Game Master token in ~/.config/huntress/gm-token. The current driver has the pcap, EVTX, registry and Prefetch handlers. For time_trial and mastery it calls op=retry first, which spends one of the unique attempts. It only parses the capture; nothing is replayed.

Day 27: Dependency Surface

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

No app was installed or run. The working notes for this day were thin, so some steps are marked as not recorded.

  1. Single Solve and Time Trial at the drop. The watcher saw Day 27 at 07:00:06 local time and ran the mobile lane driver:
python3 -I ~/.config/huntress/solvers/run_mode.py mobile-android-day-27-dependency-surface <mode> mobile_puzzle <workdir>

Its log line, 16 seconds later:

[OK] mobile-android single=CORRECT(fbc104ca150259ca0364471a842d0267) TT=CORRECT mastery=no-output

So the existing driver covered both modes. The Mastery run gave no output.

  1. Mastery. At 07:01:15 the watcher launched a headless day agent. The Mastery attempt (68022dd3-0806-4ba1-8e1b-31733394c702) was started at 13:05:31 UTC (07:05 local) and graded CORRECT at 13:07:20 UTC. The files in mastery/ were committed at 07:07 local time ("Day 27: mobile android Dependency Surface mastery 3/3"). That agent's log file was later overwritten by a second agent run at 07:30, so how it handled the eleven sets, including the split bundle, is not recorded.
  2. Watcher re-run. The watcher was restarted and fired again at 07:28 local time. For mobile it logged single=already_solved(None) TT=CORRECT mastery=CORRECT.

Results

ModeResultFlag
Single SolveCORRECTfbc104ca150259ca0364471a842d0267
Time TrialCORRECT854599061c9ecb45900b5782052b1a8e
MasteryCORRECTa6e7916177bfaa9ee059089352d7c3bd

Reproduce

python3 -I ~/.config/huntress/solvers/run_mode.py mobile-android-day-27-dependency-surface single_solve mobile_puzzle /tmp/d27

This needs a Game Master token in ~/.config/huntress/gm-token, plus Java (for baksmali.jar) and binutils for analysis APKs. It never installs or runs the app on a device. It does not open .apks bundles (see Day 26).

Day 27: FROM Whence It Came

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 each mode and downloaded its archive (Single Solve at 13:00:07 UTC; Time Trial and Mastery at 13:07 UTC).
  2. Used solve_day26.py, the Day 26 solver, for every mode. It covers all the question families in this layout:
  1. The Dockerfile files needed no new code. They carry the same marker. Real answers from single-solve/answers.json:
{"polyglot-dockerfile-downloader-role": "downloader", "polyglot-dockerfile-downloader-attack": "T1105",
 "polyglot-dockerfile-downloader-adapter": "http_client",
 "polyglot-dockerfile-downloader-campaign": "DOCKERFILE-b78f0a1d",
 "polyglot-dockerfile-downloader-obfuscation": "plain_hex",
 "polyglot-dockerfile-downloader-stage-profile": "single_descriptor",
 "polyglot-dockerfile-downloader-next-language": "jscript"}
  1. Mastery has 11 sets in the same layout. Its answers were not kept, and the record does not say how the sets were split up.
  2. All three modes were CORRECT. The session's day summary lists script-analysis as done in all three modes.

Results

ModeQuestionsResultFlag
Single Solve1,659CORRECT395916a7e7339c9ebe6429933f80a5d5
Time Trial1,659CORRECT07024d4a478fd030e6a0fcee5e12c961
Mastery18,249 (11 sets × 1,659)CORRECT7bea9bc396f521e486458605611a582b

The flags are not in this folder. They come from the local progress record ~/.config/huntress/progress.json (days.27.script-analysis), which stores the Game Master result and flag per mode. No screenshots were taken.

Reproduce

The archives were not kept, so the saved answers cannot be rebuilt offline. On a fresh attempt, extract the archive and run:

python3 -I tools/solve_day26.py /tmp/d27/ex start-response.json /tmp/d27/answers.json

Then submit with a Game Master token. For Mastery, run it once per extracted set, using that set's questions with the setN. prefix removed, then put the prefixes back. solve_day26.py tries node jsdec.js first (the jsdec.js next to it) and falls back to jsdec_py_emu.py. The tools/jsdec.js copy decodes statically. The ~/.config/huntress/solvers/ copy runs the fixture in a Node vm sandbox.

Day 27: Monkey Business

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. Ook! esoteric language. Pairs of Ook./Ook!/Ook? tokens map to Brainfuck commands. Translate and interpret.
  2. Mastery blobs use multiple encodings from Days 1-27. 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 27 — Double Spent (Race Condition)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-21-double-spent

> One credit, two purchases. The ledger can't count what it can't see coming — race it and spend the same credit twice.

What we were given

A live Rails web target with a credit system — the account starts with exactly one credit.

How it was solved

Race condition / TOCTOU — the credit redemption endpoint doesn't use atomic transactions, so two simultaneous requests can both succeed before the balance is decremented.

  1. Queried /api/clues — got the feature route (e.g. /execute-bdb3f6), the audit route (e.g. /audit-ad790f), and role analyst.
  2. Checked the audit endpoint: credits: 1. The account has a single spendable credit.
  3. Sent two simultaneous empty JSON POSTs to the feature route. Both arrived before the server could decrement the balance from the first request.
  4. Both requests returned 200 with effect: credit_redeemed. The reported balances were 0 and -1 — the second request succeeded despite the credit already being spent.
  5. The audit endpoint now returned effect: single_credit_spent_twice and the proof.

Gotcha: depleted targets

The first assigned target was already depleted (credits at 0) before we touched it — a previous test had spent the credit. The Game Master supports op: reset to tear down and prepare a fresh target on the same attempt. After resetting, the race worked on the first try.

Root cause: The credit check and decrement aren't atomic. Between "check balance >= 1" and "balance -= 1", a second request can pass the same check. This is a classic TOCTOU (Time-of-Check-Time-of-Use) race condition.

Mastery — mixed targets (4/4)

TargetVulnerability
1Backup exposure — robots.txt → directory listing → .json.bak
2IDOR — /api/history leaks reference-only case → direct access
3SQL injection — search injectable with ') OR 1=1--
4Race condition — two simultaneous POSTs spend one credit twice

Results

ModeResultFlag
Single SolveCORRECTbadec8d731b9a1d58cbd1aa2014e8225
Time TrialCORRECT53e35b6d5644ddba75d717902c51533c
Mastery (4/4)CORRECT35da7f17ae29b5ab05117fe2e767452d

Day 27 — Socket to Me (WebSocket Event Stream)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-22-socket-to-me

> The chat upgraded to websockets and left its manners at the HTTP door. Ride the upgrade into an event stream that was never meant for you.

What we were given

A live web target with a WebSocket-based event streaming endpoint.

How it was solved

WebSocket authorization bypass — the event stream endpoint grants access to restricted data through the WebSocket upgrade without proper authentication.

  1. Queried /api/clues — got the feature route (e.g. /inspect-f8a2c6) and a stream reference ID (e.g. 14862).
  2. The correct query parameter matters: reference=14862 and stream_reference=14862 both returned 403. The correct parameter was stream=14862.
  3. Initiated a WebSocket handshake: GET /inspect-f8a2c6?stream=14862 with Upgrade: websocket headers. The server responded with 101 Switching Protocols.
  4. The WebSocket event frame delivered the proof — the server streamed restricted event data to any client that completed the upgrade with the right parameter name.

Root cause: The WebSocket endpoint accepts connections without verifying authorization. Once the protocol upgrade succeeds, the event stream delivers sensitive data. The only "protection" is obscurity — the parameter name isn't documented, but /api/clues provides the route and reference ID.

Mastery — mixed targets (5/5)

TargetVulnerability
1Backup exposure — robots.txt → directory listing → .json.bak
2IDOR — session cookie + activity feed → restricted case access
3SQL injection — search injectable with ') OR 1=1--
4LFI — /notes.php?doc=../../../../run/huntress/objective.txt
5WebSocket event stream — upgrade with ?stream={ref}

Results

ModeResultFlag
Single SolveCORRECTb11248f07613464c4b746288e3775ffb
Time TrialCORRECT6df38f6118062420f3e3fc4538adf396
Mastery (5/5)CORRECTbfd91098a26fad49c2d2dc0ece3ebfe3

Day 27 — Forwarded Misgivings (Proxy Header Trust)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-23-forwarded-misgivings

> The app trusts the proxy to say who's calling. Tell it you're calling from inside the house.

What we were given

A live Micronaut web target ("Forward Desk") deployed behind a reverse proxy.

How it was solved

X-Forwarded-For header spoofing — the application trusts the proxy-supplied client IP without validation.

  1. Queried /api/clues — got the feature route (e.g. /inspect-2d6a00) and deployment: trusted_reverse_proxy.
  2. Requested the feature route normally. Got 403 with error: loopback_only and the evaluated client IP (e.g. 10.1.0.0) — the endpoint only serves requests from localhost.
  3. Added X-Forwarded-For: 127.0.0.1 to the request headers. The app trusts this header as the real client IP.
  4. The endpoint accepted the spoofed loopback address and returned effect: proxy_trust_admin_bypass with the proof.

Root cause: The application reads client IP from X-Forwarded-For without verifying that the header was set by a trusted proxy. Any client can spoof this header. The endpoint restricts access to loopback addresses but checks the spoofable header instead of the actual connection IP.

Mastery — mixed targets (5/5)

TargetAppVulnerability
1Status SproutBackup exposure — robots.txt → directory → .json.bak
2Incident PicnicIDOR — activity feed leaks case ID → direct access
3Signal ShelfSQL injection — /lookup?q=') OR 1=1--
4Stay in Your DirectoryLFI — /handbook.php?doc=../../../../../run/huntress/objective.txt
5Forward DeskX-Forwarded-For spoofing to bypass loopback-only check

Results

ModeResultFlag
Single SolveCORRECT625ae93221791e469403e9a04c47fb9f
Time TrialCORRECTd9aeef39919a8455a964f9b029be0a3b
Mastery (5/5)CORRECTdf1a97d44a0c76de8043fd8a6adb7fb8