中国网络渗透测试联盟

标题: 最新FCKEditor ASP上传绕过漏洞 [打印本页]

作者: admin    时间: 2012-12-10 10:18
标题: 最新FCKEditor ASP上传绕过漏洞
exploiut-db:+ Z! O8 k2 c9 u' A: O

/ E- C; v# y* E- i; L: }FCKEditor ASP Version 2.6.8 File Upload Protection Bypass
' A; n( e  N; N/ h
, ]/ `' ^0 d& @7 O* K9 O- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
( f# }1 B- Y6 X5 y; a3 b) b# a  B- Credit goes to: Mostafa Azizi, Soroush Dalili
1 s# q% W, x5 Z  Q* }* d/ A- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/8 K2 y: `) |3 K
- Description:
4 d- C1 g4 C6 R9 [There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
- s, h8 I! o0 d4 w0 y5 ^2 B& ^dealing with the duplicate files. As a result, it is possible to bypass
, U. _9 E* q5 C" r' d2 ^$ a* _the protection and upload a file with any extension.$ |( H% T: S3 B, y$ R! [. `' p2 _/ Y
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
0 M# T6 X& P1 q- Solution: Please check the provided reference or the vendor website.: b+ m+ \# }; U9 F. h
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720
: O  @( y0 \& O"4 G$ \/ B1 [" E$ }) }2 u  h# g. {
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:
$ I$ W, H2 @+ \+ T8 B1 G- zIn “config.asp”, wherever you have:9 O3 R) e% Q  |; ^% I
      ConfigAllowedExtensions.Add    “File”,”Extensions Here”
, f9 a: ^; w9 K$ \" |3 ~Change it to:
& D9 O: f9 Y9 ?+ \8 s# h      ConfigAllowedExtensions.Add    “File”,”^(Extensions Here)$”
) g, E) Q+ q, ^1 o6 y; \3 p
# ?, l+ k: c. l' k
0 O$ p6 E& k: b9 d) N4 L( w( k
; [3 v& T' J& _ + h. m; _2 p' p2 h& _, j/ g
: e2 v5 p+ P" _8 j' U  N
php测试无效( z! e3 g/ Y) Q/ H
asp/aspx测试成功:: h+ C' h' `" l: N7 n" [
来到/FCKeditor/editor/filemanager/connectors/test.html
) D' B0 |6 \: i4 L! Y因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
3 F$ `; h. h- H, D& o) |2 E' T6 [9 o% ~( G
burpsuite上传包并修改,repeater
) X% h3 O; R' w3 L! ]( [1 r, K, a名字改为asd.asp%00txt    然后把%00专为URL编码上传后得到asd(1).asp
: ]9 M9 G+ T$ y( V5 }
# E: z8 K0 x8 U  w4 \如图,webshell为:http://localhost/userfiles/file/asd(1).asp" z1 G* m/ M0 i4 {8 b! D  e
! D5 {: E7 y* e





欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2