惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

博客园 - live-evil

写给那些ASP.NET程序员:网站中的安全问题 Ajax 安全工具 微软近日发布了三个免费SQL INJECTION检测工具 Enterprise Library 写给设计人的10个jQuery特效 - live-evil - 博客园 SQL注入攻击-来自微软安全博客的建议 用Dos命令进行加锁 防止病毒格式化硬盘 MembershipUser.IsOnline属性 FCKEditor for .NET. Nmap Techniques 希望所有的人都平安 端口复用小示例 DataReader Deom2_NextResult DataReader Demo. RssPageDemo. DataTable Demo. RSS技术实现(asp.net) 'sys' is undefined 错误. ASP.NET页面传值的方法
FCKEditor编辑器安全配置
live-evil · 2009-01-03 · via 博客园 - live-evil

给那些被骇客通过编辑器的上传漏洞挂马和存在上传漏洞的程序员们.

如果你的网站使用了FckEditor编辑器还没有进行正确的配置是很容易被别人通过上传得到webshell,下面我就分享一下我在用Fckeditro时一点技巧.

环境:vs2005

首先在vs中配置Fckeditor编辑器。

关于Fckeditor下载后的文件请参考:

http://www.cnblogs.com/downmoon/archive/2008/05/23/1205784.html

在Fckeditor 2.6.3前的版本中 在 fckeditor"editor"filemanager"connectors"aspx"config.ascx 文件中的上传验证没有安全的验证就直接可上传,在后续的版本中修改这个地方,必须得用手动设置

private bool CheckAuthentication()

   {

      // WARNING : DO NOT simply return "true". By doing so, you are allowing

      // "anyone" to upload and list the files in your server. You must implement

      // some kind of session validation here. Even something very simple as...

      //

      //   return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );

      //

      // ... where Session[ "IsAuthorized" ] is set to "true" as soon as the

      // user logs in your system.

      return false;   <-- true

   }

返回值为true.

但是这样是不安全的。

参考http://www.cnblogs.com/downmoon/archive/2008/05/23/1205784.html

fckeditor 可以从地址栏直接输入漏洞地址还可上传文件。

解决方法很简单就是在用户登录时加入是否可上传文件的Session标志。其实Fckeditor已经写好了。直接把验证函数CheckAuthentication()中的注释段中

return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );

注释去掉。在登录成功加入Session[IsAuthorized] = true;就可以了。

如果网站没有用到上传到服务器的文件浏览的话把fckeditor"editor"filemanager 中的browser 目录也删除。