这是关于我如何破解密码的哈希值1亿2200万* John the Ripper和oclHashcat-plus故事.
这是几个月前,当我看到一条推特:从korelogic约含共1亿4600万个密码的密码哈希表的torrent文件。这个非常大的数量的密码哈希起初让我很沮丧,因为我自己只有一台经典配置的AMD Phenom II 4核3.2 MHz的电脑,外加一个ATI/AMD 5770显卡。但我真的很想给尝试一下,因为该领域的密码破解让我着迷。
在这漫长的旅程中我用的密码破解工具是John the Ripper和oclHashcat-puls。这篇文章是关于破解korelogic提供的MD5哈希值,但同样的策略也适用于SHA1哈希破解。
更新:
08/29/2012 –新的例子在John the Ripper部分: "在dict2hash.pl脚本的帮助下破解双MD5密码值"
08/29/2012 – 所有的都进行过排序和整理新的版本下载。
处理哈希值:
首先,所有的korelogic torrent文件必须被解压缩,它包含一个命名为“校验”文件夹。让我们检查这个文件夹的内容…
- root@m3g9tr0n:~/hashes$ ls
- longer_salts raw-md5.hashes.txt salted_with_md5 SHA1 vBulletin-v3.8.4
从现在起我们集中在raw-md5.hashes.txt文件列表,这个文件是4.3GB,通过wc工具可以看出它包括139444502行。
- root@m3g9tr0n:~/hashes$ wc -l raw-md5.hashes.txt
- 139444502 raw-md5.hashes.txt
正如你可以假设,无论是John the Ripper和oclHashcat-plus都无法加载该文件,因为它太大了。出于这个原因,我们需要分割该文件。在Linux下,我们有一个很好的工具称为split 做这件工作得很好:
- root@m3g9tr0n:~$ split --help
- Usage: split [OPTION]... [INPUT [PREFIX]]
- Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
- size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT
- is -, read standard input.
- Mandatory arguments to long options are mandatory for short options too.
- -a, --suffix-length=N use suffixes of length N (default 2)
- -b, --bytes=SIZE put SIZE bytes per output file
- -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file
- -d, --numeric-suffixes use numeric suffixes instead of alphabetic
- -l, --lines=NUMBER put NUMBER lines per output file
- --verbose print a diagnostic just before each
- output file is opened
- --help display this help and exit
- --version output version information and exit
- SIZE may be (or may be an integer optionally followed by) one of following:
- KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.
- We can use the --lines=NUMBER parameter to split our raw-md5.hashes.txt file.
我们可以使用“--lines=NUMBER”参数来分割我们的原始md5.hashes.txt文件。
- root@m3g9tr0n:~/hashes$ split -l 3000000 raw-md5.hashes.txt part
请注意,考虑到每个MD5哈