[转]轻松搞定 RAR、Zip压缩包密码!Hashcat +john the ripper

原文地址

用到的两个工具:

1.hashcat :https://hashcat.net
2.john the ripper :https://www.openwall.com

解密RAR只需用到2个命令:

rar2john.exe xxxx.rar   –获取hash值
hashcat.exe -m 13000 -w 4 -a 3 $rar5$16$b88c1d7d2c96dc9d1b1a5ccdc5c25d50$15$8f0b287c982535c868bbff486ee9acd2$8$43907bfa03430471 -o password.txt  — 开始

更多的参数说明:
hash值类型参考表

针对Word密码的命令:

python office2john.py test.docx                 获取word加密文件的Hash指令(此处需要安装python并配置环境变量)
test.docx:$office$*2013*100000*256*16*561f4dcaaac333e7c06d150f9ea5aea2*ef4e7b026217124561ecb865b324eac4*e9ef4a859f2c81581db0e27d9ce48e6451b82cd1641941e8adc10dc5600969cb                                所得Hash返回结果
hashcat.exe -m 9600 -a 3 $office$*2013*100000*256*16*561f4dcaaac333e7c06d150f9ea5aea2*ef4e7b026217124561ecb865b324eac4*e9ef4a859f2c81581db0e27d9ce48e6451b82cd1641941e8adc10dc5600969cb ?d?d?d?d -o out.txt                 Hashcat破解对应hash

针对PDF密码的命令:

perl pdf2john.pl test.pdf                       获取pdf加密文件的Hash指令(此处需要安装perl并配置环境变量)
test.pdf:$pdf$4*4*128*-3904*0*16*55f913d20e34724fd70d3004f5e43166*32*7a29310ea5dc0276d34c1bef24595d61984a08eb759eaba56bd4887a260bbcce*32*de0c200bbe6887a980dc429edbdabc40f39a368841d804afefa726b2bd7c7b24   所得Hash返回结果
hashcat.exe -m 10500 -a 3 $pdf$4*4*128*-3904*0*16*55f913d20e34724fd70d3004f5e43166*32*7a29310ea5dc0276d34c1bef24595d61984a08eb759eaba56bd4887a260bbcce*32*de0c200bbe6887a980dc429edbdabc40f39a368841d804afefa726b2bd7c7b24 ?l?l?l?l?l?l -o out.txt  Hashcat破解对应hash,此处?l对应一个小写字母

针对Zip密码的命令:

zip2john.exe test.zip                            获取zip加密文件的Hash指令
test.zip/test.txt:$pkzip2$1*1*2*0*15*9*4aac42f3*0*26*0*15*4aac*470b*6fa72c2bc69e5738181cb7f406187f8084ce07cf5f*$/pkzip2$:test.txt:test.zip::test.zip                                              所得Hash返回结果
hashcat -a 0 -m 17210 $pkzip2$1*1*2*0*15*9*4aac42f3*0*26*0*15*4aac*470b*6fa72c2bc69e5738181cb7f406187f8084ce07cf5f*$/pkzip2$ password.txt --force
    password.txt中存放密码字典

提醒:运行John the Ripper需要安装python和perl环境变量,如果命令出错,请自行下载安装python和perl

perl:http://www.activestate.com/activeperl
python:https://www.python.org

此外用到GPU加速需要安装驱动:

AMD GPUs on Linux require "RadeonOpenCompute (ROCm)" Software Platform (3.1 or later)
AMD GPUs on Windows require "AMD Radeon Adrenalin 2020 Edition" (20.2.2 or later)
Intel CPUs require "OpenCL Runtime for Intel Core and Intel Xeon Processors" (16.1.1 or later)
NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or later)

END

你可能感兴趣的:([转]轻松搞定 RAR、Zip压缩包密码!Hashcat +john the ripper)