XSS - Hard
Category: Web
Description
The admin has tried even harder to block JS on the blog.
Can you get the flag from the admin user? He's logged on right now
Write-up
- Continuing from the
XSS - Easy
andXSS - Medium
challenges, we are no longer able to create comments with<script>
tags as they get sanitized. - However, we can still invoke JavaScript logic through the
<img>
tag'sonerror
event handler. - Our payload should contain an
<img>
tag that points to an invalid URL, triggering theonerror
event and invoking our malicious logic from theXSS - Medium
challenge. - An example of the payload is:
Text Only - After submitting our payload, we can refresh the page and view the flag in one of the blog post's comments.
Flag: punk_{RGQXJ27QYW15L7TJ}