ashes to assets: elixir as one more carrier, and a phoenix-hosted stage

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

tools used: script analysis, decoding search engine and timed-attempt pipeline.

"configuration starts out in elixir source and has changed shape by the time an inert phoenix-hosted stage picks it up. follow every transformation, reconcile each one with earlier campaign artifacts, and find the setting that didn't survive the rebirth." the day's carrier was elixir, beside every earlier day's samples. the single added four polyglot-elixir-<role> samples and one host sample modeled as a phoenix-hosted stage; the time trial and the mastery had day 23's shape (random hex stems, layered analysis headers, composite answers) with elixir among the carriers.

the key insight: as on day 24, our descriptor finder keys on the analysis header's marker, not on the language around it. elixir comments start with #, the same character as shell, python, ruby and powershell comments, so the new language changed nothing the finder looks at.

challenge shape

single        1571 fields   every earlier sample's descriptors plus four
                            polyglot-elixir-<role> samples and one phoenix
                            host sample, eleven fields each
time trial    1625 fields   samples renamed <6 hex>.<ext>; composite and
                            joined-label fields as on day 23
mastery      14625 fields   the same over nine bundles

the four roles were benign-utility, downloader, launcher and staged-chain. each sample's eleven fields are the descriptor's: role, attack technique, adapter, campaign, a url or file path, stage count, steps, and the host, obfuscation and stage profiles and the next language.

artifact anatomy

an elixir sample is three lines of an .exs script, none of which does anything when run:

# <marker>:<CODEC>-<payload>       a comment: the analysis header
descriptor_<id> = "<payload>"      a binding that holds the same payload
_plan_<id> = %{...}                a map whose one key names that binding

<marker> is HUNTRESS_ANALYSIS_V1, and <id> is eight hex digits, the same in both names of one file. the underscore in front of the map's name is elixir's own marker for a variable that is bound and never used, so the plan is dead code by the language's own convention. the host sample adds a module with a single controller-shaped action: it takes a connection and parameters, ignores both and returns a fixed ok tuple with an inert string. there is no router, no plug and no request handling, which is what "inert phoenix-hosted stage" means in practice.

decoded, the payload is the descriptor the questions ask about, v=3|language=elixir|role=...|, then the verdict, the attack technique, the adapter, host, obfuscation and stage profiles, the next language, the stage count, the ordered steps, the campaign id and the url and file path.

the single's five elixir headers used four different codecs (HB64 for the downloader and the host, B64, HEX and FRAG for the others), all of them codecs that earlier polyglot samples used. in the time trial the samples were renamed to six hex digits (<stem>.exs) and every elixir header used day 23's layered codec, LYR-<layers>-<payload>.

extraction method

the descriptor finder searches every member for the marker in any comment or string syntax, reads the codec name after it, undoes that codec (or, for LYR, each named layer from the last to the first) and accepts the result only when it parses as a descriptor. the binding's copy carries the same payload as the header, without the marker and codec name in front of it, which is a free cross-check.

from ctfkit.hlib import specimen

for member, text in members.items():
    found = specimen.header_descriptor(text)  # marker, codec name, payload; LYR layer by layer
    if found is not None:
        answers[member] = found.desc          # the parsed key=value descriptor

every field is read from the descriptor, and a value the descriptor states is used verbatim. the time trial's composite fields came from day 23's composite reader: the campaign token, the url's host, the file path's last segment, the first indicator present in the order the question lists, and joined style labels, each part read by the reader of the standalone field with the same name.

validation and answer formatting

the decoded text must parse as a descriptor (|-separated key=value pairs) or the reading is refused, and a layer name the layered reader does not know raises a named error instead of being guessed around. the profiles and the next language are submitted as the descriptor states them; for our five day 25 samples:

sample host profile obfuscation stage profile next language
polyglot-elixir-benign-utility.exs standalone base64 two_stage_download_execute powershell
polyglot-elixir-downloader.exs standalone hex_base64 three_stage_decode_write_launch jscript
polyglot-elixir-launcher.exs standalone fragmented_hex cross_language_handoff batch
polyglot-elixir-staged-chain.exs standalone plain_hex single_descriptor vbscript
host-elixir-phoenix-elixir.exs elixir_phoenix hex_base64 three_stage_decode_write_launch jscript

the time trial's five elixir samples (0be553.exs and four more) were asked no host profile, only the obfuscation, the stage profile and the next language, each in labels of its own (hex_b64_b64, cobalt_lattice and beanshell for 0be553.exs); each of the mastery's nine bundles asked the same three of its five.

failed approaches and pivots

none on day 25.

automation across modes

the same reader answered the single's 1571 fields in about 0.3 seconds, the time trial's 1625 in about 0.2 and the mastery's 14625 across nine bundles in about 1.7; sending the mastery's answers (about 2.5 seconds on our client's clock) took longer than solving them.

lessons

solve times

public scoreboard · day 25 finish: below top 10

  • 0:04.4single#2 of 149 solvers
  • 0:07.6time trial#4 of 144 solvers
  • 0:13.8mastery#4 of 144 solvers
  • #11team day finishof 138 teams that cleared it, in 6:15.3
  • #3single orderof the day's 8, 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 2.3s 1 0
time trial 0.9s 1 0
mastery 3.4s 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.9s 49.1s
mastery 290.0s 3.4s 286.6s

where we got stuck

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

{generated by a clanker}