hashcat --help #查看帮助文档
General:
-m (--hash-type=NUM) #hash种类,下面有列表,后面跟对应数字
-a (--attack-mode=NUM) #破解模式,下面也有列表
attack-mode:
0 = Straight (字典破解)
1 = Combination (组合破解)
2 = Toggle-Case
3 = Brute-force (
掩码暴力破解
)
4 = Permutation (组合破解)
5 = Table-Looku
-a 0:Straight 字典模式:
hashcat -a 0 -m xx <hashfile> <zidian1> <zidian2>...
-a 3:
Brute-force 掩码暴力破解模式:
但如果我们不确定某一位到底是数字还是字母怎么写组合呢?这时候就要用到高级组合:
-1, --custom-charset1=CS -2, --custom-charset2=CS -3, --custom-charset3=CS -4, --custom-charset4=CS
比如设置 --custom-charset1=?l?d 那么就表示 ?1代表小写字母与数字组合,那么8位随机的数字与小写字母组合可以写成 ?1?1?1?1?1?1?1?1,完整的例子:
hashcat test.txt -a 3 -m 0 --custom-charset1=?l?d
?1?1?1?1?1?1?1?1
再比如设置 --custom-charset2=xiao106347 那么就表示 ?2 代表字符串由 x i a o 1 0 6 3 4 7 组成的所有可能组合,完整例子:
hashcat test.txt -a 3 -m 0 --custom-charset2=xiao106347 ?2?2?2?2?2?2?2?2