John the Ripper jumbo + HashCat 破解压缩密码 ubuntu amd GPU

文章目录

  • [使用 John the Ripper 和 Hashcat 破解压缩包密码](#使用 John the Ripper 和 Hashcat 破解压缩包密码)
    • [下载并编译 John the Ripper](#下载并编译 John the Ripper)
      • [1. 克隆 John the Ripper 仓库](#1. 克隆 John the Ripper 仓库)
      • [2. 安装必要的依赖库](#2. 安装必要的依赖库)
      • [3. 编译 John the Ripper](#3. 编译 John the Ripper)
      • [4. 测试 John the Ripper](#4. 测试 John the Ripper)
    • 获取加密压缩包的哈希值
    • [使用 Hashcat 破解哈希值](#使用 Hashcat 破解哈希值)
      • [1. 下载 Hashcat](#1. 下载 Hashcat)
      • [2. 测试 Hashcat](#2. 测试 Hashcat)
      • [3. 确定哈希类型](#3. 确定哈希类型)
      • [4. 使用 Hashcat 破解哈希](#4. 使用 Hashcat 破解哈希)
      • [5. 破解成功示例](#5. 破解成功示例)

使用 John the Ripper 和 Hashcat 破解压缩包密码

免责声明:密码破解工具仅用于个人学习,请遵守法律法规,切勿用于非法活动。

本文介绍如何使用 John the Ripper 和 Hashcat 工具来获取加密压缩包的哈希值并进行密码破解。

下载并编译 John the Ripper

1. 克隆 John the Ripper 仓库

bash 复制代码
git clone https://github.com/openwall/john.git

2. 安装必要的依赖库

bash 复制代码
sudo apt-get -y install git build-essential libssl-dev zlib1g-dev
sudo apt-get -y install yasm pkg-config libgmp-dev libpcap-dev libbz2-dev
sudo apt-get -y install ocl-icd-opencl-dev opencl-headers

3. 编译 John the Ripper

进入 src 目录并执行编译命令:

bash 复制代码
cd john/src
./configure && make -s clean && make -sj4

编译过程如下图所示:

编译完成后,在 john/run 目录下会生成 John the Ripper 的可执行文件。您可以将 run 目录复制到其他地方使用。

4. 测试 John the Ripper

执行帮助命令查看效果:

bash 复制代码
./john --help

获取加密压缩包的哈希值

John the Ripper 可以获取加密压缩包的哈希值,进而使用 Hashcat 进行破解。其原理是密码经过哈希处理后存储,因此通过验证哈希值即可尝试破解密码,而无需原始压缩包。

根据压缩包类型选择对应的二进制文件获取哈希值:

  • RAR 压缩包 使用 rar2john:

  • ZIP 压缩包 使用 zip2john:

本文以 RAR 压缩包为例,使用以下命令获取哈希值:

bash 复制代码
./rar2john xxx.rar

执行后会返回一个或多个字符串(若压缩包包含多个文件):

使用 Hashcat 破解哈希值

1. 下载 Hashcat

访问 Hashcat 官网 下载并解压:

2. 测试 Hashcat

bash 复制代码
./hashcat --help

3. 确定哈希类型

访问 Hashcat 示例哈希页面 查找对应哈希类型的编码。RAR5 哈希的类型编码为 13000 :

4. 使用 Hashcat 破解哈希

使用以下命令尝试破解之前获取的哈希值:

bash 复制代码
./hashcat -m 13000 '$rar5$16$c02ce2060fef08d3303203ed954b6f5d$15$ea5a67a89d14832dc4eb7dd76bbd5cc7$8$6be568ba1e3ff7ff' ../rockyou.txt

此处使用了密码字典 rockyou.txt,您可以从以下链接下载:

Hashcat 会调用 GPU 进行运算,并提供命令行界面用于暂停、停止等操作:

5. 破解成功示例

若破解成功,界面会显示如下:

通过以上步骤,您可以成功获取加密压缩包的哈希值并使用 Hashcat 进行密码破解。

相关推荐
Linux界最忧郁之人7 小时前
华为云ECS&IMS&AS实战|弹性云服务器、私有镜像、弹性伸缩完整实验
linux·运维·服务器·centos·华为云·openstack
whyutianict_vv7 小时前
零基础转 AI 运维:投入清单、技术路线与核对表
linux·运维·人工智能·ai
无言听风雨丶7 小时前
systemd 与信号 / 僵尸进程:Linux 进程管理的底层逻辑与排错
linux·服务器·网络
DevOpenClub8 小时前
高考一分一段 API:分数查位次、科类枚举与历史对照
linux·数据库·高考
小贾要学习8 小时前
【C++后端开发项目】Reactor 模型 / C++ 仿写 muduo HTTP 服务器:让底层网络库真正跑起网页
linux·服务器·c++·http·网络编程·muduo·reactor模型
Blockbuater_drug8 小时前
OpenMM分子动力学模拟02 安装:Linux:conda 一条命令装通 GPU 加速的分子模拟环境
linux·conda·cuda·gpu驱动·pythonpath·openmm安装
程序员JerrySUN8 小时前
PCIe Gen5 SSD 为什么读得快、写得慢?从存储原理到 Linux 性能实测
linux·服务器·网络
Android系统攻城狮8 小时前
Linux FFmpeg深度解析之avcodec_parameters_copy调用流程与实战(二十五)
linux·运维·服务器·ffmpeg·音视频·车载音频
A7bert7779 小时前
【MobileSAM部署至RK3588】环境适配→转换RKNN→开发板部署
c++·人工智能·深度学习·目标检测·ubuntu
ITKEY_9 小时前
emacs 文件管理Dired, the Directory Editor
linux·编辑器·emacs