Skip to content
SSRF Write-up Beginner

Exploiting An Ssrf Vulnerability

A web application accepted user-supplied URLs for an availability check but did not validate them, so the server could be made to request internal addresses. The author used this to probe local ports, found plain-text admin credentials on one port, and used them to gain access to the machine.

charlier0cks Follow

Published on systemweakness.com

Recently, I had the opportunity to engage with a CTF machine that involved compromising a web server hosting a web application that had a Server-Side Request Forgery (SSRF) vulnerability. In this blog post, I will explain how I was able to exploit this vulnerability and gain access and establish a foothold.

charlier0cks, on systemweakness.com

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 URL-checking feature passed user input straight to a server-side request without restricting it to allowed hosts or addresses.

Impact

The author could reach internal services and obtained admin credentials, which allowed access to the machine; the text gives no detail on what defences, if any, limited the attack.

What the attacker needed

A URL-checking feature; no allowlist on requested addresses

The fix

The application should validate user-supplied URLs and restrict server-side requests to permitted destinations, with a WAF as an extra layer.

How it was found

  1. Test the path parameter by submitting different URLs to it.
  2. Confirm SSRF by requesting a known local address and port.
  3. Fuzz local ports through the parameter to find open services.
  4. Review the responses for each port and note one that returns credentials.
  5. Use the captured credentials to access other internal resources.

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) means the server itself fetches a web address on your behalf. If it does not check where it is allowed to go, you can ask it to fetch internal addresses that outsiders cannot reach, such as services on the same machine. Here that let the author find an internal service that exposed login details.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by charlier0cks

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.