Exploiting XXE using external entities to retrieve files
Last updated
Last updated
This lab has a "Check stock" feature that parses XML input and returns any unexpected values in the response.
To solve the lab, inject an XML external entity to retrieve the contents of the /etc/passwd
file.
After accessing the lab, I activated the Firefox FoxyProxy extension to proxy my web requests through Burp Suite. I began navigating the website, searching for requests that sent XML data to the backend. One request immediately caught my attention:
I forwarded this request to Repeater for further examination. Next, I created a new external entity containing the content of the /etc/passwd
file. By injecting this entity into the value of either the productId
or storeId
fields, I successfully retrieved the contents of the /etc/passwd
file.
By exploiting this XXE vulnerability, I was able to solve the lab.