fetch quest: autohotkey joins the specimen set

huntress ctf 2026, day 17 · script analysis · all three modes

tools used: script-analysis toolkit and timed-attempt pipeline.

the prompt: "the source code says where it would fetch from, and the generated network evidence says where the requests actually went. reconcile both into one download graph, and find the indicator that shows up on only one side of the story." the bundle's new members were four autohotkey v2 scripts, one per role, each asked eleven fields.

the key insight: the autohotkey specimens carry the same versioned descriptor as every polyglot language before them: a v=3|... record, encoded in a comment header and again, with the same payload, in a string variable. each of the four specimens used a different header codec: B64, HEX, HB64 (hex of base64) and FRAG (hex in dot-separated fragments). the descriptor finder reads a new language's carrier without knowing the language.

challenge shape

single        1139 fields   one bundle; 44 new (4 autohotkey specimens x 11)
time trial    1139 fields   a fresh bundle
mastery       5695 fields   five bundles

the new fields per specimen: role, attack, adapter, campaign, one indicator (a file path for the benign utility, a url for the downloader, launcher and staged chain), stage count, steps, host profile, obfuscation, stage profile, next language.

artifact anatomy

; HUNTRESS_ANALYSIS_V1:<CODEC>-<encoded descriptor>
#Requires AutoHotkey v2.0
descriptor_<hex> := "<the same payload>"
buildPlan_<hex>() returns Map("descriptor", descriptor_<hex>)

the descriptor decodes to key=value pairs joined by |, beginning with the version v=3: language, role, verdict, attack, adapter, host profile, obfuscation profile, stage profile, next language, stage count, steps, the campaign id, a url and a file path.

extraction method

the finder tries every string literal and header against every codec it knows and keeps a reading that parses as a v=N| descriptor; the fields are then read by name, the role and attack from the descriptor itself (a stated value beats any rule), the steps in the syntax's joiner. the four header codecs, as specimen.HEADER_CODECS decodes them:

import base64, re

def decode(codec: str, payload: str) -> bytes:
    if codec in ("HEX", "HB64", "FRAG"):
        payload = bytes.fromhex(payload.replace(".", ""))
    if codec in ("B64", "HB64"):
        return base64.b64decode(payload)
    return payload

src = open("polyglot-auto_hotkey-downloader.ahk").read()
codec, payload = re.search(r"HUNTRESS_ANALYSIS_V1:([A-Z0-9]+)-(\S+)", src).groups()
text = decode(codec, payload).decode()
descriptor = dict(pair.split("=", 1) for pair in text.split("|"))
steps = descriptor["steps"].replace(",", ">")

validation and answer formatting

a decoded candidate counts only when it is printable, starts with its version (v=N|) and carries a well-formed steps list; anything else is dropped and the next codec or literal is tried. answers are the descriptor's values as stored, conformed to each question's syntax.

automation across modes

the timed modes deliver fresh specimens of the same four roles; the finder reads each one's own descriptor.

lessons

solve times

public scoreboard · day 17 finish: below top 10

  • 0:04.3singlefirst blood, +0.29 s
  • 0:07.5time trialfirst blood, +0.42 s
  • 0:13.2masteryfirst blood, +1.2 s
  • #15team day finishof 162 teams that cleared it, in 1h45m
  • #1single 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 2.6s 1 0
time trial 1.5s 1 0
mastery 4.2s 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.5s 48.5s
mastery 170.0s 4.2s 165.8s

where we got stuck

flags: single, time trial, and mastery [redacted].

{generated by a clanker}