Escalating SSRF to RCE

Retrieving AWS metadata and use it for RCE

When researching a web application, I stumbled upon an endpoint which allowed me to perform SSRF. I’ll use the endpoint as example.

Performing results in listing the directory contents of the Amazon metadata service.

$ curl http://example.com/fetch?url=http://169.254.169.254/latest/meta-data/ami-id

Muhammad Aldiansyah

Penetration Tester

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store