exploiut-db:) P" k( X& @1 N5 u; n2 r9 L9 F
9 K! G! y% z" k" Y& C% q5 G
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass
7 m2 S0 F) ?0 D- u6 `+ y' o4 p
. V5 m. E& j8 t4 [- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
1 Z5 m+ g% U, T6 l% K! K- Credit goes to: Mostafa Azizi, Soroush Dalili
7 D+ r& }5 }: I8 s5 @- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/) \: D9 s7 {9 D% v8 ~* }3 e
- Description:# t. O( a7 k% P' I; i9 n
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is' [' Y# C/ ?9 _- E- [, g0 u& l: `
dealing with the duplicate files. As a result, it is possible to bypass
1 |: @4 L( X5 qthe protection and upload a file with any extension.9 |$ h6 g7 W/ Y
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
, j3 d! r4 f0 E, B- Solution: Please check the provided reference or the vendor website.1 H6 ?- y. k5 {( I+ ?7 ?5 i1 J" i# u
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd7205 n+ Z% r7 d$ e8 q" d$ T/ U
"6 j- g2 ]' [. |" `. J8 O' Z
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:
5 l! S( b9 @$ ]' wIn “config.asp”, wherever you have:
+ x- e! W, P$ k8 y# z: {+ h ConfigAllowedExtensions.Add “File”,”Extensions Here”
, O; |, T% b. l' n5 sChange it to:+ T' G4 [1 X2 E. t
ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”7 ?0 q5 f5 Y: ~; Y1 x* V1 G7 W
6 V a) Q- e+ K, R6 i% y G
8 T5 o4 _' D3 i& x" p( Y6 ^3 w5 q; \, J1 n& @* s' n# Q9 ]
: m& O& h: J* ^- H. @% E% ^: Z
, Q4 g) A1 h/ |% j
php测试无效
$ G2 h# r" ~# u2 y6 b/ t. F5 S2 gasp/aspx测试成功:# ?/ p& n& \ u0 V( ^5 X; N
来到/FCKeditor/editor/filemanager/connectors/test.html+ R7 M' E: \% u8 P0 h8 k8 L1 M
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt9 E6 Z4 M) W; {3 ^$ V
4 a- k# l7 [6 ?, Kburpsuite上传包并修改,repeater
* R, N3 U& R+ m名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp
, e- f/ r, B0 B/ Z' S8 _, P9 i# L
4 f. S* ^: H4 }/ y( a6 `如图,webshell为:http://localhost/userfiles/file/asd(1).asp
- `$ i, x! e/ `0 d
, q. {0 j6 P) f- x5 L/ X% y |