exploiut-db:6 F- j' u- p4 Q
) W& P: E: o) S5 o0 NFCKEditor ASP Version 2.6.8 File Upload Protection Bypass
2 A' Q; U+ ^* H, T
: J! j8 Z0 j0 F3 L- N' l- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
9 }, W* T4 [% z: I7 q5 S2 f5 b- Credit goes to: Mostafa Azizi, Soroush Dalili
- [* r( K& }. j) R/ y- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/: W" d" x P1 p
- Description:" Z6 Y# ~* R d* H: D& s7 c
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
. c# {# Y7 Z1 x7 r* h _dealing with the duplicate files. As a result, it is possible to bypass
: Q* [7 g; Y1 r2 Z1 d# r6 \the protection and upload a file with any extension.
6 s! ?( Y3 O' s" Q. i" O( O- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
# T6 i. E! Y- _$ H0 W* M5 @; ^) o y# L# u- Solution: Please check the provided reference or the vendor website.& F0 R- |# L0 W7 Y9 r8 W
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720. m6 U" ?5 X2 Z/ @6 V
" S3 _. `4 h8 _( [$ v; D* @! n
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:+ O( @2 v9 e" x( s$ Y8 w, r$ y" c* ^
In “config.asp”, wherever you have:6 ^$ J' ^, k. i/ g, v4 D- |
ConfigAllowedExtensions.Add “File”,”Extensions Here”. Y! }7 F9 B0 @8 @( ~( Q0 R: l+ q H
Change it to:
! d; L h. }7 F ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”" J' A, g- c8 G% f* b1 c8 L! C0 P4 c
7 M' |% G, Q$ E; }- y' [) V
) f8 Q/ a- k' c/ w3 j }. V7 i7 K5 S6 N$ g
- U( }# `1 y5 {9 q
5 w4 j7 Q2 z4 @7 [! n; E! z
php测试无效
9 j2 j# R2 A" w, K! F/ P( m* k- Gasp/aspx测试成功:
" z) x `9 c' ^8 D N来到/FCKeditor/editor/filemanager/connectors/test.html
" ^5 g, ^* C1 j3 E0 c2 T因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
) m8 u2 A' n1 `: F; w. D% S a3 U: r! t" ~
burpsuite上传包并修改,repeater& x9 A, J" Z6 H# }; U8 F$ B: |
名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp3 }5 D0 m+ G' m* r6 ~
5 Q) ~: G2 \# s3 t% [
如图,webshell为:http://localhost/userfiles/file/asd(1).asp+ V m, Y4 q! }) B" _; {
) b# |1 w7 J) M4 _' _4 S& K! k, m
|