中国网络渗透测试联盟

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

作者: admin    时间: 2012-12-10 10:18
标题: 最新FCKEditor ASP上传绕过漏洞
exploiut-db:
( S* O3 G, r# h# b" V& v' h# U- H. n0 C: D2 n2 _2 B0 U
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass
: ]4 g) H+ J" ]! e' }& ~. B; Q" |& k/ ~3 \: q- T$ w, [
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass- Y/ U( D5 R3 ^$ Z3 O, D
- Credit goes to: Mostafa Azizi, Soroush Dalili
1 _" u9 }7 A2 X+ E, x- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
5 s1 P2 P6 ^  a% V, ?- Description:4 F- p7 {0 M; q' k# S
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is
& n7 f; Y& x/ S. Q! tdealing with the duplicate files. As a result, it is possible to bypass5 @: k! r" @6 D
the protection and upload a file with any extension.
/ \: S! S, ]/ D- v& `. v- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/: C6 Z. N. X2 b5 c
- Solution: Please check the provided reference or the vendor website.. c# l* u' m1 b" u; G* w
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720! D( ~4 ~, D  f2 l% m# F/ i" L
": F6 V; C' J0 q
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:
1 R; B7 {6 b: `/ `" ?8 ?In “config.asp”, wherever you have:. }& @6 o: O( ^0 ]3 z
      ConfigAllowedExtensions.Add    “File”,”Extensions Here”
5 {# [- i7 Z; R: R/ b: OChange it to:
% c" j# L4 _8 ~4 I      ConfigAllowedExtensions.Add    “File”,”^(Extensions Here)$”
+ n; @3 ^  N2 k6 r( x
9 {! |9 b1 e" n3 B9 M  L
7 ~) H, C5 w; U( Q; q
8 h5 X0 m( |& B5 R1 ^
+ S; H2 {6 g' J$ S% `& {5 }0 P0 K2 g+ `
php测试无效  f* O  [( y% P, [
asp/aspx测试成功:+ f7 F* b$ e& D) z0 n  e5 X$ K
来到/FCKeditor/editor/filemanager/connectors/test.html
' `$ `3 [/ O5 V因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt/ M  a8 w3 ]0 D2 i
6 ]+ Q! u! v; R' i" _2 ~- Z
burpsuite上传包并修改,repeater
2 d9 O' o9 N5 e名字改为asd.asp%00txt    然后把%00专为URL编码上传后得到asd(1).asp4 e( h1 X" @+ ?2 J% |% p
6 Y3 F  ?; N! s1 l3 ]7 N9 {+ I
如图,webshell为:http://localhost/userfiles/file/asd(1).asp
: f7 X$ N% K: A* P! s7 x; v0 M. o! N3 i, D4 i" y4 R





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