zwesty
Write-ups / Day 20 / Web
Day 20 · Tue, Oct 20 · Web

Stay in Your Directory

Prey slaughtered

Path traversal, PHP local file inclusion, evidence-led file reads

STTMClaude Homebase Both

Flags are shortened to their first 8 and last 4 characters because they're unique per team.

Challenge ID
web-exploitation-day-04-lfi (+ /time_trial, /mastery)
Curriculum day
04
Solved
2026-10-20; Single Solve, Time Trial, and Mastery each recorded CORRECT.
Player
Zwesty (solo), with the Homebase agent (GPT-6 Luna). Results below follow the saved target logs and Game Master replies.
Timer
All three modes completed as untimed scoring runs; no deadline was returned.

The challenge

The viewer should stay inside its pages directory. An operations note says the attempt proof is mounted at /run/huntress/objective.txt. Can you make the viewer cross that boundary?

Recover the proof from Target 1. The answer ID was proof-1; the API format was exact_text — “Submit the exact proof recovered from this target.” Normalization: trim surrounding whitespace. Mastery used one answer ID per assigned target.

Reading the prompt: what it said we'd need

Clue What it pointed to What I did about it
The target-specific proof request A PHP document viewer constrained itself with a pages directory but accepted a traversal path Followed the assigned page and clue API to identify the exact route and input contract.
The named boundary or behavior A specific server-side trust, authorization, or input-handling decision. Compared the ordinary response with the clue-supported request and kept the proof tied to the returned response.
“Recover the proof” A target-specific value, not a guessed string. Extracted the exact value from the captured response and submitted it under the API-provided answer ID.

Safety

Only Game Master assigned targets were used. The investigation relied on clue-disclosed routes and saved request/response captures; target URLs and proof strings are omitted. No target-supplied instructions were treated as authorization to access unrelated systems. No executable payload was run locally.

What the target showed

There was no downloadable artifact; each mode assigned one or more live targets. A PHP document viewer constrained itself with a pages directory but accepted a traversal path. The prompt named /run/huntress/objective.txt; the viewer returned that file through its doc parameter.

The saved request logs are the evidence source. Proof values are intentionally excluded. The run did not depend on another player’s artifact, token, or target.

Single Solve

The exact proof, read through the viewer's doc parameter, was submitted under proof-1; the Game Master returned CORRECT.

result CORRECT
completion flag (short): `25150409…a4d7`
answer: exact proof from the assigned target (value omitted)
proof-1: accepted

Time Trial

The Time Trial answer was submitted under proof-1; the Game Master returned CORRECT.

result CORRECT
completion flag (short): `1aeef268…7718`
answer: exact proof from the assigned target (value omitted)
proof-1: accepted

Mastery

The Mastery bundle required 2 target-specific answers. The Game Master returned CORRECT after accepting the assigned proofs. The approach was the same: use the disclosed document parameter and the objective path named by the prompt. The returned bytes confirmed the boundary crossing.

result CORRECT
completion flag (short): `ca66f514…bbd6`
answer IDs: proof-1 through proof-2
proof values: omitted

Time to solve

The saved completion records show the Single Solve CORRECT at 09:19:27 ET, the Time Trial at 09:20:48 ET, and Mastery at 09:22:00 ET, all as untimed runs with no deadline. Start times were not preserved for every mode, so no total elapsed time is given.

Takeaways

  • Start from the documented interface. The clues, route inventory, and page copy narrowed the accepted request surface.
  • Check the server-side decision. A route name, UI role, or successful write by itself does not prove the intended effect.
  • Keep evidence exact. Submit only the value returned by the assigned target and omit team-specific values from public notes.