Hacking the Imaginary: A Journey to Discovering a Blind SSRF
The Imaginary image processing application exposed a URL parameter that fetched remote images, allowing an attacker to make the server request internal addresses. The author used an octal-encoded loopback address to perform blind SSRF and scanned internal ports, finding 80 and 443 open.
Published on medium.com
Hey there, fellow cyber sleuths! Today, I’m taking you on a fun and exciting journey of discovering a blind Server-Side Request Forgery (SSRF) vulnerability in the Imaginary application.
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 application fetched user-supplied URLs without validating or restricting them to allowed hosts, so internal addresses were reachable.
Impact
An attacker could make the server send requests to internal services and map open ports, though the text only shows blind requests and port discovery, not data exfiltration.
What the attacker needed
Access to the Imaginary web endpoint; none
The fix
The application should validate and restrict the url parameter to allowed external hosts and block loopback, private and link-local addresses.
How it was found
- Find the Imaginary subdomain during reconnaissance.
- Read the source code to discover the fit endpoint with a url parameter.
- Test the url parameter with different URLs.
- Use an octal-encoded loopback address to trigger blind SSRF.
- Scan internal ports with Burp Suite and observe ports 80 and 443 open.
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.
Server-Side Request Forgery (SSRF) is when a website fetches a URL for you, and you trick it into fetching something it should not, like an internal server. Here the image tool accepted a web address to download a picture from, and the author gave it an address that points back to the server itself. Because the reply was not shown, this is called blind SSRF: you infer success from timing or side effects rather than seeing the content.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.