cracking — hashes in, plaintext out#
Hash cracking + password attacks. Hashes usually come from elsewhere first:
cheat impacket (secretsdump, GetUserSPNs, GetNPUsers), cheat nxc (dumps + spraying),
cheat ad for the AD kill-chain. $ROCKYOU is the default wordlist everywhere below.
Identify first (wrong -m = no crack)#
hid <hash>— your hash-id wrapper:hashid -m(prints the hashcat mode), falls back tohash-identifier.hash-id <hash>— rawhashid·nth <hash>— name-that-hash, better on modern/AD formats.hashcat --example-hashes | less— the ground truth: every mode with a sample. Whenhidguesses wrong, grep this.- Prefixes tell you cold:
$2y$=bcrypt ·$6$=sha512crypt ·$krb5tgs$=Kerberoast ·$krb5asrep$=AS-REP ·user::DOMAIN:…=NetNTLMv2.
Crack (the fast path)#
hcrack <hash|file> [wl]— THE star. Auto-detects type by pattern, picks the mode, runs hashcat--quiet, then--show. Takes a raw hash string OR a file. Reach for this first — it removes the-mguesswork.hc <file> [wl]— no idea what it is? Sprays modes0 100 1000 1800 3200 13100in sequence, stops at the first hit. Slower but hands-off.hc-rock <mode> <file>— you KNOW the mode:hashcat -m <mode> <file> $ROCKYOU. The tightest loop.hc-show <mode> <file>—hashcat -m <mode> <file> --show— replays already-cracked results from the potfile (instant, no re-crack).crack-all— bulk: finds*.hash/*hashes*.txtunder./loot(or$HTB_BOXES/loot) andhcracks each with rockyou. Run after looting a box.
hcrack auto-detect → mode: $krb5asrep$→18200 · $krb5tgs$→13100 · $2[aby]$→3200 · $6$→1800 · $5$→7400 · ::→5600 · 32hex:32hex→5500 · 32-hex→1000 (NTLM; try -m 0 MD5 if it whiffs). Unknown → falls back to hc.
hashcat -m modes — the ones you actually meet#
| mode | hash | where it comes from |
|---|---|---|
| 1000 | NTLM | secretsdump, SAM, NTDS.dit |
| 5600 | NetNTLMv2 | Responder / ntlmrelayx capture |
| 13100 | Kerberoast (TGS-REP) | GetUserSPNs |
| 18200 | AS-REP roast | GetNPUsers (no-preauth) |
| 3200 | bcrypt $2*$ |
web app DBs (slow — small wl only) |
| 1800 | sha512crypt $6$ |
Linux /etc/shadow |
| 0 / 100 | MD5 / SHA1 | generic web hashes |
- Raw call:
hash-crack <mode> <file> $ROCKYOU(alias forhashcat -m). Add-a 3 ?a?a?a?a?a?afor mask/brute,-r rules/best64.rulefor mutations,--usernameif the file isuser:hash. --showreads the potfile, so cracked hashes are cached forever — re-running is free.
Extract hashes from files (john side)#
john— local John (native build → homebrew → docker fallback, transparent). Best for/etc/shadow, odd formats, and incremental:john --wordlist=$ROCKYOU hash.txt, thenjohn-show/john --show hash.txt.john_py <script.py> <file>— runs any*2johnpython helper under$JOHN_HOME:john_py ssh2john.py id_rsa > id_rsa.hash,john_py office2john.py secret.docx,john_py pdf2john.py doc.pdf. Pipe the output straight intohcrack.- Binary
*2john(zip2john,rar2john,keepass2john) are on$PATHalready — call them directly:zip2john locked.zip > z.hash && hcrack z.hash. - John finds the format itself, hashcat needs
-m. For encrypted-file hashes John is usually the shorter path.
Spray & brute over the network (loud — noisy, lockout risk)#
brute-ssh <ip> <user> [wl]—hydra -l user -P wl ip ssh -t 4(ip defaults to$TARGET, wl to$ROCKYOU). (loud)brute-web <url> <user> [wl] <form-spec>—hydra … http-post-form, args 4+ are the raw hydra form spec, e.g.brute-web 10.10.10.5 admin $ROCKYOU '/login:user=^USER^&pass=^PASS^:F=Invalid'- Prefer spraying over brute on AD: one password vs many users beats the lockout policy — that's
cheat nxc(nxc smb … -u users.txt -p 'Season2026!'), not hydra. (careful: lockouts)
Wordlists & tuning#
$ROCKYOU— the default.$PASSWORDS— SecLists top-10k (fast triage).$USERNAMES— name lists for spraying/--username.$SECLISTS— the whole tree;$COMMON/$MEDIUM/$BIGare web-content, not password lists.- GPU crawling? bcrypt/sha512crypt are slow by design — use a small targeted list or a mask, never
$BIG. NTLM/NetNTLMv2 are fast — throw everything. - Rules multiply a wordlist cheaply:
-r $(brew --prefix)/share/hashcat/rules/best64.ruleturns rockyou into ~50× the candidates.
Order of operations:
hid(ornth) to name it →hcrackto crack it. Don't hand-pick-muntilhcrackcan't. Cracked once = in the potfile forever, sohc-show/--showbefore you ever re-run a job.