Challenge
- Event: Huntress CTF 2026 - Day 02
- Category: Malware / Script triage (Windows Script Host JScript + PowerShell)
- Artifact:
host_with_the_most.zip(challenge artifact, not published) (AES-256 encrypted) - Answer model: 2026 AI Arena - dynamic per attempt. The downloadable file is the static method-prep task; answers are submitted to the Game Master (inside the Homebase VM), which returns the completion hash and auto-completes the CourseStack question.
- Actual scored task (confirmed live in-VM): extract ~87 artifact-derived field answers by applying each sample's own declared transformation to its PowerShell Base64 records and JScript data (static analysis only, no execution). The Game Master gives partial credit per field. This superseded the initial "host with the most stages" reading of the title - a reminder to decode everything and submit per the GM's field schema rather than a single guess.
Artifacts
| file | notes |
|---|---|
host_with_the_most.zip (challenge artifact, not published) | AES-256 Deflate, 12 entries. sha256 7743a1af7c51d0950e7620561cf392791a9537e044a8ca11d344b11540ade516 |
extracted/*.js (9) | WSH/JScript "inert static-analysis fixtures" |
extracted/*.ps1 (3) | PowerShell "composite-analysis fixtures" (Resource Dev / Collection / Impact) |
Triage
file/7z l -slt-> AES-256 encrypted zip.unzip(Info-ZIP) cannot do AES; used7z.- Theme "Host With the Most" + malware-sample packaging -> tried the malware-zip convention password
infectedfirst. Hit immediately (7z t -pinfected->Everything is Ok). - 12 fixtures: filenames map to ATT&CK tactics/host behaviors (resource/collection/impact samples; host-context, memory-stage, embedded/remote-write, local-dispatch, staged/relay- handoff, outbound-transfer). Each
.jsis lightly obfuscated; each decodes to a JSON config withsteps, anadapter(COM object or LOLBIN),values.campaign_id, andstageCount.
Investigation
- Crack the archive. AES-256; password
infected:7z x -pinfected host_with_the_most.zip -oextracted. - Deobfuscate without executing the droppers. Each
.jshas a purerecover_*()data transform feeding aninspect_*()thateval()s the resulting JSON.local-dispatch.jsalso defineshuntress_lab_*()which usesActiveXObject("Scripting.FileSystemObject")/WScript.Shell.Run- a real exec sink that was never called. Five distinct obfuscation families were recovered:- single-byte XOR (
embedded-writekey 0x9E,outbound-transferkey 0x2B over:-hex) - XOR with a 5-byte key (
host-context[30,242,44,59,191],staged-handoff[230,133,19,195,108]over base64) - array reverse (
remote-writeover--decimal;memory-stagebase64 -> reverse -> XOR 0x63) - base64 identity (
relay-handoff) %xxURL-encode identity (impact-plan); raw char-codes (local-dispatch)
- single-byte XOR (
- Decoded stage map (all hosts are
*.example.invalidplaceholders):file stageCount adapter campaign_id staged-handoff.js 4 Microsoft.XMLHTTP campaign-b2e9046e6f relay-handoff.js 4 WinHttp.WinHttpRequest.5.1 campaign-169b97ec9a outbound-transfer.js 3 CertReq.exe campaign-30b8616db1 impact-plan.js 3 ADODB.Stream campaign-ee4a70e428 remote-write.js 2 MSXML2.XMLHTTP.6.0 campaign-99e39528bf memory-stage.js 2 MSXML2.XMLHTTP.6.0 campaign-a3a04f5ced embedded-write.js 2 ADODB.Stream campaign-e0aa64e87e local-dispatch.js 2 regsvr32.exe campaign-3f8e0c467a host-context.js 2 Scripting.Dictionary campaign-e8c441b095 resource-sample.ps1 - wallet / HKCU..Run key a=1c94fc0eeae4 collection-sample.ps1 - Login Data/Cookies -> zip a=a593e561fb02 impact-sample.ps1 - .lockedext + RECOVERY notea=bd68883e3dd4 - No baked answer. Scanned all decoded output: no
flag{}and noword-word-word-NNtoken (contrast the sibling warmup "Half a Turn", whose ROT13 output literally contained its GM answer). The real GM task (seen in-VM) is to return the decoded value of every field across all 12 fixtures - the per-fixture configs above plus each.ps1's a..h record - which is why the solver dumps all fields rather than selecting one. Scored on the assigned per-attempt bytes, matching the Day-02 derived+dynamic family.
Flag Recovery
The field answers are computed live in the Homebase VM from the attempt's own artifact:
7z x -pinfected <assigned>.zip -oextractednode scripts/solve_host.js extracted- sandboxesActiveXObject/WScript(throw), calls only each fixture'sinspect_*, base64-decodes each.ps1FromBase64String()literal, and prints every decoded field.- Map each decoded field to the GM
answer_idschema and submit; the GM scores partial credit per field and returns per-field feedback to correct any misses, then re-submit.
Verification (offline, this public copy): the Node solver independently reproduces the hand-decode of all 12 fixtures (a second engine cross-checking the Python decode). Status: method EVIDENCE_VALIDATED; submitted in-VM via Luna. See LUNA_HANDOFF.md and ../Day 02/VM_RunSheet.md.
Flag
Per-mode completion hashes are returned by the Game Master on acceptance (one per mode). Live status (GPT-6 Luna in Homebase VM):
- Single Solve: first 87-field submit flagged 6 bad values via GM per-field feedback; corrected -> CORRECT / SUBMITTED_ACCEPTED (CourseStack 1/3).
- Time Trial: 30s deadline; first run expired on 2 newly-randomized encodings; parser fixed + GM retry -> CORRECT / SUBMITTED_ACCEPTED (CourseStack 2/3).
- Mastery: CORRECT / SUBMITTED_ACCEPTED (CourseStack 3/3) - completed 2026-10-02 as part of the day's 15/15.
All 3 modes accepted (Host With the Most = 3/3, 10 pts). Individual per-mode completion hashes
were not separately captured here, but the modes are CORRECT on CourseStack.
Minimal Reproduction
7z x -pinfected host_with_the_most.zip -oextracted
node scripts/solve_host.js extracted # prints every decoded field across all 12 fixtures
# submit the decoded fields under the GM answer_id schema (partial credit per field); in-VM
Lessons Learned
infectedis the first password to try on any AES/ZIP malware-sample challenge - instant hit.- Deobfuscate, don't detonate: JScript "fixtures" split a pure
recover_*()transform from aninspect_*()/huntress_lab_*()exec sink. Running the config recovery in avmcontext withActiveXObject/WScriptstubbed to throw gives the data with zero risk of the FSO/Shell.Run sink. - Decode everything; don't over-read the title. "Host With the Most" looked like "pick the host with the most stages," but the GM actually scored ~87 decoded fields with partial credit. Dumping every field (not selecting one property) was the correct hedge and matched the real task directly.
- Day-02 Arena answers are derived + dynamic. A static file with no embedded
flag{}/token is a method-prep sample; the real answers are a function of the per-attempt bytes read in-VM - never hard-code (Time Trial re-randomizes encodings, which expired the first timed run until the parser was generalized). - A second engine is cheap verification: decoding by hand (Python) and again via the Node solver cross-checks the method before the timed in-VM run.