exploiut-db:% F, u( L! ^) R9 }+ |1 l
6 v$ [" ]& |2 P8 A; I
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass
1 H: E7 r* [ O) w7 u$ f% \7 H# M0 x+ B; H& H b3 d
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
* {6 H B8 q% b+ n( g2 A/ g$ M3 @/ R Y- Credit goes to: Mostafa Azizi, Soroush Dalili
. { T: q* U4 {* n M: L- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
( W% r- Q# A3 h. [) Z* u" g- Description:/ u0 W" w9 }5 R3 \+ U+ ]( E' ?( v
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
0 [; w5 r. A, a8 ~, L# W: c+ Sdealing with the duplicate files. As a result, it is possible to bypass- Q0 m: w0 u; ^( t9 s
the protection and upload a file with any extension.5 C+ o3 y+ i3 ~+ j8 q$ N& G
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole// @; I3 |, i2 g W5 v8 P) J4 T
- Solution: Please check the provided reference or the vendor website.
" O5 `* N4 J) {4 |& h3 [$ L- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd7209 w- o0 F7 s2 S! N7 r2 W* z5 r0 }1 G
"
0 j# l1 Q t- A) a8 I* Z3 E; yNote: Quick patch for FCKEditor 2.6.8 File Upload Bypass:* b: w0 a1 ~/ P6 J% G f
In “config.asp”, wherever you have:
8 I% ?0 n: `/ i8 O( s9 X: y/ l ConfigAllowedExtensions.Add “File”,”Extensions Here”6 W. D. B/ H# R5 t7 O. }
Change it to:
- t1 _" _8 A9 l8 X ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”
6 E+ R M9 |( a' c1 ?( x$ ]
- g; L4 f( A3 i/ |# c; ? 8 \, H! F( @) M( S- c
7 D* p R1 }7 u$ \5 G/ t1 z
8 d1 v- z- R5 C4 ?: z+ C* l
+ X c6 ~6 w, ophp测试无效1 W9 ^. ?3 x+ ]4 \! Y
asp/aspx测试成功:
7 t- L' C# L. f' K8 Z$ L! [0 h来到/FCKeditor/editor/filemanager/connectors/test.html1 S; y! y( |: I' a' p5 `
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
, j3 ?' [5 w: G7 C; ?* N3 w3 q) h( _1 w! d- J7 q6 k' J, d
burpsuite上传包并修改,repeater
# r8 p4 E# _ p! A- J, F) z6 C5 V) {- ^名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp
@* h4 L3 P5 H( u# r V0 O/ J. K2 R: i4 s1 d/ [& z
如图,webshell为:http://localhost/userfiles/file/asd(1).asp5 _! _- k6 n+ D1 w
) \. t8 P; s% g, ]
|