mantis配置远程文件包含命令执行漏洞

漏洞信息详情

mantis配置远程文件包含命令执行漏洞

漏洞简介

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” target=”_blank”>
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” target=”_blank”>
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” target=”_blank”>
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” target=”_blank”>
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” target=”_blank”>
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” target=”_blank”>
http://mantisbt.sourceforge.net/download.php3

参考网址

来源: XF
名称: mantis-configinc-var-include(9900)
链接:http://www.iss.net/security_center/static/9900.php

来源: BID
名称: 5509
链接:http://www.securityfocus.com/bid/5509

来源: DEBIAN
名称: DSA-153
链接:http://www.debian.org/security/2002/dsa-153

来源: BUGTRAQ
名称: 20020819 [Mantis Advisory/2002-05] Arbitrary code execution and file reading vulnerability in Mantis
链接:http://marc.theaimsgroup.com/?l=bugtraq&m=102978711618648&w=2

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享