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

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

缺陷编号:wooyun-2014-051165

漏洞标题:EasyTalk SQL注入导致后台登录绕过

相关厂商:nextsns.com

漏洞作者: xfkxfk

提交时间:2014-02-17 13:43

修复时间:2014-05-18 13:44

公开时间:2014-05-18 13:44

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

EasyTalk SQL注入导致后台登录绕过

详细说明:

漏洞存在文件:/Admin/Lib/Action/LoginAction.class.php:

public function dologin() {
parent::toadmin();
$user_name=$_POST['username'];
$password=$_POST['password'];
$authcode=trim($_POST['authcode']);
if (!$user_name || !$password || !$authcode || $authcode!=$_SESSION['authcode']) {
$this->redirect('/Login/index');
exit;
}
if (ET_UC==TRUE) {
list($uid, $username, $password, $email) = uc_user_login($user_name,$password);
if($username && $uid>0) {
$user = M("Users")->where("user_name='$username' AND isadmin=1")->field('user_id,user_name')->find();
if($user) {
Cookie::set('adminauth', authcode("$user_name\t$user[user_id]",'ENCODE'));
echo '<script>parent.location.href="'.SITE_URL.'/admin.php?s=/Index"</script>';
} else {
$this->redirect('/Login/index');
}
} else {
$this->redirect('/Login/index');
}
} else {
$password=md5(md5($password));
$user = M("Users")->where("user_name='$user_name' AND password='$password' AND isadmin=1")->find();
if($user) {
Cookie::set('adminauth', authcode("$user_name\t$user[user_id]",'ENCODE'));
echo '<script>parent.location.href="'.SITE_URL.'/admin.php?s=/Index"</script>';
} else {
$this->redirect('/Login/index');
}
}
}


user那么和password都没有过滤,导致SQL注入。

漏洞证明:

登陆是构造如下请求,验证码一定为当前验证码:

1.png


成功登陆:

2.png

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2014-02-17 14:16

厂商回复:

已修复,感谢作者

最新状态:

暂无