what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

QuiXplorer 2.41beta LFI / Traversal / Code Execution

QuiXplorer 2.41beta LFI / Traversal / Code Execution
Posted Dec 18, 2009
Authored by Juan Galiana Lara

QuiXplorer versions 2.4.1beta suffer from a remote code execution vulnerability due to being susceptible to local file inclusion and directory traversal issues.

tags | exploit, remote, local, code execution, file inclusion
SHA-256 | a3afd7e0520ee57c295c801fdb5fbffbe8ff9efc2f0571f48aac4570e60b32da

QuiXplorer 2.41beta LFI / Traversal / Code Execution

Change Mirror Download
=============================================
INTERNET SECURITY AUDITORS ALERT 2009-003
- Original release date: March 2nd, 2009
- Last revised: December 17th, 2009
- Discovered by: Juan Galiana Lara
- Severity: 9/10 (CVSS scored)
=============================================

I. VULNERABILITY
-------------------------
QuiXplorer <= 2.4.1beta standalone and as a Mambo/Joomla component
'lang' parameter Remote Code Execution Vulnerability.

II. BACKGROUND
-------------------------
QuiXplorer is a multi-user, web-based file-manager. It allows you to
manage and/or share files over the Internet, or an Intranet.
It's currently available in many languages and with GPL and MPL
licenses and referred in other open source projects.

III. DESCRIPTION
-------------------------
QuiXplorer is prone to a local file include and directory traversal
vulnerability because the application fails to sufficiently sanitize
user-supplied input. The parameter 'lang' is not properly sanitized.
Since the application allows to upload files to the server could be
combined with previous vulnerabilities to allow an attacker to execute
arbitrary code remotely in the context of the webserver. This may aid
in launching further attacks.

In order to perform the attack, an attacker could upload a PHP
malicious code (upload action is allowed by the application), then
exploit a bug to know the full path to the local file recently
uploaded (if 'display_errors' directive is set to On) and then include
it exploiting the local file include and directory traversal flaw
(using ../../path/to/file) to finally execute the PHP code.
Successfully exploitation of this flaw may aid in the compromise of
the server in the context of the webserver.

IV. PROOF OF CONCEPT
-------------------------
Here is the affected code:

80 // Get Language
81
if(isset($GLOBALS['__GET']["lang"]))$GLOBALS["lang"]=$GLOBALS['__GET']["lang"];
82
elseif(isset($GLOBALS['__POST']["lang"]))$GLOBALS["lang"]=$GLOBALS['__POST']["lang"];
83
//------------------------------------------------------------------------------
84 // Necessary files
85 ob_start(); // prevent unwanted output
86 require "./.config/conf.php";
87 if(isset($GLOBALS["lang"])) $GLOBALS["language"]=$GLOBALS["lang"];
88 require "./_lang/".$GLOBALS["language"].".php"; <----- HERE
89 require "./_lang/".$GLOBALS["language"]."_mimes.php"; <----- HERE

Here is a poc:
PoC: https://site/path/?lang=../path/to/malicious_uploaded_code

Exploiting this bug is possible to include PHP files, allowing to
execute any arbitrary code code he want.
Also is possible to hide the crafted parameters data including it
through POST method, making detection more difficult to site
administrator.

About the full path disclosure, if the webserver has the show_errors
directive set to 'On', try:

https://site/path/?lang=no_exists

And the application return:

Warning: require(./_lang/no_exists.php) [function.require]: failed to
open stream: No such file or directory in
/var/www/quix/.include/init.php on line 88
Fatal error: require() [function.require]: Failed opening required
'./_lang/no_exists.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/quix/.include/init.php on line 88

Revealing the path to the home directory of the filemanager

V. BUSINESS IMPACT
-------------------------
An attacker could view any file or execute arbitrary code remotely
into the context of the webserver.

VI. SYSTEMS AFFECTED
-------------------------
All version of QuiXplorer are affected.
At the moment <= 2.4.1beta.

VII. SOLUTION
-------------------------
As developers give no response we add the mitigation for its solution.
To patch only change this lines...

From:
81 if(isset($GLOBALS['__GET']["lang"]))
$GLOBALS["lang"]=$GLOBALS['__GET']["lang"];
82 elseif(isset($GLOBALS['__POST']["lang"]))
$GLOBALS["lang"]=$GLOBALS['__POST']["lang"];

To:
81 if(isset($GLOBALS['__GET']["lang"]))
$GLOBALS["lang"]=basename($GLOBALS['__GET']["lang"]);
82 elseif(isset($GLOBALS['__POST']["lang"]))
$GLOBALS["lang"]=basename($GLOBALS['__POST']["lang"]);

Parsing the parameters with basename() function the flaw its fixed.

And to prevent the full path disclosure...

From:
88 require "./_lang/".$GLOBALS["language"].".php";
89 require "./_lang/".$GLOBALS["language"]."_mimes.php";

To:
88 if(file_exists("./_lang/".$GLOBALS["language"].".php")) require
"./_lang/".$GLOBALS["language"].".php";
89 else require "./_lang/en.php";
90 if(file_exists("./_lang/".$GLOBALS["language"]."_mimes.php"))
require "./_lang/".$GLOBALS["language"]."_mimes.php";
91 else require "./_lang/en_mimes.php";

VIII. REFERENCES
-------------------------
https://sourceforge.net/projects/quixplorer/
https://www.isecauditors.com

IX. CREDITS
-------------------------
This vulnerability has been discovered
by Juan Galiana Lara (jgaliana (at) isecauditors (dot) com).

X. REVISION HISTORY
-------------------------
March 02, 2009: Initial release.
December 17, 2009: Last revision.

XI. DISCLOSURE TIMELINE
-------------------------
March 02, 2009: Vulnerability acquired by
Internet Security Auditors (www.isecauditors.com)
March 03, 2009: QuiXplorer contacted. No answer.
December 13, 2009: QuiXplorer contacted again. No answer.
December 17, 2009: Sent to lists with remediation proposal.

XII. LEGAL NOTICES
-------------------------
The information contained within this advisory is supplied "as-is"
with no warranties or guarantees of fitness of use or otherwise.
Internet Security Auditors accepts no responsibility for any damage
caused by the use or misuse of this information.
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close