暴力破解文件密码
破解软件下载
1.hashcat:https://hashcat.net
2.john the ripper :https://www.openwall.com
注:官网是英文的,可以通过谷歌浏览器翻译成中文
步骤
需要在cmd中用到两个命令
先将需要破解密码的rar文件放到john the ripper文件夹中
在john the ripper文件夹中打开cmd–获取hash值
rar2john.exe xxxx.rar将获取的hash值copy到txt
将获取的hash值替换掉下面代码中的$rar$......
在hashcat文件夹中打开cmd并用一下命令
hashcat.exe -m 13000 -a 3 $rar5$16$b88c1d7d2c96dc9d1b1a5ccdc5c25d50$15$8f0b287c982535c868bbff486ee9acd2$8$43907bfa03430471 -o password.txt
-m 指定要破解的hash类型,如果不指定类型,默认为MD5,
-a 指定要使用的破解模式,其值参考后面的参数"-a 0"字典攻击,"-a 1"组合攻击,"-a 3"掩码攻击
-o 指定破解成功后的hash及所对应的明文密码存放位置,可以用它把破解成功的hash写到指定的文件中
其他参数
针对Word密码的命令:
python office2john.py test.docx 获取word加密文件的Hash指令(此处需要安装python并配置环境变量)
test.docx:$office$201310000025616561f4dcaaac333e7c06d150f9ea5aea2ef4e7b026217124561ecb865b324eac4*e9ef4a859f2c81581db0e27d9ce48e6451b82cd1641941e8adc10dc5600969cb 所得Hash返回结果
hashcat.exe -m 9600 -a 3 $office$201310000025616561f4dcaaac333e7c06d150f9ea5aea2ef4e7b026217124561ecb865b324eac4*e9ef4a859f2c81581db0e27d9ce48e6451b82cd1641941e8adc10dc5600969cb ?d?d?d?d -o out.txt Hashcat破解对应hash此处?l对应一个小写字母
针对PDF密码的命令:
perl pdf2john.pl test.pdf 获取pdf加密文件的Hash指令(此处需要安装perl并配置环境变量)
test.pdf:$pdf$44128-390401655f913d20e34724fd70d3004f5e43166327a29310ea5dc0276d34c1bef24595d61984a08eb759eaba56bd4887a260bbcce32de0c200bbe6887a980dc429edbdabc40f39a368841d804afefa726b2bd7c7b24 所得Hash返回结果
hashcat.exe -m 10500 -a 3 $pdf$44128-390401655f913d20e34724fd70d3004f5e43166327a29310ea5dc0276d34c1bef24595d61984a08eb759eaba56bd4887a260bbcce32de0c200bbe6887a980dc429edbdabc40f39a368841d804afefa726b2bd7c7b24 ?l?l?l?l?l?l -o out.txt Hashcat破解对应hash,此处?l对应一个小写字母
针对Zip密码的命令:
zip2john.exe test.zip 获取zip加密文件的Hash指令
test.zip/test.txt:$pkzip2$11201594aac42f30260154aac470b6fa72c2bc69e5738181cb7f406187f8084ce07cf5f$/pkzip2$:test.txt:test.zip::test.zip 所得Hash返回结果
hashcat -a 0 -m 17210 $pkzip2$11201594aac42f30260154aac470b6fa72c2bc69e5738181cb7f406187f8084ce07cf5f$/pkzip2$ password.txt --force
password.txt中存放密码字典
提醒:运行John the Ripper需要安装python和perl环境变量,如果命令出错,请自行下载安装python和perl
perl:http://www.activestate.com/activeperl
python:https://www.python.org
Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /www/wwwroot/blog.3333366.xyz/usr/themes/farallon/comments.php on line 4
Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/wwwroot/blog.3333366.xyz/usr/themes/farallon/comments.php on line 4