hash collision vulnerability of popular web server-side technology

http request headers are typically parsed by the web server as a hash table. If the technology in use has a deterministic hashing scheme, it's vulnerable to hash collision based DOS attack.

No matter how we choose our hash function, it's always possible to devise a set of keys that will hash to the same slot, making the hash scheme perform poorly. This is the basic idea behind hash collision based DOS attack.

To circumvent this, we can "randomize" the choice of hash function. In other word, we change the hash schema from

    h = hash(key)

to h = hash(key, r), where r is a random number.

The random input r is used to choose from a family of hash functions, and the input key is fed into that hash function. Therefore the hash schema in all is a randomized hash schema with respect to the input key.

For more info on this vulnerability, see http://www.nruns.com/_downloads/advisory28122011.pdf

Microsoft published an adivsory on this issue as well, http://technet.microsoft.com/en-us/security/advisory/2659883

 

The idea of "universal hashing" is to design a family of hash functions, each of them is a well-defined hash function. 

For integers a popular one is h(k) = (a*k + b) mod p, where p is a predefined prime integer and a, b are randomly chosen modular p integers.

for more on universal hashing (e.g. hashing family for strings) see http://en.wikipedia.org/wiki/Universal_hashing 

转载于:https://www.cnblogs.com/qsort/archive/2013/01/13/2859055.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值