Skip to content
SSRF Write-up Advanced

SSRF para RCE: Como transformei um pequeno inseto em um grande sa

An internal URL-fetching endpoint was vulnerable to server-side request forgery, allowing access to localhost and cloud metadata. The attacker then reached an internal Java deserialisation service and used a known gadget chain to execute code, obtaining a reverse shell.

Milton Lutonadio Follow

Published on medium.com

Imagine só: você encontra uma URL meio esquisita num painel interno. Parece inocente.

Milton Lutonadio, on medium.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-fetch endpoint did not validate or restrict the destination URL, and an internal Java deserialisation service accepted untrusted serialised data.

Impact

The attacker could execute code on the internal server, obtain a reverse shell, and from there access Jenkins and network credentials, potentially leading to full network admin access.

What the attacker needed

Access to the internal fetch endpoint; internal Java deserialisation service; attacker-controlled server for payload

The fix

The text recommends network segmentation, URL whitelisting, and disabling insecure services; it does not state that a fix was applied.

How it was found

  1. Test internal URLs such as localhost and cloud metadata through the fetch parameter.
  2. Map internal services and find an unauthenticated Java deserialisation endpoint.
  3. Generate a serialised payload with ysoserial and host it on an attacker server.
  4. Point the SSRF to the internal deserialisation service with the payload URL.
  5. Obtain a reverse shell and use it to access Jenkins and network credentials.

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 server can be tricked into making requests to places the attacker cannot reach directly, such as internal services or cloud metadata. Here the attacker used that access to find an internal Java service that accepted serialised objects, and a known tool turned that into remote code execution (running commands on 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.

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.