Write-Up: SOC170 — Passwd Found in Requested URL — Po
An external host sent a request containing a directory traversal sequence aimed at reading the server's passwd file, which triggered an LFI alert. The server returned an internal error with no content, so no file was disclosed.
Published on medium.com
While the LFI attack attempt was thwarted by the server, the firewall allowing such traffic in the first place is a vulnerability that needs to be addressed. Tightening the firewall rules, along with enforcing proper input validation on the web application, will significantly reduce the risk of future LFI attempts…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the web application passed a user-supplied file parameter into a file include without validating or restricting the path.
Impact
The attempt failed because the server returned an error and no data, but the firewall allowed the request through, which the analyst flags as a concern.
What the attacker needed
External network access to the web server; none
The fix
Firewall rules should be tightened to block directory traversal and LFI attempts at the perimeter, and the web application should enforce proper input validation.
How it was found
- An external host sent a GET request to the web server with a file parameter containing a traversal path.
- The monitoring rule matched the word passwd in the URL and raised an LFI alert.
- The analyst checked the HTTP response and saw status 500 with zero bytes returned.
- The analyst confirmed no sensitive data was leaked and closed the case as a true positive.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web server can be tricked into reading files on its own disk if it takes a filename from the user without checking it. Here someone asked for a system password file using a path that climbs out of the web folder, but the server errored and returned nothing.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.