out of order: terraform as one more carrier
huntress ctf 2026, day 28 · script analysis · all three modes
tools used: script analysis and timed-attempt pipeline.
"terraform hcl describes cloud resources, expressions, and dependencies that change over time. assemble the timeline from resources, prior scripts, and relationship evidence — without planning or applying anything — and find the change that happened out of order." the day's new specimens were four terraform files, and the questions about them were the family's usual descriptor fields under a new carrier.
the key insight is that neither the timeline nor the change out of order became a field. a terraform file is a carrier like the dockerfile of day 27 or the escript of day 26: the analysis header sits in it under one of the known encodings, and the same descriptor reader answered every field without being told what terraform is.
challenge shape
single 1703 fields the cumulative families of every earlier
day plus the terraform specimens' descriptors
time trial 1781 fields 179 samples renamed <6 hex>.<ext>, layered
headers and composite fields as on day 23
mastery 21372 fields twelve sets
the terraform fields are eleven descriptor fields (adapter, attack, campaign, a file path or url, host profile, next language, obfuscation, role, stage count, stage profile, steps) for each of four specimens: a benign utility, a downloader, a launcher and a staged chain.
artifact anatomy
each .tf file is a few lines of valid hcl that would do nothing if applied:
comment line HUNTRESS_ANALYSIS_V1:<CODEC>-<payload>
terraform block terraform { required_version = ">= 1.0" }
locals block huntress_descriptor_<hex> = "<the same payload>"
output block output "inert_analysis_<hex>" echoes that local
the four files used four codecs: B64, HEX, HB64 (hex of base64) and FRAG (dotted hex).
the descriptor is the family's pipe-separated key=value record (role, attack, adapter, host and stage profiles, the next language, the stage count, the ordered steps, the campaign, a url or file path). it appears twice, once in the comment and once as a string literal, and both copies agree.
extraction method
the script analysis reader treats any carrier the same way: find the header under its codec in a comment or a string literal, parse the descriptor, and read every field from it by key; role and attack are used verbatim when the descriptor states them, and only labels it does not state go out as ranked candidates:
from ctfkit.hlib import specimen
found = specimen.find(text) # header first, then the slower search
fields = specimen.answers(text, language) # language from the field id; steps joined with ">"
nothing in that path depends on the language around the header, which is why a configuration language with no imperative code at all read the same as a shell script.
validation and answer formatting
the label fields are exact text; the reader submits the descriptor's own spelling first and the family's confirmed alternatives after it. counts are base-10 integers, the steps are an ordered list with the question's > separator, urls and paths are submitted as stored. every one of the 1703 fields read on the first run of the single.
failed approaches and pivots
none on day 28.
automation across modes
the solve took 0.36 seconds on the single, 0.19 seconds on the time trial and 2.3 seconds for the mastery's twelve sets; no field came back rejected.
lessons
- a declarative configuration file is a carrier like any script: the header is in a comment or a string, and the language around it does not matter to the reader.
- a prompt's story ("assemble the timeline") is not a field until a question asks for it; read the questions before writing a parser for the story.
solve times
public scoreboard · day 28 finish: below top 10
- 0:05.4single#2 of 145 solvers
- 0:08.5time trial#2 of 142 solvers
- 0:15.3mastery#3 of 139 solvers
- #49team day finishof 122 teams that cleared it, in 31:21.7
- #2single 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. attempts counts our solver runs.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 1.5s | 1 | 0 |
| time trial | 0.8s | 1 | 0 |
| mastery | 4.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 | 0.8s | 49.2s |
| mastery | 380.0s | 4.8s | 375.2s |
where we got stuck
- nowhere on day 28: the reader found the header in the new carrier on the first run of every mode.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}