hashcat

hashcat

参考资料
https://blog.bbskali.cn/1635.html

hashcat -m 1000 -a 0 -o winpass1.txt --remove win2.hash ptemp.txt

参数说明:
“-m 1000” 表示破解密码类型为“NTLM”;
“-a 0”表示采用字典破解;
“-o”将破解后的结果输出到winpass1.txt;
“--remove win2.hash”表示将移除破解成功的hash;
“ptemp.txt”为密码字典文件。
john --wordlist=pass.txt
/var/lib/mysql/royal.log

参数说明

下面使常见的参数,想了解更多的参数可以hashcat --help查看

-a  指定要使用的破解模式,其值参考后面对参数。“-a 0”字典攻击,“-a 1” 组合攻击;“-a 3”掩码攻击。
-m  指定要破解的hash类型,如果不指定类型,则默认是MD5
-o  指定破解成功后的hash及所对应的明文密码的存放位置,可以用它把破解成功的hash写到指定的文件中
--force 忽略破解过程中的警告信息,跑单条hash可能需要加上此选项
--show  显示已经破解的hash及该hash所对应的明文
--increment  启用增量破解模式,你可以利用此模式让hashcat在指定的密码长度范围内执行破解过程
--increment-min  密码最小长度,后面直接等于一个整数即可,配置increment模式一起使用
--increment-max  密码最大长度,同上
--outfile-format 指定破解结果的输出格式id,默认是3
--username   忽略hash文件中的指定的用户名,在破解linux系统用户密码hash可能会用到
--remove     删除已被破解成功的hash
-r       使用自定义破解规则

攻击模式

  0 | Straight(字段破解)
  1 | Combination(组合破解)
  3 | Brute-force(掩码暴力破解)
  6 | Hybrid Wordlist + Mask(字典+掩码破解)
  7 | Hybrid Mask + Wordlist(掩码+字典破解)

掩码

?d:数字
?u:大写字母
?l:小写字母

八位数字密码:?d?d?d?d?d?d?d?d
八位未知密码:?a?a?a?a?a?a?a?a
前四位为大写字母,后面四位为数字:?u?u?u?u?d?d?d?d
前四位为数字或者是小写字母,后四位为大写字母或者数字:?h?h?h?h?H?H?H?H
前三个字符未知,中间为admin,后三位未知:?a?a?aadmin?a?a?a
6-8位数字密码:--increment --increment-min 6 --increment-max 8 ?l?l?l?l?l?l?l?l
6-8位数字+小写字母密码:--increment --increment-min 6 --increment-max 8 ?h?h?h?h?h?h?h?h

实例

7位小写字母破解
hashcat -a 3 -m 0 --force 7a47c6db227df60a6d67245d7d8063f3 ?l?l?l?l?l?l?l

1-8位数字破解
hashcat -a 3 -m 0 --force 4488cec2aea535179e085367d8a17d75 --increment --increment-min 1 --increment-max 8 ?d?d?d?d?d?d?d?d

1-8位小写字母+数字破解
hashcat -a 3 -m 0 --force ab65d749cba1656ca11dfa1cc2383102 --increment --increment-min 1 --increment-max 8 ?h?h?h?h?h?h?h?h

特定字符集:123456abcdf!@+-
hashcat -a 3 -1 123456abcdf!@+- 8b78ba5089b11326290bc15cf0b9a07d ?1?1?1?1?1

1-8为位符集:123456abcdf!@+-
hashcat -a 3 -1 123456abcdf!@+- 9054fa315ce16f7f0955b4af06d1aa1b --increment --increment-min 1 --increment-max 8 ?1?1?1?1?1?1?1?1

1-8位数字+大小写字母+可见特殊符号
hashcat -a 3 -1 ?d?u?l?s d37fc9ee39dd45a7717e3e3e9415f65d --increment --increment-min 1 --increment-max 8 ?1?1?1?1?1?1?1?1
hashcat -a 3 d37fc9ee39dd45a7717e3e3e9415f65d --increment --increment-min 1 --increment-max 8 ?a?a?a?a?a?a?a?a

字典破解
-a 0是指定字典破解模式,-o是输出结果到文件中
hashcat -a 0 ede900ac1424436b55dc3c9f20cb97a8 password.txt -o result.txt

批量破解
hashcat -a 0 hash.txt password.txt -o result.txt

其他
--hwmon-temp-abort=100 GPU温度达到100后,停止(默认90)
--session=my 将进度存到my.session文件中,断点续解密

爆破 net-ntlm v2 的hash

hashcat -m 5600 net-ntlm hash  /tmp/password.list -o found.txt --force
hashcat.exe -m 5600 test::.:06fe86dadbb61f:9AEFEBD0BB4B35C445F6B6E72AD3E49E:010100000000000080D1D8C7B173D C:\Users\test\Desktop\test\password.txt

hashcat.exe -m 5600 net-ntlm-v2 -a 3 ?d?d?d?d?d?d?d?d    # 掩码爆破8位纯数字
hashcat.exe -m 5600 net-ntlm-v2 -a 3 ?l?l?l?l?l?l?l?l    # 掩码爆破8位小写字母
hashcat.exe -m 5600 net-ntlm-v2 -a 3 ab?l?l?l?l?l?l      # 掩码爆破8位 首两位是字符ab其余是小写字母
posted @ 2022-11-20 22:00  是谁走漏了消息  阅读(153)  评论(0编辑  收藏  举报