[Share Experiences] 尝试john the ripper (john-1.9.0-jumbo-1)破解rar文件密码
Tofloor
poster avatar
青陆朱红
deepin
2023-01-14 08:00
Author

简要思路是:需要通过john the ripper (john-1.9.0-jumbo-1)内的部件rar2john 获得压缩文件的hash值,再通过john或者hashcat对hash值进行解密。

一、安装john the ripper

避坑:直接通过apt-get install 安装的是john-1.8.0版本,但是安装后没有找到rar2john这些部件,所以就直接导致无法应用于对rar文件的解密。

后面尝试了直接下载最新版john-1.9.0-jumbo-1,通过下载tar.gz文件【地址:https://download.openwall.net/pub/projects/john/】,解压后进入解压目录中的scr文件进行编译安装使用。

deepin系统下双击解压后可以先看下README.md,发现文档类都在doc,可以看看里面的INSTALL文件,获取安装编译说明。

截图_选择区域_20230113225719.png

在解压目录下右击空白处,选择打开终端,依次键入以下命令行,完成编译。

cd /src
./configure
make -s clean && make -sj4

再进入/run文件夹,进入命令终端,可以试试是否已经安装成功。

/run
./john --test

二、终端下运行rar2john,获得hash值,可以参考这篇文章 《John The Ripper(hash破解工具)-学习》

[rar file] 为rar需解密文件的路径 > [output file]为临时hash值存放的路径,不能使用中文名哦。

rar2john [rar file] > [output file]

三、在john的run目录下运行john对hash值进行破解,默认使用的破解字典是Proceeding with wordlist:./password.lst, rules:Wordlist

./john rar_hash.txt

破解好费时😴,老爷机跑不动,只能测试用用。还有就是解密字典

https://github.com/danielmiessler/SecLists/blob/master/Passwords/

四、可选择使用hashcat对hash值进行破解(这部分还没亲测,暂做记录,备查)

hashcat安装只需通过命令终端,执行apt-get 安装即可。

sudo apt-get install hashcat

如果安装后,想要卸载不玩了,也可以执行下列命令清除干净。

apt-get purge 是删除已安装的软件包(不保留配置文件),删除软件包,同时删除相应依赖软件包

apt-get autoremove 删除为了满足依赖而安装的,但现在不再需要的软件包(包括已安装包),保留配置文件;
高能警告:慎用本命令!!!
它会在你不知情的情况下,一股脑删除很多“它认为”你不再使用的软件

sudo apt-get purge hashcat
sudo apt-get autoremove hashcat

这篇是对hashcat的使用说明 https://zhuanlan.zhihu.com/p/401363280

hashcat 的wiki页面,可以用于查看hash值的加密类型,https://hashcat.net/wiki/doku.php?id=example_hashes,如图示,用于执行参数-m后面的设置

image.png

Reply Favorite View the author
All Replies
璀璨星空
deepin
2023-01-14 08:06
#1

like

Reply View the author
晚秋(lateautumn)
Moderator
2023-01-15 05:06
#2

已收藏,谢谢分享kissing_heart

Reply View the author