next, next, finish: an nsis script with something extra
huntress ctf 2026, day 22 · script analysis · all three modes
tools used: script analysis and timed-attempt pipeline.
"an nsis installer script clicks through its own setup wizard while carrying a little something extra. separate the real setup actions from the modeled payload behavior, and recover every cross-language handoff from the final bytes." the day's new carrier was the nullsoft installer's .nsi script, beside every earlier day's samples.
the key insight: a new carrier language is a new comment and string syntax around the same analysis header, not a new problem. the descriptors the questions ask for sit in that header in every carrier.
challenge shape
single 1417 fields every earlier sample's descriptors plus the
day's polyglot-nsis-<role>-<field> family
time trial 1417 fields the same over a fresh bundle
mastery 8502 fields six bundles
44 fields were new: four nsis specimens (benign utility, downloader, launcher, staged chain) at eleven fields each.
artifact anatomy
the bundle holds every earlier specimen and four nsis scripts, one per role. nsis takes ; and # line comments and /* */ blocks; these scripts are seven lines and run nothing:
; HUNTRESS_ANALYSIS_V1:<CODEC>-<payload>
Unicode True
Name "Huntress Analysis <hex>"
OutFile "huntress-<hex>.exe"
Section
StrCpy $0 "<the same payload>"
SectionEnd
each script used a different codec (B64, HEX, HB64, FRAG). the "handoff" is the descriptor's next_language and stage_profile, not a command in the script. the fields ask the role, the attack technique, the adapter, the campaign, one indicator (a file path for the benign utility, a url for the rest), the stage count, the steps, the host profile, the obfuscation, the stage profile and the next language.
extraction method
the script analysis reader finds the HUNTRESS_ANALYSIS_V1:<CODEC>-<payload> header by its marker whatever comment character precedes it, decodes the payload with the codec it names, and answers each descriptor key by name, the next language included. the reader needed no change for the new carrier.
validation and answer formatting
labelled fields with an enum in the question are answered from that list only; free-text fields (urls, paths) are answered as stored.
failed approaches and pivots
none on day 22.
automation across modes
the same reader answers all 1417 fields of every bundle.
lessons
- read a new carrier's comment and string grammar first: most of what it hides is inside them.
solve times
public scoreboard · day 22 finish: below top 10
- 0:04.9single#3 of 163 solvers
- 0:07.4time trialfirst blood, +0.58 s
- 0:12.2mastery#3 of 158 solvers
- #26team day finishof 145 teams that cleared it, in 10:39.5
- #4single orderof the day's 7, by our flag time
from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.
from when we started working on the mode to its flag.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 2.2s | 1 | 0 |
| time trial | 1.1s | 1 | 0 |
| mastery | 2.8s | 1 | 0 |
the clock
server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | 95.0s | 1.1s | 93.9s |
| mastery | 200.0s | 2.8s | 197.2s |
where we got stuck
- nowhere on day 22.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}