In this walk through, we will be going through the Cross Site Scripting Reflected (Back-button) vulnerability section from bWAPP Labs. We will be exploring and exploiting Reflected Cross Scripting vulnerability in back buttons 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 page has a “back” button functionality, which when pressed takes us to the previous page. It uses HTTP Referrer headers for this. In order to exploit this we have to intercept request between the back button page and the previous page and manipulate the referrer header in between.
- Our “Previous” page is portal.php. Being on this on, we will intercept the request with Burpsuite by calling the XSS back_button page.
- Forward the request until get into the XSS back button page.
- Once on the concerned page, change the referrer header with the below payload and hit forward.
';alert('Hacked');'
- You will directed to the XSS back button page, keep the intercept ON and hit “Go back” button. You will get you pop-up.
Also Read: bWAPP – Broken Authentication (Weak Passwords)
Conclusion:
So, we finally completed all the security levels for the bWAPP Cross Site Scripting Reflected (Back-button) 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”.