crumb trail: credential stores and a scripting host
huntress ctf 2026, day 15 · script analysis · all three modes
tools used: script analysis toolkit, decoding engine and timed-attempt pipeline.
the prompt: "some credential-access-shaped code keeps rummaging through the browser's cupboards, and synthetic store artifacts are sitting there waiting. connect each code path to the artifact it targets, and find the reference that points at a store that was never there." the cumulative specimen set grew to 1026 fields across bash, python, node, jscript, vbscript, batch, polyglot carriers and windows script host files. the only new members were perl: four perl polyglots and a perl cgi host. no field asked about a credential store; the credential-access code in the bundle is day 1's collection sample, still graded as credentials from web browsers (T1555.003), and the missing store was narrative.
the key insight: every specimen, whatever its carrier, ends in the same descriptor (role, technique, adapter, campaign, indicators, stage count), so one reader answers all of them once the carrier is peeled.
challenge shape
single 1026 fields 116 members, one zip (password infected)
time trial 1026 fields the same families on fresh specimens
mastery 5130 fields five bundles
the 55 new fields: polyglot-perl-<tag>-* for benign-utility, downloader, launcher and staged-chain, plus host-perl-cgi-perl-*, eleven each (role, attack, adapter, campaign PERL-<8 hex>, url or file path, stage count, steps, host profile, obfuscation, stage profile, next language). the kinds are the same as on days 12 to 14: role an eleven-value enum, attack an att&ck id or none by the question's precedence, stage count a base-10 integer, steps tokens joined by > with no spaces, the rest exact text. the cgi host's profile question reads "identify the script host or webshell source container".
artifact anatomy
each specimen hides its descriptor behind one or more stages: encodings, string building, and per-language wrappers. the perl members are the shortest carrier yet: a first-line perl comment, # HUNTRESS_ANALYSIS_V1:<CODEC>-<payload>, then
use strict;
use warnings;
my $descriptor_<id> = "<payload>";
sub build_plan_<id> { return { descriptor => $descriptor_<id> }; }
1;
the codec is B64, HEX, HB64 (hex of base64) or FRAG (dot-separated hex fragments), and the descriptor's obfuscation_profile names it. the cgi host adds a #!/usr/bin/env perl line above the comment and a dead print "Content-Type: text/plain..." if 0; below; its descriptor's host_profile names the perl cgi host, where each polyglot's names no host at all.
extraction method
each stage is decoded by its declared codec when one is named and by a search over transforms and keys otherwise; a decoded stage is accepted only when it parses as the next stage or as the descriptor. the perl headers decode exactly as day 12's autoit headers did: regex the marker, decode the payload with the named codec, split on | and =.
the search did real work on two bash specimens (process-substitution.sh, trap-handler.sh). they declare Codec_<id>='xor_hex|<key>', a hex material xored with one key byte written in hex. our material reader took that two-part header as representation xor_hex and transform <key>, decoded nothing, and fell back to the search, which found hex plus a single-byte xor from the descriptor's known prefix. the answers were right; the header now decodes directly (vbscript.short_header).
validation and answer formatting
labels come from the question's enum, technique ids from the precedence the question spells out, and indicators as stored. where a descriptor states attack, that value is the answer: the perl records state none, T1105 or the parent T1059, and the parent is accepted in place of a language-specific sub-technique. as on days 13 and 14, the steps and profiles do not follow the role (the benign utility carries a handoff graph), so re-deriving attack from the steps would answer something other than what was graded.
automation across modes
the same reader handled every carrier in all three modes, all five mastery bundles included, each answered on the first attempt.
lessons
- a uniform descriptor behind varied carriers turns a thousand questions into one reader.
- a search fallback must be gated by a parse of what it decodes, never by printable output alone.
solve times
public scoreboard · day 15 finish: top 10
- 0:04.5singlefirst blood, +0.79 s
- 0:07.3time trialfirst blood, +0.79 s
- 0:12.9mastery#2 of 166 solvers
- #4team day finishof 163 teams that cleared it, in 2:31.2
- #3single orderof the day's 5, 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 | 1.6s | 1 | 0 |
| time trial | 1.6s | 1 | 0 |
| mastery | 3.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 | 50.0s | 1.6s | 48.4s |
| mastery | 170.0s | 3.8s | 166.2s |
where we got stuck
- nowhere: every mode passed on its first attempt.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}