exploiut-db:4 P4 ~4 l7 t; D, A
% P( z; Y/ M- |' D, g: XFCKEditor ASP Version 2.6.8 File Upload Protection Bypass
1 z6 U& {/ @# d) i$ @! R6 {- o2 A0 y; E
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
M, G, J+ }. a- Credit goes to: Mostafa Azizi, Soroush Dalili
# P" ^& L# g6 a1 }# F- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
: L/ N$ ^( w+ r- Description:+ j3 p7 ^3 |7 }2 X" Q8 e X- r% Y
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is$ j; Y% \4 A% K( W# e9 E" Z! _4 Q
dealing with the duplicate files. As a result, it is possible to bypass X- t" Y0 [8 K. Q9 n. N
the protection and upload a file with any extension.2 m6 f9 b' _8 s6 g- @9 q& I3 U+ e
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/; g; \* x8 [* l& w/ p
- Solution: Please check the provided reference or the vendor website.5 z* M: X- B, B/ P5 u) `
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd7200 d4 B, ^5 ]# c2 |# u+ Q$ P7 _
"/ @. T9 v. L: z5 g6 |
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:1 n5 ?4 j, j* U8 O
In “config.asp”, wherever you have:
' I/ P/ X$ {/ D) v7 E2 }/ L. N ConfigAllowedExtensions.Add “File”,”Extensions Here”
2 V: y) J" H% W, ?4 v7 `Change it to:( g3 w7 l! R# ?# ]
ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”9 T& M- H* R9 N' Z
" Y) k# {/ S7 K" E# Y. ]- n
6 U+ {- V+ O; T# m d6 q& M' _6 t' P& ^4 B
2 D8 @' G* O$ ~
! f2 ~3 Q: d, H% b4 A0 F- `; n( ]
php测试无效' Q- m+ u% m5 n! j
asp/aspx测试成功:/ t9 S0 Q5 R$ K. C9 l: N
来到/FCKeditor/editor/filemanager/connectors/test.html
# j/ e& U3 r. c$ H) B& `因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt+ L. I* C2 D B7 V) w' A! ~8 O' q
, T$ f! y. R8 S& x8 ? u# t
burpsuite上传包并修改,repeater% X: Z: d5 _8 F' _0 X h! A4 C7 V+ o
名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp* c5 S, C* Q: \! H) o8 [
, |4 r$ b/ m. o2 x+ B6 v+ q! ~6 x
如图,webshell为:http://localhost/userfiles/file/asd(1).asp
5 d: i" y1 `( m( y! P) ~8 l' m+ d* y5 L; S; ~1 r; A
|