Member-only story

Clobbering the clobbered — Advanced DOM Clobbering

Based on @SecurityMB XSS Challenge

terjanq
9 min readSep 26, 2019

This is a write-up for an XSS Challenge that popped out on Twitter recently. In this article, I will talk through three different approaches that one could take to solve the challenge, including the shortest among the submitted solutions. The latter resulted in a surprising discovery of how HTML is parsed.

If you are familiar with the challenge details and are only interested in knowing the solutions, I recommend scrolling down to the ‘CSP Path bypass’ section.

It was supposed to be a mini-article but turned out to be an at least medium-size text. Enjoy reading! :)

Task description

The beauty of the XSS Challenges occasionally popping out on Twitter, comes from their simplicity while still preserving high exploitation complexity. Michał’s challenge is no exception to that rule.

We have a website whose main functionality is rendering user-controlled input inside an iframe, then creating a unique URL that could be shared. From the challenge description:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

terjanq
terjanq

Written by terjanq

Security enthusiast that loves playing CTFs and hunting for bugs in the wild. Also likes to do some chess once in a while. twitter.com/terjanq

Responses (3)

What are your thoughts?

Hi terjanq. Super article, thanks a lot. As of today, April 3rd 2020, it doesn’t seem to work anymore. Maybe Chrome update ? Do U have any info on this. Thanks. Stephane

Hi terjanq, great article — thank you for taking the time to write this! I’m the Editor for JavaScript in Plain English. We currently receive over 750,000 views per month and we would love to help you gain more views for your work. Let me know if…

this is one of the most interesting and well written content I’ve seen in a long time. Thank you for teaching me all this. I feel that I have a long road ahead and I’m looking forward to be better on this. How I can pay you a beer? I’m happy do do it.