exploiut-db:* F, D3 ~0 [; j* E# [7 y
" k- F, y6 u4 X1 t# j: G. c3 t
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass7 P* j. A3 R4 Z/ ~) G: r2 W: }
. S& E. `9 q9 R3 B# R
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
. ?9 C) s9 V, G9 a$ E R! M$ T- Credit goes to: Mostafa Azizi, Soroush Dalili4 C; T- y$ [ u/ X, k
- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
( ?$ k0 q# v1 @) S, g- Description:- f7 l) ?' R: b+ b D! l
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
- a% c7 C) l2 V' xdealing with the duplicate files. As a result, it is possible to bypass
' I* ?6 K9 S5 P' V5 O; o' H! Lthe protection and upload a file with any extension.# d1 }# L9 A% C; Z: s. x& u/ I
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/. p8 T2 _" D$ M: y u4 }- y; o$ I3 Q
- Solution: Please check the provided reference or the vendor website.$ r5 c' b) z z4 H2 f% X+ b7 ?
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720, ?( v5 x% X' e% V0 s& C; Y8 l/ K
"
+ }5 [* A F5 p3 G+ M8 ^% T3 w" |9 Z, RNote: Quick patch for FCKEditor 2.6.8 File Upload Bypass:4 D7 \% c% } a' N3 W9 z: p$ y9 N
In “config.asp”, wherever you have:
% O: ~- ^, ]) d0 S/ L7 d5 ]% z ConfigAllowedExtensions.Add “File”,”Extensions Here”" Y4 c" V5 j/ C( k, Y$ ]
Change it to:
; D0 N" U# K- n( g ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”" O8 }' d% R) [: ]# l( I+ B1 l9 A# U
8 T% o( E' {( u# L" w- W 4 N; f+ Y* f8 J4 }
/ M9 D. J! w- j: g) n3 }) r
3 r: U+ u+ a6 q/ Y0 F3 V& {8 x$ G; _: Q# n
php测试无效2 [! ?- ^+ ^6 C; a. {3 s
asp/aspx测试成功:4 D9 ^+ {7 K: Z" r: Y5 X
来到/FCKeditor/editor/filemanager/connectors/test.html
4 s* Y; U- X$ I! [/ k8 t因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt2 Q. U9 u( J! H y* T- b2 H
! u+ h' h3 t6 a1 \+ m9 M/ }0 m# e( Wburpsuite上传包并修改,repeater* @. S7 g; \3 O V* k6 @- H6 g ~" @
名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp) j4 i9 k6 U/ h3 i. g7 m
9 D6 o% N% B; H3 w6 B如图,webshell为:http://localhost/userfiles/file/asd(1).asp
% P! O |- x) |; P0 |; Z+ z0 l/ R) K T0 o
|