


有时候可能会忘了自己的文件密码,那就可能需要暴力破解了
既然暴力破解,那就最好是能利用GPU的算力的工具
HashCat系列软件在硬件上支持使用CPU、NVIDIA GPU、ATI GPU来进行密码破解。在操作系统上支持Windows、Linux平台,并且需要安装官方指定版本的显卡驱动程序,如果驱动程序版本不对,可能导致程序无法运行。
HashCat主要分为三个版本:Hashcat、oclHashcat-plus、oclHashcat-lite。这三个版本的主要区别是:HashCat只支持CPU破解。oclHashcat-plus支持使用GPU破解多个HASH,并且支持的算法高达77种。oclHashcat-lite只支持使用GPU对单个HASH进行破解,支持的HASH种类仅有32种,但是对算法进行了优化,可以达到GPU破解的最高速度。如果只有单个密文进行破解的话,推荐使用oclHashCat-lite。
几乎支持所有加密算法公开的格式。当然,既然是暴力破解,速度就不快。
工具:
hashcat:底部提供Windows版
https://github.com/hashcat/hashcat
John the Ripper:底部提供Windows版
https://github.com/openwall/john
过程:
用John the Ripper中的工具获取hash,然后用hashcat破解。
以zip文件为例:
用john软件获取hash (其它类型文件需要找对应的,比如rar就应该用rar2john.exe),
命令行界面类似于
john-1.9.0-jumbo-1-win64\\run> zip2john.exe C:\\Users\\用户名\\Downloads\\xmpan.zip
得到的类似于
ver 2.0 xmpan.zip/p.jpg PKZIP Encr: cmplen=32479781, decmplen=33117655, crc=75D6287 ver 2.0 xmpan.zip/password.txt PKZIP Encr: cmplen=20, decmplen=8, crc=50FE386B mjj.zip:$pkzip2$2*1*1*0*8*24*075d*0583*e66dc60ce74f030d6f2d728f935371a65ed330e47733e8d8f5502d4e6e249956d0f8222d*2*0*14*8*50fe386b*1ef9a48*2a*0*14*50fe*029c*96c9ccc46ba49b9b924a36e7036567cb460303e0*$/pkzip2$::333.zip:password.txt, p.jpg:C:\\Users...
其中的
$pkzip2$2*1*1*0*8*24*075d*0583*e66dc60ce74f030d6f2d728f935371a65ed330e47733e8d8f5502d4e6e249956d0f8222d*2*0*14*8*50fe386b*1ef9a48*2a*0*14*50fe*029c*96c9ccc46ba49b9b924a36e7036567cb460303e0*$/pkzip2$
就是我们要的hash
然后用hashcat软件
命令行界面类似于
D:\\Program Files\\hashcat-6.2.4> hashcat.exe -a 3 -m 17225 $pkzip2$2*1*1*0*8*24*075d*0583*e66dc60ce74f030d6f2d728f935371a65ed330e47733e8d8f5502d4e6e249956d0f8222d*2*0*14*8*50fe386b*1ef9a48*2a*0*14*50fe*029c*96c9ccc46ba49b9b924a36e7036567cb460303e0*$/pkzip2$ --increment --increment-max=9
其中 -a 3 代表指定破解模式为穷举模式, -m 指定文件类型为17225 因为这里是 $pkzip2$ , –increment 代表自动增加位数 –increment-max=9 代表最大到9位 。
具体参数可以根据需要,还有掩码等等的设置信息, 从 下面找,
https://hashcat.net/wiki/doku.php?id=hashcat
https://hashcat.net/wiki/doku.php?id=mask_attack
等着执行就可以,最后得到类似于
$pkzip2$2*1*1*0*8*24*075d*0583*e66dc60ce74f030d6f2d728f935371a65ed330e47733e8d8f5502d4e6e249956d0f8222d*2*0*14*8*50fe386b*1ef9a48*2a*0*14*50fe*029c*96c9ccc46ba49b9b924a36e7036567cb460303e0*$/pkzip2$:699nun9x Session..........: hashcat Status...........: Cracked Hash.Mode........: 17225 (PKZIP (Mixed Multi-File)) Hash.Target......: $pkzip2$2*1*1*0*8*24*075d*0583*e66dc60ce74f030d6f2d...kzip2$ Time.Started.....: Thu Sep 30 10:19:12 2021 (7 mins, 56 secs) Time.Estimated...: Thu Sep 30 10:27:08 2021 (0 secs)
其中Status………..: Cracked 代表已找到密码,上面的 699nun9x 即为密码
下载地址


请登录后发表评论
注册