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

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

博客园 - luoluo

各地电信运营商插广告赚钱,北京联通也不甘落后 幻影t-shirt 2010 新年 每天都是GDP CorelDraw工具自动切换到选择工具的问题 要淡定 flash 0day的临时防御 Still Believe 实现JavaScript匿名透明递归 发现一篇关于flash垃圾回收机制的文章 开春第一趟单骑上妙峰 杭州归来 IE window对象跨域的一些特性 firebug也支持debugger关键字了 网上流行的JS HTMLDecode不安全 把JS函数转URL形式 看到的一点进步 北京春雪 记忆力衰退
也谈Server Limit DOS的解决方案
luoluo · 2009-04-25 · via 博客园 - luoluo

最近Planet上关于这个话题有了很多的探讨,关于解决方案,我和刺茄子云舒Kevin他们在群里都有过讨论,这两天又对apache的处理机制进行了简单的分析,到现在思路也渐渐的清晰了。

解决方式有三种,一是WEB服务器端解决,二是客户端解决,三是在中间层解决。

1、WEB服务器端解决以Apache为例,首先会想到rewrite或者apache module或者,但是测试会发现rewrite和普通的dso module都不行,因为apache在这之前就错误返回了;于是乎查资料找更早的介入方式,发现ap_hook技术可以在很多环节插入代码, 还有apache input filter也是能在较早的地方进行输入过滤,但是都失败了;最后翻代码分析发现Apache处理头之后如果有错误的话是直接返回的,所以除了修改Apache源代码,在Apache层面是没法解决的。

2、客户端解决,也比较容易想到定制400错误页面,里面写JS来清COOKIE,但是问题同上定制的页面内容也是无法返回到客户端的。还有就是客户端软件了,对于网站来说,没有这种能力。

3、云舒提到Iptables之类的介于客户端和服务器端之间的七层过滤的东东,没有测过。Kevin提出用Squid的方式也可以归入这一类,我也没有侧过,但是Squid基本也可以看做是个Web服务器。

本来Web服务器设置这个限制是防止对Web服务器的DOS的,结果反而导致了对客户端DOS的可能,说到底就是一个单选题,选择Server容易被DOS还是Client容易被DOS,那么Apache选择了前者。Kevin说这根本上是浏览器的问题,因为浏览器没有遵守相关标准中关于Cookie大小的限制。的确,理想的状态就是服务器端和客户端在最大的请求头上达成一致,但是目前来看如果没有造成较大的危害的话,无论是浏览器方面还是WEB服务器方面都不会轻易调整。

所以总的来说,这个问题是个难题,预计最终的解决将会由它所造成的危害推动。