配置 modsecurity 来限制参数数量?
我刚刚读到了名为 HashDoS 的新技术 DoS。 有关详细信息,https: //cryptanalysis.eu/blog/2011/12/28/ effective-dos-attacks-against-web-application-plattforms-hashdos/
此 DoS技术 POST 大量参数并触发哈希表算法的更坏情况。 Web 服务器将花费更多时间来完成这项工作。
他们说:
因此您可以让大约 10,000 个 Core i7 CPU 核心忙于处理 PHP 使用千兆位互联网连接的请求。或者用于 ASP.NET,30,000 个 Core2 CPU 内核,或 Java Tomcat 100,000 个 Core i7 CPU 内核,或者对于 CRuby 1.8 1,000,000 Core i7 CPU 内核,可以保留 忙于单个千兆位连接。
因此,我想限制我公司网站的 POST 内容中的参数数量。 我知道 modsecurity 可以做到这一点,但我不熟悉 modsecurity。
提前致谢。
I have just read about new technique DoS that called HashDoS.
Details about it, https://cryptanalysis.eu/blog/2011/12/28/effective-dos-attacks-against-web-application-plattforms-hashdos/
This DoS technique POST a large number of parameter and trigger worse case of hashtable algorithm. Web server will take more time to do the job.
They said:
So you can keep about 10.000 Core i7 CPU cores busy processing PHP
requests using a gigabit internet connection. Alternatively for
ASP.NET, 30,000 Core2 CPU cores, or for Java Tomcat 100,000 Core i7
CPU cores, or for CRuby 1.8 1,000,000 Core i7 CPU cores, can be kept
busy with a single gigabit connection.
So, I want to limit number of parameter in POST content for my company website.
I know modsecurity can do that, but I'm not familiar with modsecurity.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Modsecurity 可以限制参数的总长度,但不能限制参数的数量。最近有一个模块更新了此功能(处于测试阶段):ModIrier:http:// yoyo.org/~steve/mod_ifier.html
Modsecurity can limit the total length of, but not the number of, parameters. There is a module that has recently been updated with this feature (it's in beta): ModIfier: http://yoyo.org/~steve/mod_ifier.html
我花了一些时间来了解 modsecurity。
然后我发现 OWASP Modsecurity 核心规则集,在文件 modsecurity_crs_23_request_limits.conf 中有一个规则限制请求中的参数数量。
在我公司的网络服务器上,也使用modsecurity核心规则,但没有这个文件。我不知道为什么 :(
你可以在这里看到它(从第 30 行开始):
http://mod-security.svn.sourceforge.net/viewvc/mod-security/crs/tags/2.2.3/base_rules/modsecurity_crs_23_request_limits.conf?revision=1882&view=markup
I took some time to understand modsecurity.
Then I found OWASP Modsecurity Core Rule Set, in file modsecurity_crs_23_request_limits.conf there was a rule that limited number of arguments in a request.
On my company webserver, using modsecurity core rule too, but there's not have this file. I don't know why :(
You can see it here (from line 30):
http://mod-security.svn.sourceforge.net/viewvc/mod-security/crs/tags/2.2.3/base_rules/modsecurity_crs_23_request_limits.conf?revision=1882&view=markup
您可以在这里找到一篇介绍 mod_security 选项的精彩文章:http://blog.spiderlabs.com/2012/01/modsecurity-mitigations-for-aspnet-hashtable-dos-vulnerability-cve-2011-3414.html
You can find a great article that describes mod_security options on defending this here : http://blog.spiderlabs.com/2012/01/modsecurity-mitigations-for-aspnet-hashtable-dos-vulnerability-cve-2011-3414.html