exploiut-db:
/ L7 ]5 f, m; U5 C! e( P, f) P! a$ `9 |. q
FCKEditor ASP Version 2.6.8 File Upload Protection Bypass
+ A7 r+ N9 u# J% Q5 O) w3 B- k/ d8 x# W
- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass
* y2 R9 O1 {( @( q% Z- Credit goes to: Mostafa Azizi, Soroush Dalili- x+ n4 _' `1 ~
- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
# x# |) M. T8 \- K5 }* f3 D- Description:" |0 M( Z, Q1 w5 W2 S
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is S( q" C0 G+ ]9 o5 d
dealing with the duplicate files. As a result, it is possible to bypass; _6 `$ ?. G% y2 m( y
the protection and upload a file with any extension." w& e8 ^$ M3 W0 _
- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/
4 u9 l8 b! s( N0 Q- Solution: Please check the provided reference or the vendor website.. K2 E6 v+ s: o) G+ z; n- u( ~
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720) J; U+ A- p6 X4 A3 |8 e
"
0 j# M" r; W+ b% j3 D; d- |Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:
& Y" q0 _2 y0 \/ UIn “config.asp”, wherever you have:
1 r# v* u7 S- J0 _! g ConfigAllowedExtensions.Add “File”,”Extensions Here”
% S% w9 {' ^ sChange it to:
* h& \; f |1 I4 \0 P ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”5 N4 E; s3 \0 P' Y$ S
2 v* h0 a& @( [5 ?' d0 b
9 B/ ^0 y6 R, ~! `
! u( E/ o5 M9 i, m# K6 I
- N1 O" x8 R# T. b4 _% y6 X( P5 }& R+ E- a" ?1 n8 v
php测试无效
( @1 }3 u: j3 k' h) H7 @' }7 n5 |asp/aspx测试成功:1 n/ ]' T `" n& ^/ L; G
来到/FCKeditor/editor/filemanager/connectors/test.html+ z. c+ p5 T# K6 J6 t$ ^& L1 \
因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
M! w& d+ @6 a3 {1 }9 U& ]1 T' l1 h% W& F" v
burpsuite上传包并修改,repeater5 V5 i" Z; j7 V' `* a* n" r2 f) `
名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp
$ S* C4 `! ~, `2 t9 s4 u: B: _; {4 |% u [+ x! W# ?/ q8 I
如图,webshell为:http://localhost/userfiles/file/asd(1).asp* `* Z% D$ T; q0 Z% |
( ^, c. J) |. x% b2 _ |