Home > php教程 > php手册 > body text

PHP5.2.*防止Hash冲突拒绝服务攻击的Patch

WBOY
Release: 2016-06-21 08:52:00
Original
809 people have browsed it

  由我前面的俩篇文章介绍(通过构造Hash冲突实现各种语言的拒绝服务攻击, PHP数组的Hash冲突实例 ), 这个攻击方法危害很高, 攻击成本也很小. 一个台式机可以轻松搞垮数十台, 上百台服务器.

  而和Pierre沟通后, 官方开发组不会为此发布PHP 5.2.18, 但是目前还是由不少公司还在使用5.2, 所以我特将dmitry为5.4写的patch, 分别apply到5.2上.

  大家如果有用5.2的, 如果被此类攻击威胁, 可以打上下面的patch, PHP5.3的, 可以考虑升级到5.3.9, 已经包含了此patch(因为5.3.9目前是RC状态, 所以如果不愿意升级, 也可以参照这个patch自己为5.3写一个):

https://github.com/laruence/laruence.github.com/tree/master/php-5.2-max-input-vars

  补充一下(2012年1月8日): 如果你使用的是Windows下的PHP, 或者其他原因导致你不方便采用打patch的方法, 也可以采用修改PHP的配置max_input_time为一个较小的值来缓解此类攻击带来的影响.

  另外, 其他语言java, ruby等, 请各位也预先想好对策, 限制post_size是治标不治本的方法, 不过可以用来做临时解决方案.

  本文地址: http://www.laruence.com/2011/12/30/2440.html



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!