In this walk through, we will be going through the Cross Site Scripting Reflected (GET) vulnerability section from bWAPP Labs. We will be exploring and exploiting Reflected Cross Scripting vulnerability in HTTP GET Requests and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.
Table of Contents
Security: Low
- Setting the security level to Low.
- The application has a page where user’s first and name is asked and post submitting that it got reflect in the page itself with a greetings. It issues a GET request to xss_get.php for the execution.
- I used the below payload and pop up an alert, confirming the XSS vulnerability.
<script>alert("Hacked")</script>
Security: Medium
- Setting the security level to Medium.
- I used the previously used payload and it didn’t worked.
- Checked the source code, found out that the application is using addslashes now to mitigate the XSS.
- I was able to generate a pop-up using the below payload. Thus, bypassing the sanitization.
<body/onload=<!-->
alert(1)>
- This is not working on high level.
Also Read: bWAPP – Cross Site Scripting Reflected (PHP_Self)
Conclusion:
So, we finally completed all the security levels for the bWAPP Cross Site Scripting Reflected (GET) 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. Reflected-XSS attacks can be mitigated 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 bWAPP vulnerability writeup, till then “Keep Hacking”.