2026-10-19

Day 19: Jack in the Box

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–d18 were answered as on Day 18.
  3. Unpacked the overlay statically (the new part). The question gave the layout of the PK19 header:

Each byte unpacks as ror8(byte XOR k2, 3) XOR k1. The result starts with a normal HCFG record.

o = data.rfind(b'PK19')
k1, k2 = data[o+5], data[o+6]; plen = struct.unpack_from('<I', data, o+8)[0]
unp = bytes((((x ^ k2) >> 3 | ((x ^ k2) << 5) & 0xff) & 0xff) ^ k1 for x in data[o+44:o+44+plen])
assert hashlib.sha256(unp).digest() == data[o+12:o+44]

This was added to solve_tm.py as its "step 4": if no literal or Base64 record is found, look for a PK19 (or RS20) overlay and unpack it.

  1. Overlay fields: the solver takes the magic named in the question (PK19), finds it in the file, and reports its offset and length − offset.

Re-checked on the saved sample:

d19 length 11232, PK19 at 10808, k1=0x21 k2=0xa4, packed length 380, overlay size 424
unpacked SHA-256 matches; unpacked bytes start with HCFG
HCFG version=1 xor_key=0x91 len=368 crc32=0xd02e2211
JSON: {"campaign":"BR19-000","domain":"node-000.day19.example.invalid","ipv4":"198.51.100.110","url":"https://node-000.day19.example.invalid/api/BR19-000","mutex":"Global\\HuntressBR19_000", ...}

Answers: d19_analysis_overlay_offset = 10808, d19_analysis_overlay_size = 424, version 1, CRC32 0xd02e2211, campaign BR19-000.

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

Results

ModeResultFlag
Single SolveCORRECT14e394446b80b4b772be6ef27d868548
Time TrialCORRECT389ce59443a9a6e8c73de6acf6f602aa
MasteryCORRECTe9f8d5ff1ddacaf2ba88afb13692bc85

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/d19/deliveries && cp single-solve/evidence.zip /tmp/d19/deliveries/delivery-1.zip
python3 -I ~/.config/huntress/solvers/solve_tm.py single-solve/start-response.json /tmp/d19/deliveries /tmp/d19/answers.json

Checked on 2026-11-01: this gives the same 228 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-19-static-unpacking single_solve /tmp/d19

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

Day 19: Little Endian on the Prairie

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: e_machine is a 2-byte field at offset 0x12 of the ELF header. Its byte order follows the file's own byte-order flag, EI_DATA (byte 5: 1 = little-endian, 2 = big-endian).

  1. Added a handler to run_meta.py:
if fb[:4] == b'\x7fELF':
    end = '<' if fb[5] == 1 else '>'
    return '0x%04x' % struct.unpack_from(end + 'H', fb, 0x12)[0]
  1. Single Solve. collector-001.elf → 0x003e (x86-64). CORRECT.
  2. Time Trial and Mastery. A helper agent ran run_meta.py for all three modes. It answered all 24 and all 120. e_machine was 0x003e in every set. Example synthesis answer (Time Trial): ["evidence-note.txt","collector-001.elf","shortcut-001.lnk","document-001.pdf"]. Both CORRECT.

Results

ModeResultFlag
Single SolveCORRECT4ebef4b003c567143a4d39ae9a08b56e
Time TrialCORRECTbb404ebcb85f74536a90ebce9d4d6829
MasteryCORRECT3e05c3841f13420368de91e44045fb6f

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-19-little-endian-on-the-prairie single_solve /tmp/d19

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 ELF header bytes. It never runs the program.

Day 19: Reflection Maze

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.

  1. Started the Single Solve and downloaded the APK.
  2. Read the puzzle asset. New codec today: reflection. The answer is inline in data:
{"schema":"huntress.mobile.puzzle.v1","day":19,"codec":"reflection","data":"ANS-DFCDF6E9F6ABE632"}

So the reflective call graph in the DEX did not have to be traced for this answer.

  1. Taught the driver. reflection joined the codecs whose data is returned as is:
if codec in ('native','plain','identity','reflection'): return pj['data']
  1. Ran the lane driver for all three modes:
python3 -I ~/.config/huntress/solvers/run_mode.py mobile-android-day-19-reflection-maze <mode> mobile_puzzle <workdir>
  1. Results: Single Solve (ANS-DFCDF6E9F6ABE632), Time Trial (ANS-8FEAB1027C5513E4) and all five Mastery answers came back CORRECT.

Results

ModeResultFlag
Single SolveCORRECT11767c15c08b87610cf9d1a0739f0653
Time TrialCORRECT6dd89e7bd033d478969f298b8e55b31a
MasteryCORRECT9f1a4c576e0d25d8d02e25ed37fba80d

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:

unzip -p single-solve/reflection_maze.apk assets/huntress_puzzle.json

A fresh run with the driver:

python3 -I ~/.config/huntress/solvers/run_mode.py mobile-android-day-19-reflection-maze single_solve mobile_puzzle /tmp/d19

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

Day 19: Sharp Practice

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. The Single Solve crashed on the new C# files. In the .csx host the marker sits inside a C# string, and that string also holds literal \n escapes. The marker regex took everything up to whitespace, a quote or < ([^\s"'<]+). So it also swallowed the \n#nullable ... text after the hex. Real text from the same host file (its Day 29 copy is kept in this repo):
private static readonly string EmbeddedCsx_ea4ea660 = "// HUNTRESS_ANALYSIS_V1:HEX-763d337c6c61...\n#nullable enable\nusing System.Collect...
  1. Fixed the regex in hostpgdec.py to stop at a backslash too:
m = re.search(r'HUNTRESS_ANALYSIS_V1:([A-Z0-9]+)-([^\s"\'<\\]+)', text)
  1. Submitted. The Single Solve was CORRECT. Then the five file lanes (warmup, metadata, mobile, binary, script) ran as parallel agents for the timed modes.
  1. Real answers from single-solve/answers.json:
{
 "host-aspx-inline-csharp-csharp-script-role": "staged_chain",
 "host-aspx-inline-csharp-csharp-script-attack": "T1059",
 "host-aspx-inline-csharp-csharp-script-adapter": "operation_graph",
 "host-aspx-inline-csharp-csharp-script-campaign": "CSHARP_SCRIPT-7f5c5dc7",
 "host-aspx-inline-csharp-csharp-script-url": "https://csharp_script-7f5c5dc76d.example.invalid/stage",
 "polyglot-csharp_script-downloader-role": "downloader",
 "polyglot-csharp_script-downloader-attack": "T1105",
 "polyglot-csharp_script-downloader-adapter": "http_client",
 "polyglot-csharp_script-downloader-campaign": "CSHARP_SCRIPT-228aa02e",
 "polyglot-csharp_script-downloader-url": "https://csharp_script-228aa02e3d.example.invalid/stage"
}
  1. Time Trial and Mastery used the same solver on fresh variants.

Results

ModeResultFlag
Single SolveCORRECT3b1563fd32d9df75ba85f94b87978775
Time TrialCORRECTbb8aeae2c901862e78806bdf77cef0a9
MasteryCORRECT06aba652c8d2073f3224bfb02a39887a

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/d19/ex
7z x -pinfected -o/tmp/d19/ex evidence.zip
python3 -I tools/solve_expansion.py /tmp/d19/ex start-response.json /tmp/d19/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 19: Little Things

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 little-endian bytes. Hex-decode, then interpret as UTF-16LE.
  2. Mastery blobs use multiple encodings from Days 1-19. 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 19 — Back Up a Minute (Backup Exposure)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-01-backup-exposure

> The deploy left its diary behind. Somewhere out in the open, an old backup is still telling secrets.

What we were given

A live web target assigned at attempt start. No downloadable artifact.

How it was solved

The challenge tests for sensitive file exposure via leftover deployment artifacts.

  1. Fetched /robots.txt on the target. It had a Disallow entry for /snapshots-e181b/ — a directory the site wanted hidden from crawlers but left world-readable.
  2. Browsed that directory. The server had directory listing enabled, revealing environment-copy-edb7fe.json.bak.
  3. Downloaded the .bak file. It was a JSON environment dump with a support_note field containing the proof: proof_604b955708e749e98bd33821bb9ddfa8.
  4. Submitted the proof string.

Root cause: Deployment tooling left a backup file in a web-accessible directory. robots.txt advertised the path (hiding it from honest crawlers, not attackers), and directory listing exposed the filename.

Automated with web_solve.py (ex_backup): robots.txt scrape → directory listing → backup file download → proof regex extraction.

Results

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

Day 19 — Permission to Slip (IDOR)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-02-idor

> Pity the object API never got the memo — slip into somebody else's row.

What we were given

A live web app called "Pocket SOC" — a case management system with API endpoints.

How it was solved

This is an Insecure Direct Object Reference (IDOR) challenge — the API lets you access records belonging to other users by guessing/discovering their IDs.

  1. Visited / to get a case_session cookie (required for authenticated API calls).
  2. Queried /api/history — the activity feed. It listed events across the workspace, including a reference to case 17089 owned by the executive role with visibility reference_only. That case ID shouldn't have been accessible to our session.
  3. Requested /api/briefs/17089 with our session cookie. The endpoint performed no authorization check — it returned the full case record despite us not being the owner.
  4. The response body contained the proof string: proof_967727bd8687465cb10dbd64379def37.

Root cause: The /api/briefs/<id> endpoint serves any case by ID without checking whether the requesting session owns it. The activity feed leaks foreign case IDs, giving an attacker both the reference and the means to read it.

Automated with web_solve.py (ex_idor): session init → activity feed scrape → foreign ID discovery → direct object access.

Results

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

Day 19 — Query Me This (SQL Injection)

Lane: Web Exploitation · Challenge ID: web-exploitation-day-03-sqli

> The search box trusts you a little too much. Read the row it was never supposed to show you.

What we were given

A live web target with a search form.

How it was solved

Classic SQL injection through an unsanitized search parameter.

  1. The app had a search form submitting to GET /lookup?q=. Entering ' OR '1'='1 returned all visible rows — confirming the input goes straight into a SQL query without parameterization.
  2. The query wraps user input in parentheses and applies a visibility filter (something like WHERE (user_input) AND visibility='public'). A simple OR 1=1 only returned public rows.
  3. Injected ') OR 1=1-- to close the parenthesized group and comment out the visibility filter. This returned a 4th, hidden row that the normal query suppresses.
  4. The hidden row's note field contained the proof: proof_287e1e5a901e4844b634684d2583fe25.

Root cause: The search query concatenates user input directly into SQL. The parenthesized query structure and visibility filter create a false sense of access control, but the injection point lets an attacker break out of both.

Automated with web_solve.py (ex_sqli): form discovery → parameter fuzzing with a set of injection variants (closing parens, comments, boolean tautologies) → proof regex match.

Results

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