SSRF To RCE
Objective: Leverage the XXE vulnerability in the web application to perform SSRF, steal SSH keys for a user, and get all the flags from the target machine.
Checking the open ports on the server.

Viewing the application.

Used the below code to check for XXE.
Received a connection from the webserver.

The below payload will try to read the /etc/passwd file.

Find out what services are running on the server.

The IP addresses are in hex but need to be converted to dotted decimal. Use a converter or the below Python script.


Created a dtd file:
Submit the below xml to the application.
This reveals the first flag and a .ssh folder.

Read the ssh key.

Cleanup the file and add the required start and finish lines of the ssh key and login to the server.

Last updated