exploiut-db:
6 x& f6 J8 B% j! N6 C- e
# W, J/ O. Q' o$ o2 jFCKEditor ASP Version 2.6.8 File Upload Protection Bypass/ }, O" W* f- P$ b$ I
* H. T7 {8 H( @3 T3 b; y- M9 E: }
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass/ O$ m& Q5 s* D
- Credit goes to: Mostafa Azizi, Soroush Dalili
; [! z* ^2 [' H- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/' o. F7 d+ M- s6 z( k2 Y
- Description:- Z, t# q! S' w0 k# x
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
; x# j0 f! u: N! W* `dealing with the duplicate files. As a result, it is possible to bypass
) g7 [4 L& ^4 |7 B) p o) Cthe protection and upload a file with any extension.
( A* e7 \* q d/ w2 H7 t) b& K- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
$ N8 Z1 @: `1 `3 X8 F N7 z- Solution: Please check the provided reference or the vendor website./ C7 Y7 {) D G0 h6 O$ M5 g
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720
6 T" H0 }, t* ^% t( v- f; R; h"* }9 ?7 ?- h) n `8 p
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:8 `, ]5 G) X3 d! [, \7 V
In “config.asp”, wherever you have:
6 U; ` A3 Y8 p* S0 T! `) S ConfigAllowedExtensions.Add “File”,”Extensions Here”
( }/ d. U; ~0 Z8 z8 \, FChange it to:
; r7 c. q/ k" h9 V0 M ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”
- E3 ^3 B r$ b+ ?( R. _4 E5 f0 X- }. m$ [6 S2 j
P& W( r+ R8 p% D, z
# {. j4 C' |2 y) A
. P* l: [9 _* i$ s, H; N* a) k1 s/ q8 l( B4 x; k
php测试无效
7 N: S# U4 M) B5 }asp/aspx测试成功:" g6 g5 t% V l7 ^# H: f
来到/FCKeditor/editor/filemanager/connectors/test.html. E7 T9 p6 F1 Q) i! d% N
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
6 H$ Y# Q' h" Q/ N8 ^* ]. K- B$ H: n; G
burpsuite上传包并修改,repeater/ D% M# w" r0 U, A% G7 u% G
名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp
+ z# X) L8 y4 |2 z' A8 f1 I) W+ y0 S2 i6 G3 i
如图,webshell为:http://localhost/userfiles/file/asd(1).asp& B& P# U; k0 k b4 P6 U3 m
8 ~+ J0 s8 P! ~/ D% \- C |