exploiut-db:0 I' t4 c) T' X1 ~
' @) H- M0 i7 _! y, i& l# CFCKEditor ASP Version 2.6.8 File Upload Protection Bypass3 U. b- J' |1 k* k* W6 ?3 C4 \8 b
$ l! R' Q* a5 u
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass) ?5 J# E0 F, N0 Y4 t
- Credit goes to: Mostafa Azizi, Soroush Dalili3 q1 j2 Q, d3 N/ K! k! f
- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
" o7 `- P, c5 X+ Q$ T- Description:3 M6 Z% ^1 c% R9 ]
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is$ F1 L6 d, N; E1 ~7 V( z2 _8 [
dealing with the duplicate files. As a result, it is possible to bypass! C" x* @ z6 X) Z [4 K' ~' h
the protection and upload a file with any extension.
I; h/ E* B- R; |- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
: D& a0 ~9 H* Q5 V- Solution: Please check the provided reference or the vendor website.
2 j" m' D2 x8 X+ u4 M5 r/ o, Y' e- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720) [0 ?3 }, X8 _9 I8 |
"8 E2 {! ~% A) X7 W K9 ?
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:0 m9 @6 Q' G o% k9 a
In “config.asp”, wherever you have:5 ?3 M1 c# ^( F2 y4 w
ConfigAllowedExtensions.Add “File”,”Extensions Here”0 b1 v' I% i4 B7 b
Change it to:
, i% i! m4 y$ Q. r' J ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”! V+ ~4 O, a. O; W5 H$ q3 |
9 |# ^4 D+ `, K" k- b& t / }) \" T" I9 G" p O+ m/ x
. | Y' l$ ~- W, c! V8 ~8 y& H# h
; D2 \& m! A' C
- o8 _, A) v5 }# [4 rphp测试无效
. I# M" H1 I, ~8 E# d& b3 d: Nasp/aspx测试成功:
* Q4 D% f: s7 ] e& P+ F来到/FCKeditor/editor/filemanager/connectors/test.html
2 Q+ h# ~* ^/ Y/ E5 s: A因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
+ l- w# `0 {: A, z+ Y" p- G. |
x4 P" E1 X5 Jburpsuite上传包并修改,repeater
1 C( h' y) y% s' ]; j4 s* l名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp0 Y2 i7 q" U, X- f, J4 s" U
6 _' p: P5 ?/ Z# k* J1 O) R Y如图,webshell为:http://localhost/userfiles/file/asd(1).asp
4 [4 v7 y z4 T) n: f* @9 o0 e4 k% K
|