h1-5411-CTF report: LFI / Deserialization / XXE vulnerability,
A CTF challenge contained a local file inclusion flaw that let an attacker read PHP source files from the server. Reading those files revealed a PHP deserialisation bug and an XXE issue that was used as SSRF to reach hidden maintenance pages, and the flag was captured.
- Triaged in 14 hours
- Fixed in 11 days
- Disclosed after 25 days
NOTE! Thanks for submitting a report! Please replace all the [square] sections below with the pertinent details. Remember, the more detail you provide, the easier it is for us to triage and respond quickly, so be sure to take your time filling out the report!
Summary: h1-5411-ctf write-up
The CTF contained a Local File inclusion that enabled the attacker to read .php files (among others) from the server and by doing so, it helped to find out PHP serialization bug and the XXE vulnerability that was used as SSRF to exploit the hidden maintenance pages.
Flag: flag{cha1n1ng_bugs_f0r_fun_4nd_pr0f1t?_or_rep0rt_an_LF1}
Description: See attached .pdf file.
Steps To Reproduce:
See attached .pdf file.
Supporting Material/References:
See attached .pdf file.
Impact
Flag was found!
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application passed user-controlled input into a file path, and the exposed source code then revealed unsafe PHP object deserialisation and an XML parser that resolved external entities.
Impact
The chain let the attacker read server files and reach hidden maintenance pages, and the challenge flag was captured; the text does not claim any effect beyond the CTF.
What the attacker needed
CTF challenge environment
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 report has not been written yet. The Original tab links to the source.
This is a write-up of a practice challenge (a CTF), not a real product. A local file inclusion bug lets someone make the server hand back files it should not, such as its own source code. Reading that code then exposed two more weaknesses: unsafe deserialisation (turning untrusted data back into program objects) and XXE (abusing XML parsing to make the server fetch things).
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.