2026-10-04
Day 4: Go Fish
Lane: Binary reverse engineering. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
binary-reverse-engineering-day-04-go-runtime-fingerprints - Prompt: "Go binaries are chatty: they ship with build info, function names, and file paths baked right in. Fish them out and map what this one was built to do."
What we were given
- One
evidence.zip(852,723 bytes, SHA-2567c99f149a6aeebecdee3f614cbbc24d9d762c819033a3a3b26a0b31a1fd19fdf). AES encrypted, passwordinfected. - The Day 3 files again:
d01(C ELF),d02(C++ ELF),d03(.NET DLL +runtimeconfig.json). - New today:
d04--variant-000.elf(1,867,924 bytes), a 64-bit Linux program written in Go.
What was asked
- 32 questions in Single Solve and Time Trial. Mastery had two deliveries, so 64.
- Question types:
- Hashes: SHA-256 of each member.
- d01 header facts and structure: ELF class, byte order, type, architecture, section names, symbols, and the
recover_codedisassembly. - d02 and d03: format, machine, CLR version, XOR key, CRC32 and config fields (as on Day 3).
- d04 (new): container format (ELF or PE), CPU architecture, and the config fields
campaign,domain,mutex,url, plus the CRC32.
How it was solved, start to finish
- Ran the driver
run_tm.py. It starts the attempt, downloads the zip, runssolve_tm.pyon it, and submits. - Routine fields:
solve_tm.pyreads everything straight from the bytes:
- Hashes: SHA-256 over each extracted member.
- ELF facts: class, byte order, type, machine and entry from the header; section and symbol names from the tables;
recover_codeviaobjdump. - PE/.NET facts: Machine from the PE header, CLR version from the
BSJBmetadata root.
- d04 (the new part): the question said to scan the Go file for the literal text
HCFGand accept only a record whose bounds, CRC32 and JSON all check out. The record layout is the same as Day 2:
HCFGmagic, 1-byte version, 1-byte XOR key, 2-byte payload length, 4-byte CRC32, then the payload.- XOR the payload with the key, check the CRC32, parse the JSON.
Re-checked on the saved sample:
HCFG offset=1813088 version=1 xor_key=0x51 len=367 crc32=0x2b747600
section of match: .noptrdata
JSON: {"campaign":"BR04-000","domain":"node-000.day04.example.invalid","ipv4":"198.51.100.80","url":"https://node-000.day04.example.invalid/api/BR04-000","mutex":"Global\\HuntressBR04_000", ...}
So the Go program keeps the record in its .noptrdata section. Answers: format ELF64, architecture x86-64, CRC32 0x2b747600, campaign BR04-000.
- Submitted all 32 answers (
answers.json). Result:CORRECT. - Time Trial: a fresh variant, same steps. Result:
CORRECT. - Mastery: two deliveries (64 answers), same steps per delivery. Result:
CORRECT.
Results
| Mode | Result | Flag |
|---|---|---|
| Single Solve | CORRECT | bd078697c2e833f2133fee7165659618 |
| Time Trial | CORRECT | e3d4e5cf19d63a8993d003585ab5f811 |
| Mastery | CORRECT | 91dfb9065a8b11ec2f1127d61cc5c441 |
Each mode folder has the raw start-response.json, answers.json, submit-response.json and final-status-response.json.
Notes on the saved files:
mastery/answers.jsonwas saved empty.mastery/final-status-response.jsonshows all 64 answers accepted.mastery/start-response.jsonis from a later restart that the Game Master refused (rotation_exhausted). The solved attempt is in the final status.
Reproduce
Offline, from this folder (no Game Master needed):
mkdir -p /tmp/d04/deliveries && cp single-solve/evidence.zip /tmp/d04/deliveries/delivery-1.zip
python3 -I ~/.config/huntress/solvers/solve_tm.py single-solve/start-response.json /tmp/d04/deliveries /tmp/d04/answers.json
Checked on 2026-11-01: this gives the same 32 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-04-go-runtime-fingerprints single_solve /tmp/d04
This needs a Game Master token in ~/.config/huntress/gm-token.
Day 4: Picture This
Lane: Metadata forensics. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
metadata-forensics-day-04-picture-this - Prompt: "A dozen photographs have been resized, renamed, and shuffled. Reconstruct their true dimensions and find the image whose presentation does not match its structure."
What we were given
- Single Solve:
(evidence.zipmetadata-day-04-evidence.zip, 1,698 bytes). It holds.camera-001.jpg - Time Trial: one zip with
camera-002.jpg. The Time Trial files were not saved. - Mastery: two deliveries, one per set. Each is a zip with one JPEG inside, and the bundle can be nested (outer zip →
evidence-0N.zip→ JPEG). - New today: JPEG files whose names and file sizes don't tell you the real picture size.
What was asked
- One field type:
jpeg.sof_dimensions_pixelsfor a named JPEG. - Answer format:
WIDTHxHEIGHT, for example257x146. - Single Solve and Time Trial: 1 question. Mastery: 2 questions (
set1.andset2.). - Note: the Time Trial variant pool also contains BOM-Voyage-style evidence-note file-forensics variants. A later retry got an 8-field evidence-note variant instead of a JPEG.
How it was solved, start to finish
The method: ignore the file name and size. Read the pixel size from the JPEG Start-Of-Frame (SOF0/SOF2) marker in the bytes.
- Single Solve. Downloaded the zip, extracted
camera-001.jpgand parsed its SOF marker. Result:257x146. Submitted it asd04-jpeg-001-jpeg-sof-dimensions-pixels.CORRECT. - How the SOF parse works. Walk the JPEG segments from offset 2. Each segment starts with
FF xxand a 2-byte big-endian length. Stop at the first SOF marker. Height is at +5, width at +7, both big-endian:
def jpeg_sof(b):
i = 2
while i < len(b) - 1:
if b[i] != 0xFF: i += 1; continue
m = b[i+1]
if m in (0xC0,0xC1,0xC2,0xC3,0xC5,0xC6,0xC7,0xC9,0xCA,0xCB,0xCD,0xCE,0xCF):
H = struct.unpack('>H', b[i+5:i+7])[0]
W = struct.unpack('>H', b[i+7:i+9])[0]
return '%dx%d' % (W, H)
if m == 0xD8 or 0xD0 <= m <= 0xD7: i += 2
else: i += 2 + struct.unpack('>H', b[i+2:i+4])[0]
- Built a small driver for one-answer challenges:
run_mode.py <challenge> <mode> jpeg_sof <workdir>. It starts the attempt, downloads the artifact, finds the named file and runs the solver. - Time Trial.
run_mode.py metadata-forensics-day-04-picture-this time_trial jpeg_sof ...answeredd04-jpeg-002-jpeg-sof-dimensions-pixelsforcamera-002.jpg.CORRECT. - Mastery. The first driver run crashed. The bundle was nested: outer zip →
evidence-0N.zip→camera-XXX.jpg. It was solved directly with nested extraction:
evidence-01.zip→camera-003.jpg=291x168evidence-02.zip→camera-004.jpg=308x179
CORRECT. (On Day 5 the driver learned to search nested zips by itself.)
- Saved files. The JSON files in
mastery/come from a later re-run to capture the artifacts (attempt08254812-4f46-4f23-918a-345bf37ef15b). That variant asked forcamera-006.jpg=342x201andcamera-007.jpg=359x212. It also returnedCORRECT.
Results
| Mode | Result | Flag |
|---|---|---|
| Single Solve | CORRECT | 7e89be3a036cd174cde99a1bde1178a7 |
| Time Trial | CORRECT | 3c6b625fde6f4a926fe08d3eb3adc665 |
| Mastery | CORRECT | d8d8d88757bc1860b8071bedce14fb36 |
single-solve/has the zip, the JPEG,answers.json,start-response.json,submit-response.jsonandfinal-status-response.json. Its saved submit saysalready_solvedbecause it is a re-run; the final status showsCORRECT.mastery/has the JSON files from the re-run.- The Time Trial flag comes from the original run. No Time Trial files were saved.
Reproduce
python3 -I ~/.config/huntress/solvers/run_mode.py metadata-forensics-day-04-picture-this single_solve jpeg_sof /tmp/d04
This needs a Game Master token in ~/.config/huntress/gm-token. For time_trial and mastery the driver calls op=retry first, which spends one of the unique attempts. It only parses the image bytes.
Day 4: Pending Intent Relay
Lane: Mobile (Android). Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
mobile-android-day-04-pending-intent-relay - Prompt: "Recover and redirect a mutable PendingIntent while preserving every earlier component check."
What we were given
- One Android APK per case. Inside:
AndroidManifest.xml,classes.dex,assets/huntress_puzzle.json, andMETA-INF/signing files. - Single Solve: case
MOB-04-0C53CC9C9F. The APK is saved assingle-solve/intent_relay.apk(12,704 bytes, SHA-256162473efc2528e0f9bfab83733925b73982238e2af89e86b614ed27e91b557e3). Its puzzle is saved assingle-solve/huntress_puzzle.json. - Time Trial: one APK. Mastery: three APKs, one per case. These APKs were not saved in the repo.
What was asked
- One question per case: return the exact backend answer code for that case.
- Answer format:
ANS-plus exactly 16 uppercase hex characters. - Answer IDs:
answerfor Single Solve and Time Trial.set1.answertoset3.answerfor Mastery. - Time limits: Time Trial 50 seconds, Mastery 110 seconds.
How it was solved, start to finish
The app was never installed or run.
- Started the Single Solve and downloaded the APK.
- Read the puzzle asset. New codec today:
xor.
{"schema":"huntress.mobile.puzzle.v1","day":4,"codec":"xor","data":"XFNOMCstXCxeXCVYJSQkKiUpKy8=","key":29}
- Decoded it by hand: Base64-decode
data, then XOR every byte withkey(29).
import json, base64
p = json.load(open('single-solve/huntress_puzzle.json'))
print(bytes(b ^ p['key'] for b in base64.b64decode(p['data'])).decode())
Output: ANS-60A1CA8E89978462.
- Submitted it under
answer. The Game Master repliedCORRECT. - Built a reusable driver,
run_mode.py. Its header says it was made for one-answer-per-set lanes, including "pending-intent-relay". For the mobile lane it callsmobile_puzzle():
- Starts the attempt and downloads each assigned APK.
- Unzips the APK and reads
assets/huntress_puzzle.json. - Picks the decoder from the
codecfield (here: Base64, then XOR withkey). - Submits every answer in one request and saves the JSON responses.
- Time Trial and Mastery: ran the driver on both. Both came back
CORRECT.
Results
| Mode | Result | Flag |
|---|---|---|
| Single Solve | CORRECT | bc6f49c30d6db023e69a88f2a1a8e16c |
| Time Trial | CORRECT | 5cf5baf62b4f5a6b3df3b2ecba3e8905 |
| Mastery | CORRECT | 4c46c51c45e1f39a179ca20a52e1d95e |
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-04-pending-intent-relay single_solve mobile_puzzle /tmp/d04
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 4: Dim and Dimmer
Lane: Script analysis. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
script-analysis-day-04-shell-contrast - Prompt: "These VBScript specimens hide their material behind character codes, reversible transforms, and winding control flow. Unwind every representation on paper, classify each behavior, and find out which stage passes the baton to which."
What we were given
- One
evidence.zip(29,767 bytes, SHA-2560d0dd7a9a5aeb504eb6c88dc3bb83e8864c4152ed5f3cf3ffd87e80f46bb2591). Password:infected. - 30 files: the Day 3 set (3 PowerShell, 9 JScript, 9 Batch) plus 9 new VBScript files with the same role names (
host-context.vbs,memory-stage.vbs, ...). - Each VBScript file has two string constants:
Material_<hex>: the hidden config, written as numbers, hex or Base64.Codec_<hex>: how it was hidden, asrepresentation|transform|key. Real examples from this archive:
decimal_pipe|subtract_modulo_256|0a
hex_compact|repeating_key_xor|c9,70,63,0e,67
hex_colon|single_byte_xor|27
reversed_decimal|reverse_bytes|
What was asked
- 231 questions: 15 PowerShell, 72 JScript, 72 Batch, and 72 VBScript (8 per file).
- VBScript questions per file:
- Role and ATT&CK ID from the decoded behavior graph.
- Adapter, campaign ID, and one role-specific indicator (URL, path, upload URL, extension or next stage).
- Representation: the material format (for example
hex_compact). - Transform: one of
identity,single_byte_xor,repeating_key_xor,add_modulo_256,subtract_modulo_256,reverse_bytes,rolling_xor,reverse_then_xor. - Control: the wrapper around the decode call:
direct,for_once,do_once,while_once,select_caseorerror_guard.
How it was solved, start to finish
- Started the untimed Single Solve and downloaded the archive.
- Reused the Day 3 solver for PowerShell, JScript and Batch (
solve_expansion.py). - Wrote a VBScript decoder (
vbsdec.py): - Read
Material_andCodec_with a regex. - Turn the material into bytes using the representation (hex, decimal or Base64; reversed if the name says so).
- Try every transform on the bytes, forwards and reversed: plus/minus key, XOR key, repeating-key XOR, rolling XOR.
- Keep the result that reads as text starting with
v=1|steps=. That prefix is the "oracle" that says the decode worked.
rep, transform, key = codec.split('|') # "hex_compact|repeating_key_xor|c9,70,63,0e,67"
data = bytes_from_material(material, rep) # hex / decimal / base64 -> list of ints
for cand in candidates(data, keys): # every transform, forward and reversed
try:
text = bytes(x % 256 for x in cand).decode('utf-8')
except UnicodeDecodeError:
continue
if text.startswith('v=1|steps='):
break
Example: memory-stage.vbs is hex_compact + repeating_key_xor and decodes to:
v=1|steps=acquire_remote,dispatch_memory|adapter=MSXML2.XMLHTTP.6.0|stage_count=2|campaign_id=campaign-ab11f625dc|url=https://ab11f625dc.example.invalid/69b70dc3.dat|user_agent=HuntressLab/ab11f625dc
- Representation and transform were copied straight from the
Codec_string. - Control was read from the source text, in this order:
On Error→error_guard,Select Case→select_case,Do…Loop→do_once,While…Wend→while_once,For x = n To 0→for_once, elsedirect. - Role and ATT&CK used the Day 3 rules. VBScript's Command and Scripting Interpreter ID is
T1059.005. - Checked the answers with the partial-submit oracle (see Day 3). Single Solve is untimed, so each group of answers was sent on its own. All 231 were accepted on the first pass, and the last group turned the attempt
CORRECT. Real answers fromsingle-solve/answers.json:
{"vbscript-stager-role": "stager", "vbscript-stager-attack": "T1105",
"vbscript-stager-adapter": "MSXML2.XMLHTTP.6.0", "vbscript-stager-campaign": "campaign-ab11f625dc",
"vbscript-stager-representation": "hex_compact", "vbscript-stager-transform": "repeating_key_xor",
"vbscript-stager-control": "direct"}
- Wrote the mode driver
run_expansion.py. It does start → download → extract → solve → submit → status for any mode, and it splits Mastery into sets. - Time Trial (50-second deadline): the new variant used representations not seen in Single Solve (Base64-style and hex with dashes) and the
reverse_then_xortransform. The material parser was made format-agnostic and the transform search was made exhaustive. Single Solve still scored 231/231, and the Time Trial then passed. - Mastery (80-second deadline): 462 questions in two sets, with one
evidence.zipper set.run_expansion.pysolved each set and merged the answers underset1./set2.. It ran right after the Time Trial, and both came backCORRECT.
Results
| Mode | Result | Flag |
|---|---|---|
| Single Solve | CORRECT | 97a82c207f1f4f0dbe5bc146f613a43e |
| Time Trial | CORRECT | bb1896cf6329ac0dadc911791fa2dd82 |
| Mastery | CORRECT | bdcc819b872e06373d6c9503755b7634 |
Each mode folder has answers.json and the Game Master JSON (start-, submit-, final-status-response.json). The Single Solve folder also keeps evidence.zip. No screenshots were taken.
Reproduce
Offline, from the repo root:
mkdir -p /tmp/d04/ex
7z x -pinfected -o/tmp/d04/ex repos/day-04-script-analysis-dim-and-dimmer/single-solve/evidence.zip
python3 -I tools/solve_expansion.py /tmp/d04/ex \
repos/day-04-script-analysis-dim-and-dimmer/single-solve/start-response.json /tmp/d04/answers.json
This rebuilds all 231 saved answers (re-checked on 2026-11-01) and only reads the files as text.
Live, as run on the day (needs a Game Master token in ~/.config/huntress/gm-token):
python3 -I ~/.config/huntress/solvers/run_expansion.py script-analysis-day-04-shell-contrast time_trial /tmp/d04tt
Note: the ~/.config/huntress/solvers/ copy decodes JScript with jsdec.js, which runs each fixture in a Node vm sandbox. The tools/ copy uses the pure-Python jsdec_py_emu.py instead.
Day 4: Two of a Kind
Lane: Warmups. Modes: Single Solve, Time Trial, Mastery. Result: all CORRECT.
The challenge
- ID:
warmups-day-04 - Prompt: "One kind of encoding per line, two kinds per blob. Match and decode."
- New encoding: multi-line mixed encodings
What we were given
- One blob file per mode (Single Solve and Time Trial), or a zip of multiple blobs (Mastery).
- Each blob has numbered lines (
NN<TAB>fragment). Each line is independently encoded. - The decoded text ends with a slug like
word-word-word-NNto submit.
How it was solved
- Decode the blob. From Day 4 onward, blobs have numbered lines (
NN<TAB>fragment). Each line uses a different encoding. Decode each line separately and concatenate the results. - Mastery blobs use multiple encodings from Days 1-4. The solver (
warmup_decode.py) tries every known decoder on each line and picks the one producing printable text. - Concatenate all decoded lines. The text contains a message ending in the answer slug.
- Submit the slug to the Game Master.
Results
- Single Solve:
CORRECT. slug:witty-starfish-turtle-96. Flag:fc944991299fa5510169dddeb3dcdd6c. - Time Trial:
CORRECT. slug:merry-basket-grove-41. Flag:e2f831b36653555262fd5cc070c33750. - Mastery:
CORRECT. 18 slugs. Flag:e001ccc1b2d08cf130bb2f025c69e566.