Lab: SSRF via flawed request parsing
This lab is vulnerable to routing-based SSRF due to its flawed parsing of the request's intended host. You can exploit this to access an insecure intranet admin panel located at an internal IP address.
To solve the lab, access the internal admin panel located in the
192.168.0.0/24 range, then delete Carlos.
To prevent the Academy platform being used to attack third parties, our firewall blocks interactions between the labs and arbitrary external systems. To solve the lab, you must use Burp Collaborator's default public server (
GET /request that received a 200 response to Burp Repeater and study the lab's behavior. Observe that the website validates the Host header and blocks any requests in which it has been modified.
Observe that you can also access the home page by supplying an absolute URL in the request line as follows:
- Notice that when you do this, modifying the Host header no longer causes your request to be blocked. Instead, you receive a timeout error. This suggests that the absolute URL is being validated instead of the Host header.
Use Burp Collaborator client to confirm that you can make the website's middleware issue requests to an arbitrary server in this way. For example, the following request will trigger an HTTP request to your Collaborator server:
Send the request containing the absolute URL to Burp Intruder. Use the Host header to scan the IP range
192.168.0.0/24to identify the IP address of the admin interface. Send this request to Burp Repeater.
In Burp Repeater, append
/adminto the absolute URL in the request line and send the request. Observe that you now have access to the admin panel, including a form for deleting users.
Change the absolute URL in your request to point to
/admin/delete. Copy the CSRF token from the displayed response and add it as a query parameter to your request. Also add a
carlos. The request line should now look like this but with a different CSRF token:
Copy the session cookie from the
Set-Cookieheader in the displayed response and add it to your request.
Right-click on your request and select "Change request method". Burp will convert it to a
- Send the request to delete Carlos and solve the lab.