exploiut-db:4 O2 F. _ R y4 I( _. l* Z
r+ V" m+ W2 k9 v- cFCKEditor ASP Version 2.6.8 File Upload Protection Bypass
- @7 f) i7 ]( y2 O! O, w) R
( I* x" M4 M- j5 i- Title: FCKEditor 2.6.8 ASP Version File Upload Protection bypass! n! r9 \6 @4 K( J2 p l5 f" a, d* m
- Credit goes to: Mostafa Azizi, Soroush Dalili
9 Q& b- s9 j6 y+ o- Link:http://sourceforge.net/projects/fckeditor/files/FCKeditor/
' o$ v7 p- O- @. y- P- Description:# f2 g1 G2 s$ Z2 r. @+ U
There is no validation on the extensions when FCKEditor 2.6.8 ASP version is& {6 s. ?4 ?. \8 {$ N4 v7 _
dealing with the duplicate files. As a result, it is possible to bypass! p3 w- x& Y1 o& b/ {
the protection and upload a file with any extension.
1 o4 r3 F- o3 M3 r, [3 q+ F, y- T: H- Reference: http://soroush.secproject.com/blog/2012/11/file-in-the-hole/) x% j+ {7 O6 b( v+ \0 n! z6 z
- Solution: Please check the provided reference or the vendor website.) X0 Q5 {0 D9 w% z
- PoC:http://www.youtube.com/v/1VpxlJ5 ... ;rel=0&vq=hd720
& B4 O2 {% c q5 ?; t; s2 L, F"5 p. B! ~4 I z% z- u
Note: Quick patch for FCKEditor 2.6.8 File Upload Bypass:0 U9 {* w4 m: k
In “config.asp”, wherever you have:
5 v% N* `. G; ^4 Q ConfigAllowedExtensions.Add “File”,”Extensions Here”
; d8 H) w+ |: y' {& ?. [8 ? p" x3 NChange it to:
' E# q @3 s8 x5 T) F ConfigAllowedExtensions.Add “File”,”^(Extensions Here)$”
9 c, a' f# m# n4 ?7 J
# D5 k6 P- x9 \, @. o( J* [ , H/ u3 F- V u4 t) ]
* [3 [ C& o" \: q2 p2 m# d3 z
' ^% p6 b* X6 \+ n. U1 V# R6 A* e* b& s: D5 F4 r# A; u2 w
php测试无效# i8 a: `. w! \+ V3 _
asp/aspx测试成功:
. m1 W9 i" a. |, R; R5 ?* [来到/FCKeditor/editor/filemanager/connectors/test.html
8 H* [/ U/ [; o- ?因为结合了之前二次上传的漏洞,所以先上传任意内容的文件:asd.asp.txt
/ T; H9 v3 u- R" R9 D r, _& u5 c! u5 z4 k
burpsuite上传包并修改,repeater
$ c' z g, s' r0 z& i' w名字改为asd.asp%00txt 然后把%00专为URL编码上传后得到asd(1).asp- A5 Z0 o& {4 A4 P* \
; x% z1 t3 Y. a! @
如图,webshell为:http://localhost/userfiles/file/asd(1).asp
9 n+ F2 l& H- S- \' q0 q6 y" N8 i$ d: N9 u; o, U- |2 Z, h
|