密码破解利器John the Rippe使用详细

Ubuntu下安装
sudo apt-get install john

这里写图片描述
unshadow PASSWORD-FILE SHADOW-FILE
unshadow命令将passwd文件和shadow文件组合在一起,其结果用于John破解程序。通常应该使用重定向方法将这个程序的结果保存在文件中,之后将文件传递给John破解程序。
unafs DATABASE-FILE CELL-NAME
unafs从二进制AFS数据库中提取口令散列值,并生成John可用的输出,通常应该把这个输出重定向到文件中。
unique OUTPUT-FILE
删除字典表中的重复词汇,但不改变字典表中各词条项的顺序。

1 进入/root/john-1.7.8/run目录,用jhon自带的工具unshadow读取/etc/shadow
./unshadow /etc/passwd > /root/john-1.7.8/run/passwd.txt
eg: 如果是root用户可以直接cat /etc/shadow > /root/john-1.7.8/run/passwd.txt
2 第一步用Single Crack 模式破解
专门针对使用账号做密码的人,他会尝试用户名的变体,在john.conf中的[List.Rules:Single]中定义规则
./john –single passwd.txt
./jhon –show passwd.txt 查看密码和用户

3 第二步用Wordlist Mode模式破解
Wordlist Mode是一种比较简单的模式,只要确定字典档在哪里即可,在jhon.conf配置文件中有默认的字典档‘Wordlist = $JOHN/password.lst’ 即run目录下的password.lst文件,Wordlist Mode规则在jhon.conf中的[List.Rules:Wordlist]模块定义,在[List.Rules:Wordlist]下面还有一个[List.Rules:NT]模块是定义有关rules的变体规则。
./jhon –wordlist=password.lst passwd.txt
./jhon –wordlist=password.lst –rules passwd.txt

4 第四步用Incremental Mode破解
Incremental 是功能最强的模式,他会穷举所有的组合,然后作为密码来破解,非常耗时,在配置文件中有[Incremental:All],[Incremental:Alpha],[Incremental:Digits],[Incremental:Alnum],[Incremental:LanMan]等模块。每个模块名在run下都有对应的date文件
./jhon –incremental=All passwd.txt

5 第五步用External Mode破解
External 让使用者可以自己编写C语言的破解模式,在jhon.conf中已经自带了一些破解模式程式

你可以中断 john 程式,默认保存(.john/john.rec),
然后通过 john -restore file 恢复

6 生成密码字典,(使用rule)
# john --stdout --wordlist=zidian.txt --rules > dict_zidian.txt

关于RULE规则,详见
http://www.openwall.com/john/doc/RULES.shtml

猜你喜欢

转载自blog.csdn.net/CSDN1887/article/details/81978997