首页 > 其他 > 详细

哈希长度扩展攻击(Hash Length Extension Attack)利用工具hexpand安装使用方法

时间:2017-10-15 00:09:17      阅读:416      评论:0      收藏:0      [点我收藏+]

去年我写了一篇哈希长度扩展攻击的简介以及HashPump安装使用方法,本来已经足够了,但HashPump还不是很完善的哈希长度扩展攻击,HashPump在使用的时候必须提供original_data,近来的哈希长度扩展攻击的题目已经不提供original_data,从原理上来说也不一定需要这个original_data,所以今年pcat又来写一篇hexpand的安装使用方法,鉴于时间关系,本人只在kali下测试。

--------------------------------------------------------------------

1. 安装pkg-config

https://pkg-config.freedesktop.org/releases/

目前最新版pkg-config-0.29.2.tar.gz

wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
tar -xzvf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2/
./configure --with-internal-glib && make && make install

 

2. 安装OpenSSL开发包

apt-get install libssl-dev

 

3. hexpand的安装

git clone https://github.com/amlweems/hexpand
cd hexpand
make

 

4. 报错Package openssl was not found in the pkg-config search path.

搜索本机pkgconfig文件夹的openssl.pc、libssl.pc、libcrypto.pc,并将这3个文件复制到/usr/lib/pkgconfig/下,然后

export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH

再去进行hexpand的编译

 

5. hexpand的使用方法

在hexpand所在目录(当然你也可以把文件复制到/usr/bin/里)

./hexpand -t md5 -s 21232f297a57a5a743894a0e4a801fc3 -l 5 -m "pcat"

其中-l的5是哈希原文的长度,运行后就会得到附加数据,以及新得到的哈希值。

 

哈希长度扩展攻击(Hash Length Extension Attack)利用工具hexpand安装使用方法

原文:http://www.cnblogs.com/pcat/p/7668989.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!