【笔记】John学习笔记

前言

John the Ripper is a fast password cracker, currently available for many flavors of Unix, macOS, Windows, DOS, BeOS, and OpenVMS (the latter requires a contributed patch). Its primary purpose is to detect weak Unix passwords. Besides several crypt(3) password hash types most commonly found on various Unix flavors, supported out of the box are Kerberos/AFS and Windows LM hashes, as well as DES-based tripcodes, plus hundreds of additional hashes and ciphers in “-jumbo” versions.(Github

下载依赖

MacOS

1
brew install john

Linux登录密码破解

破解哈希值

/etc/shadow:Linux登录密码哈希值文件

1
john /etc/shadow

查看结果

  • 已爆破的密码会存放在~/.john/目录下的john.pot文件中,所以再次执行爆破语句不会重新开始爆破
    • 如果需要查看已经爆破的密码,可以使用--show参数
    • 如果需要重新爆破,需要删除~/.john/john.pot文件
1
john /etc/shadow --show

Windows登录密码破解

提取Windows登录密码哈希值

  • 通过QuarksPwDump获取Windows登录密码哈希值文件

破解哈希值

win2k8.hash:Windows登录密码哈希值文件
--format=NT:如果是爆破Windows的密码Hash,需要指定这个参数,如果不指定这个参数,默认爆破类Unix的密码Hash
--wordlist=<file>:指定密码字典,如果不指定这个参数,则使用内置的密码字典

<file>:字段文件路径

1
john win2k8.hash --format=NT

查看结果

1
john win2k8.hash --format=NT --show

完成

参考文献

哔哩哔哩——千锋教育网络安全学院