<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[FCKeditor 富文本编辑器漏洞通告]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Tue, 28 Apr 2009 10:12:14 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	FCKeditor 2.6.4 released 之前版本，全部存在严重漏洞，请立即检查您的服务器、程序中是否调用了FCKeditor编辑器，如果存在，请升级到 2.6.4 released版本。 <br/>如果不需要上传功能，请将上传功能相关文件删除，如果需要上传功能，请严格限制上传文件后缀，并配置目录权限，禁止上传目录的PHP、ASP、JSP执行权限。 <br/><br/> <br/><br/>我们发现在一些产品中集成了带有严重漏洞的 FCKeditor 富文本编辑器。请管理员和程序员自查自己的系统、程序。 <br/><br/> <br/><br/>下月开始，系统部将对服务器上的 FCKeditor 进行专项扫描，届时如果发现仍然存在漏洞的FCKeditor，将对相关责任人进行相应处理。 <br/><br/> <br/><br/> <br/><br/>FCKeditor是一款流行的富文本编辑器,还支持强大的文件上传功能,可以工作在asp,aspx,php,perl,python等脚本环境,由于用户多 <br/><br/>功能强大,所以也成为了黑客重点攻击对象。 <br/><br/> <br/><br/>一些程序员喜欢将某个版本的FCKeditor打包,每次程序都调用这个版本,一些程序也会直接集成该编辑器,往往这种习惯都 <br/><br/>导致将一个旧版本的编辑器嵌入到了程序中. <br/><br/> <br/><br/>漏洞示例(asp下): <br/><br/>http://www.xxx.com/admin/FCKeditor/editor/filemanager/browser/default/browser.html?Type=../&Connector=connectors/asp/connector.asp <br/><br/>将type改为../,这样将跳出目录文件类型的限制,还可以进行目录遍历. <br/><br/>即使做了不让跳转,配合服务器的一些缺陷也可以得到webshell,比如Windows2003服务器使用fckeditor建立一个xx.asp的目录,那么向 <br/><br/>这个目录下上传任意文件,比如jpg(包含可执行脚本代码),都可以被服务器执行. <br/><br/>webshell地址: <br/><br/>http://www.xxx.com/shell.cer <br/><br/> <br/><br/>漏洞示例(jsp下): <br/><br/>查看配置和列出目录下的文件： <br/><br/>http://www.xxx.com/fckeditor/editor/filemanager/browser/default/connectors/jsp/connector? <br/><br/> <br/><br/>Command=FileUpload&Type=Image&CurrentFolder=%2F <br/><br/>webshell地址: <br/><br/>http://www.xxx.com/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector <br/><br/> <br/><br/>漏洞示例(php下): <br/><br/>fckeditor采用黑名单方式进行过滤,Windows下上传xxx.php+空格即可绕过检测. <br/><br/>另外PHP版本对媒体类型没有做任何限制,可以上传任意文件. <br/><br/> <br/><br/>以上漏洞均在最新版本(2.6.4)中解决,可以在http://www.fckeditor.net/download下载到最新版本. <br/><br/> <br/><br/> <br/><br/>另外一些fckeditor的设置,如果你不提供上传服务,或者有更好的上传方案,那删除掉目前的上传功能是非常必要而且彻底的!(删除FCKeditor&#92;editor <br/><br/> <br/><br/>&#92;filemanager). <br/><br/> <br/><br/>根目录下的fckconfig.js可以进行具体的设置,根据以下开关来限制上传的风险(多一种类型就多一种风险,没必要的请关闭) <br/><br/>FCKConfig.LinkBrowser = true; <br/><br/>FCKConfig.ImageBrowser = true ; <br/><br/>FCKConfig.FlashBrowser = true ; <br/><br/>FCKConfig.LinkUpload = true ; <br/><br/>FCKConfig.ImageUpload = true ; <br/><br/>FCKConfig.FlashUpload = true ; <br/><br/> <br/><br/>对你存储上传文件的目录,比如UserFilesPath = "~/UserFiles",禁止下面的脚本文件执行. <br/><br/> <br/><br/>新版本中提供这么个函数: <br/><br/>private bool CheckAuthentication() <br/><br/>&#123; <br/><br/>// WARNING : DO NOT simply return "true". By doing so, you are allowing <br/><br/>// "anyone" to upload and list the files in your server. You must implement <br/><br/>// some kind of session validation here. Even something very simple as... <br/><br/>// <br/><br/>// return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true ); <br/><br/>// <br/><br/>// ... where Session[ "IsAuthorized" ] is set to "true" as soon as the <br/><br/>// user logs in your system. <br/><br/> <br/><br/>return false; <br/><br/>&#125; <br/><br/> <br/><br/>去掉注释,写入 <br/><br/>try&#123; <br/><br/>return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true ; <br/><br/>&#125; <br/><br/>catch&#123;return false;&#125; <br/><br/> <br/><br/>在登录后台成功的地方写入session,Session["IsAuthorized"] = true;即可,这样就不会任何人都可以进行上传等操作了. <br/><br/> <br/><br/> <br/><br/>PS:FCKeditor检测路径关键字editor/filemanager, 另外fckconfig.js 是编辑器的配置文件,里面有允许&拒绝上传的文件类型配置等,这个文件基本不会 <br/><br/>&nbsp;&nbsp; 改名. <br/><br/>PS2:因为FCKeditor的广泛使用,黑客仍然会重点攻击该编辑器,所以不推荐使用该程序,建议使用内部开发的一些富文本编辑器<br/><br/>
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] FCKeditor 富文本编辑器漏洞通告]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>