root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat hashid.md
// cracking

hashid

21 Jul 2026 · 5 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

HASHID cheat sheet — Beginner
CommandWhat it does
hashid <hash>Identifies the hash type
hashid -m <hash>Shows the Hashcat mode
hashid -j <hash>Shows the John format
hashid hashes.txtIdentifies a file of hashes
echo <hash> | hashidVia 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 --helpShows the help
hashid --versionShows the version
hash-identifierAlternative 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

HASHID cheat sheet — Advanced
CommandWhat 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"; doneIdentifies in batch
hashid -mj hashes.txt -o modos.txtModes and formats from a file
hashid <hash> | head -1Shows only the best match
name-that-hash -t <hash>Modern alternative (nth), with context
nth -f hashes.txtnth over a file of hashes
hashid '$6$...'Identifies SHA-512 crypt
hashid -e '{SSHA}...'Extended hash (LDAP SSHA)
hashcat --example-hashes | grep -i md5Verifies 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.txtSaves 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

  • hashid guesses 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 -m or -j to 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.
  • -e enables extended algorithms (LDAP SSHA, etc.); without it, less common hashes may not be identified. In exchange, it adds more false positives.
  • When hashid falls short, try name-that-hash (nth) or haiti: 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.