Blind SSRF with Shellshock exploitation
Last updated
Last updated
This site uses analytics software which fetches the URL specified in the Referer header when a product page is loaded.
To solve the lab, use this functionality to perform a blind against an internal server in the 192.168.0.X
range on port 8080. In the blind attack, use a Shellshock payload against the internal server to exfiltrate the name of the OS user.
After accessing the lab, I promptly followed the provided instructions. Navigating to the products page, I clicked on a product to view it. Utilizing Burp Suite, I intercepted the request and forwarded it to Repeater for deeper analysis.
In a similar fashion to a previous lab, I inserted a Burp Collaborator payload into the Referer header and sent the request. Upon checking Burp Collaborator, I observed incoming requests. To broaden my scope and delve deeper, I installed 'Collaborator Everywhere', which supplements my in-scope proxy traffic by injecting non-invasive headers. These headers are designed to expose backend systems by prompting pingbacks to Burp Collaborator.
Upon analyzing the requests within Collaborator, I noticed the presence of the user-agent header. Given the mention of the Shellshock vulnerability in the lab's description, I opted to exploit this vulnerability by injecting a Shellshock payload into the user-agent header. The payload format I used was PAYLOAD.Collaborator-subdomain.
PAYLOAD.Collaborator-subdomain
As I needed to exploit an internal server without knowing its IP, I devised a strategy to send payloads to all IPs within the 192.168.0.X range, specifically targeting port 8080. Upon identifying an active server, the payload would trigger the exploit.
To accomplish this, I employed Burp Intruder. Highlighting the last byte of the IP address, I added a payload marker. Within the payloads tab, I configured the payload type to 'Numbers', setting the range from 1 to 255 with a step of 1, and initiated the attack.
Shellschock payload:
Subsequently, I monitored Burp Collaborator for any DNS requests. Upon investigation, these requests revealed the OS user within the domain name, as illustrated below.
By submitting this user, peter-AdcftJ
, the lab was successfully solved.