Chaining Ssrf And Lfi To Achieve Root Access On A Major Telecom Server
A publicly exposed latency-checking service allowed SSRF, and a separate XAMPP server had an LFI vulnerability in a PHP script. By chaining these, the attacker could read sensitive files and access an internal phpMyAdmin instance already logged in as root.
After hitting a wall with standard testing, I returned to recon and discovered a critical SSRF + LFI chain leading to full root access.
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 latency-checking service lacked URL whitelisting, and the PHP script failed to restrict the protocol and path in its 'url' parameter, allowing file reads.
Impact
The attacker could read arbitrary files and access an internal phpMyAdmin instance as root, potentially leading to full server compromise, though the tester stopped before escalating further.
What the attacker needed
Publicly exposed services; no authentication required
The fix
The vulnerabilities were fixed by the telecom company.
How it was found
- Found an internal latency-checking service on port 8003 that accepted arbitrary URLs.
- Changed the target URL to localhost and confirmed SSRF.
- Discovered a directory named php on port 8090 and brute-forced to find cors.php.
- Accessed cors.php with a url parameter pointing to localhost, then switched to file:// protocol to read local files.
- Read XAMPP passwords from a default file path.
- Used the SSRF to access the internal phpMyAdmin instance, which was already logged in as root.
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.
The tester found two separate weaknesses on the same server. One let him make the server fetch any address he chose (SSRF), and another let him read files on the server (LFI). By combining them, he could reach an internal database tool that was already logged in as the administrator, which could have led to full control of the server.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.