root@sparrow:~/writeups$ cat hashid.md
// cracking
hashid
21 Jul 2026
· 3 min read
hashid is a tool that identifies the hash type from its shape, matching it against more than 200 known algorithm patterns. It is the logical first step before cracking: without knowing whether a hash is MD5, bcrypt or a Kerberos ticket, you cannot pick the right Hashcat mode or John format.The key nuance is that hashid guesses, it does not confirm: hashes of the same length (for example MD5, NTLM and MD4) are indistinguishable by shape alone, so it returns several possibilities ordered by likelihood. Unix-style prefixes such as $1$, $2y$ or $6$ are deterministic; raw hashes with no prefix are not. That is why its real value is handing you the ready-to-copy Hashcat mode (-m) or John format (-j).
1. Beginner level — identify and map to crackers

| Command | What it does |
|---|---|
hashid <hash> | Identifies the hash type |
hashid -m <hash> | Shows the Hashcat mode |
hashid -j <hash> | Shows the John format |
hashid hashes.txt | Identifies a file of hashes |
echo <hash> | hashid | Via stdin |
hashid -e <hash> | Includes extended algorithms |
hashid -mj <hash> | Hashcat mode + John format at once |
hashid -o out.txt <hash> | Saves the result |
hashid --help | Shows the help |
hashid --version | Shows the version |
hash-identifier | Alternative interactive tool |
hashid '$1$abc$...' | Identifies a Unix-format hash (md5crypt) |
hashid -mje <hash> | Everything: Hashcat, John and extended |
hashid '$2y$10$...' | Identifies bcrypt |
2. Advanced level — batches, Kerberos and alternatives

| Command | What it does |
|---|---|
hashid -m <hash> | grep -oP 'Hashcat Mode: \\K\\d+' | Extracts only the mode number |
for h in $(cat hashes); do hashid -m "$h"; done | Identifies in batch |
hashid -mj hashes.txt -o modos.txt | Modes and formats from a file |
hashid <hash> | head -1 | Shows only the best match |
name-that-hash -t <hash> | Modern alternative (nth), with context |
nth -f hashes.txt | nth over a file of hashes |
hashid '$6$...' | Identifies SHA-512 crypt |
hashid -e '{SSHA}...' | Extended hash (LDAP SSHA) |
hashcat --example-hashes | grep -i md5 | Verifies the mode with hashcat examples |
hashid '$krb5tgs$23$...' | Identifies a Kerberos ticket (TGS) |
haiti '<hash>' | 'haiti' alternative (sometimes more accurate) |
hashid -mj <hash> | tee ids.txt | Saves and displays at the same time |
hashid <hash> | grep -i 'possible' | Filters the possibilities |
hashid '$P$B...' | Identifies phpass (WordPress/Drupal) |
3. Details people miss
hashidguesses by pattern, it does not confirm: hashes of equal length (MD5, NTLM, MD4) all come back as possible. Cross-check against where you obtained the hash before spending hours cracking.- Always use
-mor-jto get the Hashcat mode or John format directly; it saves you looking it up by hand in--example-hashes. - For prefixed hashes (
$1$,$2y$,$6$,$krb5tgs$) always single-quote them: the shell reads the$as a variable and would pass an empty string. -eenables extended algorithms (LDAP SSHA, etc.); without it, less common hashes may not be identified. In exchange, it adds more false positives.- When
hashidfalls short, tryname-that-hash(nth) orhaiti: they add context and sometimes pin down modern hashes more accurately.
Responsible use
These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.