In this walk through, we will be going through the HTML Injection (Password Generator) vulnerability section from Mutillidae Labs. We will be exploring and exploiting HTML Injection in Password Generator utility and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.
Table of Contents
Security Level: 0 (Hosed)
- Setting the security level to 0 or Hosed.
- The application has a Password Generator tool that generates password for the user specified. Although there is no direct field to select the user and the default is anonymous. However we can change it by intercepting the request via Burpsuite.
- I used the HTML heading tags with the username and forward the request. The application parses the tags and displays the username in heading format which makes the application vulnerable to HTML injection.
- I used the below payload after URL encoding and changed it with the username value. After forwarding the request, a pop up has been generated.
<img src=x onerror=alert(1)>
Also Read: Mutillidae – HTML Injection (Browser Info)
Conclusion:
So, we finally completed all the security levels for the HTML Injection (Password Generator) 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 HTML Injection attacks by performing input sanitization on endpoints, whitelist the allowed characters in the input and using a WAF. Along with that, we can prevent data from any untrusted source to be dynamically written to the HTML document. On that note, i will take your leave and will meet you in next one with another Mutillidae vulnerability writeup, till then “Keep Hacking”.