exploiut-db:. x1 t6 O1 \1 L0 T7 b
4 j9 Z; _6 l, e
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass
( w7 M$ _4 E# g0 X+ T5 M( E+ y- s K- @" d' v* E
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass2 ^, n) q6 B4 {7 y
- Credit goes to: Mostafa Azizi, Soroush Dalili& U2 Q7 Z6 ?! k! j* z
- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
7 N; x" z# k% u% [- Description:: C6 K" ?! f7 _5 l
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
8 g+ N9 a7 ^2 i$ r' C, Q- }' D/ t' Ddealing with the duplicate files. As a result, it is possible to bypass0 v0 F7 j% w$ N- e L3 a! _
the protection and upload a file with any extension.
: D6 d m, M* {1 ]9 r- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
0 K) Z& A: F; y+ _/ T3 |& Y ]- Solution: Please check the provided reference or the vendor website.
3 @" E0 q3 q" z3 ~% J- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720
" i; }( Z7 Q p, ^1 t9 H, H"1 g9 ]7 _6 W# X) l# u b+ y
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:
8 ]) Z6 M' T9 I1 i2 NIn “config.asp”, wherever you have: P9 e% N* ?! k# \* Q
ConfigAllowedExtensions.Add “File”,”Extensions Here”
' a1 L: D, a0 e. l7 l. j" PChange it to:) B) E4 Q/ v9 Z' r9 P
ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”
/ P) G& p( P8 W& @6 t) ^: _2 S5 z# p6 r# D% y5 I% J
4 B5 a y+ v8 M% i3 S) J- v
: n0 K. r. K8 b% E, v( E- G
' E8 g3 p q" C, J& I) n
# s. b. d( A; s% Yphp测试无效1 R2 q$ W/ [$ i. q3 \' F2 ?0 l
asp/aspx测试成功:
* f1 S1 o( j* C4 g来到/FCKeditor/editor/filemanager/connectors/test.html% z8 P! B3 B1 Q. E
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
+ [, ~4 Z9 L* F# p ~0 ?5 P4 P9 V m Y9 u0 u
burpsuite上传包并修改,repeater
5 A8 m, N" h8 M; g! A名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp% B& G& z Y8 K* l2 R5 K7 a- D
: ^* v8 z* [) L- q2 D Q# Q
如图,webshell为:http://localhost/userfiles/file/asd(1).asp# \; I& N& `7 t, f5 p7 F; y8 ?
: v$ V7 g$ i6 R" g: V4 t |