exploiut-db:
/ `/ t, v2 H/ {
2 q8 S, W7 }5 \FCKEditor ASP Version 2.6.8 File Upload Protection Bypass5 Z( Y2 \+ y9 {+ l5 U
9 M- P5 d. h' B. O4 F, L2 I$ r; {
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass l. Z, G* r# ], r6 r
- Credit goes to: Mostafa Azizi, Soroush Dalili+ g& t1 _! \0 S8 y8 x
- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
6 t1 m* B r$ X' ]# W9 t( i! e- Description:
. C, O0 p1 f9 @$ s1 a% ?7 hThere is no validation on the extensions when FCKEditor 2.6.8 ASP version is4 ^, x* ?8 h- t3 G: Y! G
dealing with the duplicate files. As a result, it is possible to bypass8 y9 m. Z7 O) t
the protection and upload a file with any extension.: N" a/ r; K6 `! j" h8 R
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/$ I9 j: y N( k+ |% i: X4 L7 _
- Solution: Please check the provided reference or the vendor website.- V; N5 i% N8 R' `0 h
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720% U0 u; j; ~' x% _9 [ T
"" M6 f4 U. q" e) b0 l9 v9 o! t6 o$ V
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:) p) D9 K9 N* ]0 Z2 h' \* F
In “config.asp”, wherever you have:/ ^7 t9 m3 u/ d# ~3 G1 g
ConfigAllowedExtensions.Add “File”,”Extensions Here”
# f9 g' \2 \3 L; l8 `- F( qChange it to:: I% W$ n. w4 X# }- O. l
ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”
( v3 q9 _ b; w+ K+ y
. F! G9 e1 C3 @) m$ S" g; }5 T6 N 6 I, ~9 l+ Q6 D+ \3 i
. g+ n, H& D! z+ ?4 a( Q6 T
: u8 u! U/ |) n+ G
5 o% y! \! Z0 t* K3 I8 Fphp测试无效3 q- p. F s% h4 Q5 K1 a6 }. V, d
asp/aspx测试成功:
% T; s1 }# t; Z: u% N来到/FCKeditor/editor/filemanager/connectors/test.html; x, R1 S; N6 S) s7 E! j
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt# @: |% o7 D( R( k9 U& w& \5 b. E
- P6 k, h' T* S" P2 A aburpsuite上传包并修改,repeater4 H' o H( r; `- n7 p" T1 {4 d
名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp3 ?8 }7 u5 o! _$ `; M6 b; r; Q
3 k( X) g3 o0 ]& k, l如图,webshell为:http://localhost/userfiles/file/asd(1).asp
, `2 e9 f! O9 z9 W' d$ P
2 P6 d9 U+ U7 B2 I$ d0 I, [) E Z+ Y |