# hcmode — which hashcat -m is this?## hcmode the modes that come up on HTB / CPTS# hcmode kerb search every mode this hashcat knows (case-insensitive)# hcmode 13100 ...or look one up by number## The search reads `hashcat -hh` itself, so it always matches the installed# version rather than a list that rots. Not sure what the hash is? `nth -t`.## From IceBreaker's hcmode; the short list there was all it could search.if["$#" -eq 0]; then cat <<'EOF' 0 MD5 100 SHA1 1400 SHA2-256 1700 SHA2-512 500 md5crypt $1$ 1800 sha512crypt $6$ 3200 bcrypt $2*$ 7400 sha256crypt $5$ 1000 NTLM 3000 LM 5500 NetNTLMv1 5600 NetNTLMv2 Responder / ntlmrelayx captures 2100 DCC2 (mscash2) $DCC2$ 13100 Kerberoast RC4 $krb5tgs$23$ 19700 Kerberoast AES256 $krb5tgs$18$ 18200 AS-REP roast $krb5asrep$23$ 7500 Kerberos AS-REQ pre-auth 13400 KeePass 22000 WPA-PBKDF2-PMKID+EAPOL 16500 JWT 22921 RSA/DSA/EC/OpenSSH private key ($6$) 13600 WinZip 17200 PKZIP (compressed) 9600 MS Office 2013 10500 PDF 1.4 - 1.6EOFecho" … hcmode <word|number> searches all of them" >&2exit0fi# Only the "Hash modes" table: the attack-mode table after it also has# ` 0 | Straight`, so a bare grep made `hcmode 0` answer twice.modes=$(hashcat -hh 2>/dev/null |
awk 'tolower($0) ~ /- \[ hash modes \] -/ { on = 1; next } /- \[/ { on = 0 } on && /^ +[0-9]+ \| /')case"$1"in *[!0-9]*)printf'%s\n'"$modes" | grep -iF -- "$*" ;;
*)printf'%s\n'"$modes" | grep -E "^ +$1 \| " ;;
esac||{echo"hcmode: nothing matches '$*'" >&2; exit1; }