In this walk through, we will be going through the Cross Site Scripting Stored (Cookies) vulnerability section from bWAPP Labs. We will be exploring and exploiting Stored Cross Scripting vulnerability in Stored Cookies implementations and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.
Table of Contents
- Setting the security level to Low.
- The application has a drop down functionality to select favorite movie genre. For this it issues a GET request to xss_stored_2.php file with the genre name. As we can check the values of selected genre are stored in a cookie values.
- We can intercept the request via Burpsuite and change the movie genre to something that is not present in the drop down functionality. Forwarding the request sets the cookie value to our specified genre. Theoretically, an attacker can store malicious code inside it but it didn’t worked here.
Also Read: bWAPP – Cross Site Scripting Stored (Blog)
So, we finally completed all the security levels for the bWAPP Cross Site Scripting Stored (Cookies) 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. Stored-XSS attacks can be mitigated 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 bWAPP vulnerability writeup, till then “Keep Hacking”.