exploiut-db:
* B2 R) q) F) D# E& z! i1 w! P/ x! I
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass) n- v, Z t6 H( {( x+ S: ?1 i
' q& ~' x: d' O; X- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
" z3 j8 c) [9 K% N- Credit goes to: Mostafa Azizi, Soroush Dalili; B8 P9 W( X' Z# f* x- c8 o0 j
- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/. q) y3 H1 G: @7 B# D7 y
- Description:4 o3 d( d' a3 ?1 m1 W- }0 [
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
& j2 b6 L; O5 \1 `# S9 ~: ]4 _; edealing with the duplicate files. As a result, it is possible to bypass
) k- E* Y- `* U2 B8 f: ythe protection and upload a file with any extension.9 s/ e! I8 P6 S5 \7 b. d
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
, p2 p# ]2 \+ S- ?( B, v- Solution: Please check the provided reference or the vendor website.# E+ b8 B9 v" g
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720
4 J0 e! M5 m2 a. `' U; S"
' T- p+ k: f' F2 z' D8 HNote: Quick patch for FCKEditor 2.6.8 File Upload Bypass:6 X5 g; `4 d4 j1 H5 k
In “config.asp”, wherever you have:; V( p+ g5 h: e) R0 X1 p% s( F
ConfigAllowedExtensions.Add “File”,”Extensions Here”
! X& \2 o; @* h% [+ ? O: [( e+ dChange it to:
+ U6 ?: V, R" a0 Q# e ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”2 d5 n+ y- |! f Y4 g
; z$ Q5 a9 Z( ^' o' M1 z
6 Q$ O" H1 Z* f( Q4 \
/ R! q, \' @5 C* ^) Z% W5 k( H4 S $ D9 o4 k/ d' w) b; Y6 f1 P1 j
8 `: \2 i% T3 M( y" e6 O' Rphp测试无效" H2 M& g, j4 o, O+ i6 c- O
asp/aspx测试成功:0 z4 \/ s6 v; `: W* P: X5 K
来到/FCKeditor/editor/filemanager/connectors/test.html1 x8 l& Q- J, v& c \. @: w
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
# Z6 g9 |9 F2 v( {- C) L2 x4 Q) Y: Q2 X
burpsuite上传包并修改,repeater
9 T C) z& I# {( }名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp& a. l% `1 S# ?6 F9 |- h1 r' \7 X
/ v l$ h) H5 t1 S+ G! z+ h- l
如图,webshell为:http://localhost/userfiles/file/asd(1).asp) @5 v- ^, }2 W' \
5 F3 Z7 G4 q7 F7 B; X1 j Q5 z |