bWAPP - Cross Site Scripting Reflected (Custom Headers)

bWAPP – Cross Site Scripting Reflected (Custom Headers)

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

Cross Site Scripting Reflected (Custom Headers)

Security: Low

  • Setting the security level to Low.

Security level Low

  • The application page can use custom HTTP headers request. It has also provided a hint for the allowed customer header – bWAPP.

bWAPP header

Burpsuite intercept

  • I intercepted the request and add our customer header along with the below payload. On forwarding the request, i received a pop-up alert.

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

Burpsuite intercept payload

Hacked pop up alert

Security: Medium

  • Setting the security level to Medium.

Security level Medium

XSS - Reflected (Custom Headers)

  • I intercepted the request via Burpsuite and added our customer header with the below payload. On forwarding the request, it gives us the pop-alert.

bWAPP: <script>alert(1)</script>

Payload

Pop up alert

  • Not working in hard level.

Also Read: bWAPP – Cross Site Scripting Reflected (JSON)

Conclusion:

Conclusion

So, we finally completed all the security levels for the bWAPP Cross Site Scripting Reflected (Custom Headers) 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”.

Leave a Comment

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

Scroll to Top