exploiut-db:
& s& f, M2 j6 t3 x- @$ k( @& n. _6 F% \" ]/ R7 X, d3 [
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass
5 \/ _; a8 ^* a5 P4 q7 q* P. x
# S Y+ O; O0 y* N, k- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass9 j' g4 Y; D% i1 T) e) F3 Q0 ?8 V' \
- Credit goes to: Mostafa Azizi, Soroush Dalili
6 A- w* h% M/ H$ o1 ~. P9 z- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
7 w( O7 C; t: |* ~- Description:" S8 \- N4 L# f2 N4 D0 c" c
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
8 d% \, w( U2 f( N) k fdealing with the duplicate files. As a result, it is possible to bypass
, s: g; x7 h% z* dthe protection and upload a file with any extension.* U! y6 y# p# o/ h
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
" u" f1 j( | X2 _$ @$ H- Solution: Please check the provided reference or the vendor website.
( V2 h6 x9 v3 \$ h$ k0 p& |- q/ \- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720, v" f/ K U) k1 s/ V/ P6 W; n2 k1 P
"+ ~ o+ j/ U" Z8 q+ h& f
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:. k" \- P: v1 w1 r
In “config.asp”, wherever you have:8 u) Z7 y/ q; x/ T: T
ConfigAllowedExtensions.Add “File”,”Extensions Here”
* k, u" ~ Z3 b. IChange it to:
1 z( p, B# n: B+ e W3 l ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”' i8 R) {& B4 K/ F, n+ P6 q2 E0 [
n+ u6 n& B7 o+ M2 h2 Y 2 J1 h& _2 y3 h! T
& ~1 \! T8 q$ C2 h- X* l
; z4 {! S) Y+ T/ [7 d1 z
9 w) X$ ]! X7 b. a; sphp测试无效' Z! B9 m9 ^+ W( O# t D
asp/aspx测试成功:
) m' v$ L" @' [; ]- h5 z' `来到/FCKeditor/editor/filemanager/connectors/test.html8 I9 b: J0 k" Q4 ?, P- Y! G
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
3 d1 d. J( G- `* ?% w/ S
. r0 P: K" S& f3 \8 eburpsuite上传包并修改,repeater
! p$ f* }2 C2 H% L名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp' Q$ l* Q3 {4 B
9 d7 o& ^4 T' k2 r o7 @
如图,webshell为:http://localhost/userfiles/file/asd(1).asp
" l+ J! @9 y& |3 q5 l
6 }" J, M. U: Z' \3 a |