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

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

缺陷编号:wooyun-2015-0121714

漏洞标题:CmsEasy getshell(略鸡肋)

相关厂商:cmseasy

漏洞作者: 路人甲

提交时间:2015-06-26 10:40

修复时间:2015-09-29 10:43

公开时间:2015-09-29 10:43

漏洞类型:文件包含

危害等级:中

自评Rank:10

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-06-26: 细节已通知厂商并且等待厂商处理中
2015-07-01: 厂商主动忽略漏洞,细节向第三方安全合作伙伴开放
2015-08-25: 细节向核心白帽子及相关领域专家公开
2015-09-04: 细节向普通白帽子公开
2015-09-14: 细节向实习白帽子公开
2015-09-29: 细节向公众公开

简要描述:

rt

详细说明:

利用条件:文章必须通过后台审核(必须列表审核),有点鸡肋了。
CmsEasy\lib\default\archive_act.php:
411行 show_action()函数
里有句

if (front::get('t') == 'wap') {
$tpl = category::gettemplate($this->view->catid, 'showtemplatewap');
if(!$tpl) $tpl = 'wap/show.html';
$this->out($tpl);
return;
}
if ($template && file_exists(TEMPLATE . '/' . $this->view->_style . '/' . $template))
$this->out($template);


out函数的作用就是包含模板,由于函数很长我就不贴上来了。
往上看我们发现这个

$template变量

通过查询archive得来,

$this->view->archive = archive::getInstance()->getrow(front::get('aid')); //aid 取值
if (!is_array($this->view->archive))
$this->out('message/error.html');
if ($this->view->archive['checked'] < 1)//必须通过审核
exit(lang('未审核!<a href="'.front::$from.'">返回</a>'));
if (!rank::arcget(front::get('aid'), $this->view->usergroupid)) {
$this->out('message/error.html');
}
//........省略
$template = @$this->view->archive['template'];


我们在找找有没有插入的点
lib\default\manage_act.php add_action函数

if(front::post('submit') &&$this->manage->vaild()) {
$this->manage->filter();
$this->manage->save_before();
front::$post['checked']=0;
front::$post['userid']=$this->view->user['userid'];
front::$post['username']=$this->view->user['username'];
front::$post['author']=$this->view->user['username'];
front::$post['adddate']=date('Y-m-d H:i:s');
front::$post['ip']=front::ip();
$data=array();
$fieldlimit=$this->_table->getcols(front::$act=='list'?'user_manage':'user_modify');
$fieldlimits=explode(',',$fieldlimit);
foreach(front::$post as $key=>$value) {
if(preg_match('/(select|union|and|load_file)/i',$value)){
//echo $value;
exit('非法参数');
}
if(in_array($key,$fieldlimits))
$data[$key]=$value;
}
$data=array_merge($data,front::$post);
$insert=$this->_table->rec_insert($data);//直接插入但审核状态无法更改。


这样关键我们都能操纵了。
还有几处可以注射的点 但也是鸡肋不能获取太多数据,不能使用select等,也说下。
\lib\default\comment_act.php add_action 函数

function add_action() {
if(front::post('submit') &&front::post('aid')) {
if(config::get('verifycode')) {
if(front::post('verify')<>session::get('verify')) {
alertinfo('验证码错误。', front::$from);
}
}
if(!front::post('username')) {
alertinfo('请留下你的名字!', front::$from);
}
if(!front::post('content')) {
alertinfo('请填写评论内容!', front::$from);
}
//。。。省略
$comment->rec_insert(front::$post);
$archive->rec_update('comment=comment+1',front::post('aid'));//可以引入sql语句,但过滤if|select|ascii|from|sleep ,所以鸡肋。

1234.png


http://127.0.0.1:81/web/CmsEasy/index.php?case=comment&act=add
(post)
submit=1&aid=1 OR 1#'&username=1&content=12311'

漏洞证明:

3.png

123.png

修复方案:

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2015-09-29 10:43

厂商回复:

漏洞Rank:2 (WooYun评价)

最新状态:

暂无


漏洞评价:

评论