Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Exploits-HackingTools
[Top] [All Lists]

[UNIX] PHP Globals Filtering Bypass

Subject: [UNIX] PHP Globals Filtering Bypass
Date: 2 Feb 2006 10:56:17 +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 

- - - - - - - - -



  PHP Globals Filtering Bypass
------------------------------------------------------------------------


SUMMARY

Improper global parameters handling within PHP allows attackers to 
overwrite existing data.

DETAILS

Vulnerable Systems:
 * PHP version 4.3.10 and prior
 * PHP version 5.0.5 and prior
 * PHP version 5.1.1
 * PHP version 5.1.2

By using a global variable in PHP attackers can overwrite the content with 
it's own as following:

Proof of Concept:
foorbar.php:
< ? echo $foobar; ? >

On address bar do the following:

http://[address]/foobar.php?GLOBALS[foobar]=hello

If the poc prints out HELLO your PHP version is vulnerable.

Please note that the PHP globals must be on in order to be vulnerable.

Workaround:
Register global off will fix. This PHP code will mitigate this bug.

// put this code before everything
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($_POST['GLOBALS']) ||
    isset($HTTP_POST_FILES['GLOBALS']) || isset($_FILES['GLOBALS']) ||
    isset($HTTP_GET_VARS['GLOBALS']) || isset($_GET['GLOBALS']) ||
    isset($HTTP_COOKIE_VARS['GLOBALS']) || isset($_COOKIE['GLOBALS'])) {
 trigger_error('Is this a GLOBAL GPC hacking attemp?', E_USER_ERROR);
}

Disclosure Timeline:
20060119 Bug discovered
20060119 Internal release
20060125 Initial release (only on ush.it)
20060127 Initial release (only on sikurezza.org)
20060128 Public release


ADDITIONAL INFORMATION

The information has been provided by  <mailto:ascii@katamail.com> ascii.
The original article can be found at:  
<http://www.ush.it/2006/01/25/php5-globals-vulnerability/> 
http://www.ush.it/2006/01/25/php5-globals-vulnerability/



======================================== 


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. 




<Prev in Thread] Current Thread [Next in Thread>
  • [UNIX] PHP Globals Filtering Bypass, SecuriTeam <=