hash冲突导致ddos,详细跟踪
来源:互联网 发布:淘宝怎么拒收 编辑:程序博客网 时间:2024/05/17 06:38
1<?php
2$size = 4;
3$array = array();
4for ($key = 0, $maxKey = ($size - 1) * $size; $key <= $maxKey; $key +=$size) {
5 $array[$key] = 0;
6 }
通过打印p *execute_data->opline->handler可以获得
ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER
//初始化数组
ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER
zend_fetch_dimension_address
zend_fetch_dimension_address_inner
if(zend_hash_index_find(ht, index, (void **) &retval) == FAILURE) {
zend_hash_index_update(ht,index, &new_zval, sizeof(zval *), (void **) &retval);
}
zend_hash_index_update最终走的是
_zend_hash_index_update_or_next_insert
去掉插入之前的zend_hash_index_find
插入 65536 个恶意的元素需要 29.089669942856 秒
插入 65536 个普通元素需要 0.018018960952759 秒
执行以后发现仅降低了一般,还有29秒
另外的时间耽搁在了
在插入之前还有一次hash查找进行update的过程,并把指针指向当前index的链表结尾
_zend_hash_index_update_or_next_insert 函数里面
问题
插入array的时候两次调用了hash查找是否重复了,zend_fetch_dimension_address_inner里面zend_hash_index_find有没有必要?(存在查找到key值就不再进行插入的情况?)
参考 http://www.laruence.com/2011/12/30/2435.html
- hash冲突导致ddos,详细跟踪
- 通过PHP的hash冲突漏洞进行DDoS攻击
- 通过PHP的hash冲突漏洞进行DDoS攻击
- 通过PHP的hash冲突漏洞进行DDoS攻击
- hash ddos攻击
- HASH冲突
- hash冲突
- Hash冲突
- Hash冲突
- Hash冲突
- Hash表、Hash冲突
- DDOS专题详细讲解
- Hash表和Hash冲突
- hash冲突处理
- hash表冲突解决方法
- 解决hash冲突
- hash冲突解决
- 哈希(hash)表冲突
- 重启Oracle的方法(win7)
- 查看SqlServer数据库连接状态
- Beej’s Guide Network to Programming 系列连载18
- (转)hadoop 命令手册
- gridview
- hash冲突导致ddos,详细跟踪
- sql substring 用法
- HDU1254 推箱子 BFS+优先队列
- WindowsAPI的时间结构体、时间转换及时间获取
- 搜索
- 【那些年,我们一起追的女孩】第六章
- android学习笔记17:文字设置
- 博文视点有奖答题第二题:青蛙跳台阶问题
- General overview of architecture of TI's Davinci 8168 SoC