web of lies: a jsp webshell as one more carrier
huntress ctf 2026, day 24 · script analysis · all three modes
tools used: script analysis, decoding search engine and timed-attempt pipeline.
"this jsp source is shaped like a webshell: it reads requests and stages server-side work. recover the order of requests and stages, then separate the inert fixture behavior from the lines that would be real execution primitives in the wild." the day's carrier was jakarta server pages, beside every earlier day's samples. the single added four polyglot-jsp-<role> samples and a jsp webshell host sample; the time trial and the mastery had day 23's shape (random hex stems, layered analysis headers, composite answers) with jsp among the carriers.
the key insight: our descriptor finder keys on the analysis header's marker, not on the language around it. a new carrier changes only the comment syntax the marker sits in, so jsp needed no new reader.
challenge shape
single 1516 fields every earlier sample's descriptors plus four
polyglot-jsp-<role> samples and one jsp
webshell host sample, eleven fields each
time trial 1560 fields 162 samples renamed <6 hex>.<ext>; composite
and joined-label fields as on day 23
mastery 12480 fields the same over eight bundles
artifact anatomy
a jsp sample is four constructs, none of which handles a request:
<%-- HUNTRESS_ANALYSIS_V1:<CODEC>-<payload> --%> the analysis header
<%@ page contentType="text/plain" %> a page directive
<%! private static final String DESCRIPTOR_<HEX> = "<the same payload>"; %>
<%= "inert-analysis-fixture" %> the page's only output
the header is the event's analysis marker inside a jsp comment, which the server strips before anything is sent; the <%! ... %> block repeats the same payload as a static string field. decoded, the payload is the descriptor the questions ask about, v=3|language=jsp|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 host sample adds a comment that says the request surface is modeled only, with no command execution. the "execution primitives in the wild" the prompt mentions exist only as step names inside the descriptor; the page itself never calls Runtime.exec, reads a parameter or writes a file.
the single's five jsp headers used four different codecs (B64 for the downloader and the host, HB64, FRAG and HEX for the others), all of them readings the decoder has had since the first weeks of the event. in the time trial, samples were renamed to six hex digits (<stem>.jsp) and the headers 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 static field's copy carries the same payload as the header, without the marker and codec name in front of it.
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
the time trial's composite fields came from day 23's composite reader: campaign-token (the campaign id after its first hyphen), url-host and path-leaf (the url's host and the file path's last segment), indicator (the first indicator present in the order the question lists) and style (three labels joined by |, each 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; a layer name the layered reader does not know raises a named error instead of being guessed around. each composite takes its parts from the same readers and vocabulary as the standalone fields, so a composite is never guessed apart from them.
failed approaches and pivots
none on day 24.
automation across modes
the same reader answered the single's 1516 fields in about 0.3 seconds, the time trial's 1560 in about 0.2 and the mastery's 12480 across eight bundles in about 1.5.
lessons
- write format readers against markers, not languages: the comment syntax around a marker is the only thing a new carrier changes.
- a webshell-shaped sample is evidence to describe; read what it declares and never what it would do when served.
solve times
public scoreboard · day 24 finish: top 3
- 0:04.2single#3 of 153 solvers
- 0:07.2time trial#3 of 150 solvers
- 0:12.8mastery#3 of 147 solvers
- #3team day finishof 139 teams that cleared it, in 3:47.1
- #3single 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.9s | 1 | 0 |
| time trial | 1.3s | 1 | 0 |
| mastery | 4.0s | 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.3s | 48.7s |
| mastery | 260.0s | 4.0s | 256.0s |
where we got stuck
- nowhere on day 24: jsp's comment syntax was one more place the marker could sit, and the time trial's layered headers and composites were day 23's.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}