static-boundary
- •
Attribution
- •
Solved by Fauzi Ismail during the competition. These are rn’s study notes based on the teammate’s documented solve, not an independent rn solve.
- •
- •
What it asked
- •
Analyze an Nginx
aliasmapping and reach a file outside the intended static directory.
- •
- •
Approach
- •
location /assetslacked a trailing slash whilealias /srv/www/public/ended with one. - •
For
/assets../private/flag.txt, Nginx removes the matched/assetsprefix and appends../private/flag.txt, yielding/srv/www/public/../private/flag.txt. - •
The URI never matches
location /private/, so that block’sdeny alldoes not protect the resolved file.
- •
- •
Solution
- •
curl --path-as-is \ -H 'Host: lab.kamsiber.local' \ 'http://10.0.100.6:8080/assets../private/flag.txt'
- •
- •
Verification
- •
The team document records successful flag recovery. The configuration was analyzed offline; the service was not replayed.
- •
- •
Concepts
- •
Nginx alias traversal; URI-to-filesystem mapping; location-boundary mismatch.
- •
- •