- You were provided with a link to a web application at http://184.108.40.206:8080/ which consists of a Contact Us form.
2. Let’s try to fill the form and submit it and check what requests are being sent using Burp suite.
3. To configure Burp Suite with your browser you can install FoxyProxy plugin and set a profile named Burp .
4. Save it and now you can easily use Burp Suite to capture the requests that are sent by your browser .
5. Now lets check the requests that were sent when you click on the Send Message button.
6. A post request is sent to contact.php page.
7. The response for this request comes as :
8. As you can see the value of message field is reflecting so we can try XXE (XML external entity) injection here.
9. You can learn about XXE injection from here.
XML External Entity (XXE) Processing
An XML External Entity attack is a type of attack against an application that parses XML input. This attack occurs when…
What is XXE (XML external entity) injection? Tutorial & Examples | Web Security Academy
In this section, we'll explain what XML external entity injection is, describe some common examples, explain how to…
10. Let’s send this request to Burp Repeater so that we can modify the POST request to inject our xml.
11. This XXE payload defines an external entity &test; whose value is the contents of the "/etc/passwd" file and uses the entity within the message value. This causes the application’s response to include the contents of the file.
12. Now to retrieve the flag we just had to include the contents of “/home/wazirsec/flag.txt” file .
13. And this is how you will get the flag.
I hope you enjoyed reading this.
For any feedback or suggestions reach out to me @yashswarup12