SSRF to gaining RCE —( rootme ssrf box)

Trevor saudi
Nov 17, 2020

--

Write-up for an SSRF box on the rootme platform.

So from the description, our objective is to get root and find the flag in /root.

Moving on to the challenge, we are presented with an input box where you can place a url and the site creates a link that redirects you to it.

To first test for SSRF, you can fuzz the input to see if you can read system files.

Nice! We can move on to detect open services running in the internal network of the web server. Intercept the request using burpsuite Intruder and bruteforce for open ports

Port 6379 (running the Redis service) timed out on the intruder attack. This means that the port was open and redis was running.

I proceed to port forward localhost on port 1234 using ngrok to expose my IP to the public .

Then used gopher to generate a payload that would get a reverse shell back on netcat. We get RCE !

Navigate to /root and get your flag, and /passwd for the validation flag.

Happy hacking :)

--

--

Trevor saudi
Trevor saudi

No responses yet