hashglass 0.1.0

Fast pentester-focused hash identifier — mode + cost + ready hashcat command. Handles secretsdump / containers / mixed dumps. Identification only.
Documentation

hashglass

A fast, honest hash-type identifier for pentesters. Zero flags for the common case.

Point it at anything — a hash, a container, a messy dump — and it prints the mode, the cost, and a runnable hashcat command. That's the whole tool.

$ hashglass secretsdump.txt
wrote 3 mode(s) to secretsdump.hashglass/
  -m 1000   NTLM                     3334  ->  hashcat -m 1000 secretsdump.hashglass/1000.txt /usr/share/wordlists/rockyou.txt
         fast — rockyou ≈ instant on a 4090
  -m 19700  Kerberos 5 TGS-REP …        2  ->  hashcat -m 19700 secretsdump.hashglass/19700.txt /usr/share/wordlists/rockyou.txt
         slow — rockyou ≈ 36s on a 4090
  -m 3200   bcrypt                      1  ->  hashcat -m 3200 secretsdump.hashglass/3200.txt /usr/share/wordlists/rockyou.txt
         very slow — rockyou ≈ 3h on a 4090
         high-value only — top-10k words + best64 rule. Full rockyou = days-weeks

What it does that others don't

hashglass hashid Name-That-Hash hashcat --identify
identifies hashcat mode yes yes yes yes
ranks candidates yes, w/ confidence no yes no
auto-splits mixed dumps yes no no no (single-mode file)
pins pwdump / secretsdump NT/LM yes no no no
parses Kerberos AES keys (18200/19600/19700) yes no no no
container recognition (.kdbx, .7z, .pdf → mode + extractor) yes no no no
cost annotation (fast/slow, rockyou time, strategy hint) yes no no no
wordlist auto-fill in emitted commands yes no no n/a
extracts hashes from JSON / CSV / hashcat --show yes no no no
false-positive rail (--strict, degeneracy guard) yes no no no

Speed — measured, not asserted

Windows 11, cold start, single hash (n=10):

tool ms/run vs hashglass
hashglass 42 1×
hashid 141 3.3× slower
Name-That-Hash 315 7.5× slower
hashcat --identify 1,563 37× slower

Batch on a 20,000-line dump:

tool time vs hashglass
hashglass 0.059 s 1×
hashid 0.67 s 11.5× slower
Name-That-Hash 47.2 s 806× slower

hashcat --identify isn't in the batch row because it identifies a whole file as one type, not per-line — a different operation.

Install

cargo install hashglass

Or grab a static binary from Releases.

Usage — the whole surface

hashglass "<hash>"       one hash → mode + ready hashcat command
hashglass secret.kdbx    container → mode + extractor (keepass2john etc)
hashglass dump.txt       messy dump → auto-split into dump.hashglass/,
                         prints a runnable hashcat line per group
cat dump | hashglass -   same, from stdin

Flags are the escape hatch, not the interface:

flag when
--only <mode> emit ONLY raw hashes of one mode (pipe straight to hashcat)
--split <dir> override the auto split directory
--strict never guess from bare hex (git SHA / UUID → no match)
--salted also consider the ambiguous hash:salt family
--all for bare hex, show rarer modes of that length
--json machine-readable output (NDJSON for dumps)
-q, --summary dump: print only the grouped summary

Env var: HASHGLASS_WORDLIST=/path/to/wordlist.txt overrides the auto-fill lookup.

Covered hash types (~302 modes = 60% of hashcat's ~500)

AD / Windows (25+): NTLM (1000), LM (3000), NetNTLMv1/v2 (5500/5600), DCC (1100), DCC2 (2100), all Kerberos 5 TGS-REP etypes (13100/19600/19700) + AS-REP (18200) + pre-auth (7500/19800/19900) + DB (28800/28900), DPAPI mk v1/v2 (15300/15900), BitLocker (22100), Windows Hello (28100), Radmin3 (29200).

Unix / crypt(3) (10+): bcrypt (3200), md5crypt (500), apr1 (1600), sha256crypt (7400), sha512crypt (1800), sha1crypt (15100), descrypt (1500), BSDi crypt (12400), Cisco $8$/$9$ (9200/9300), Juniper sha1crypt (15100).

Web / CMS (30+): phpass/WordPress (400), Drupal7 (7900), Django (10000/124), Django-SHA1, MediaWiki (3711), vBulletin/IPB/MyBB (2611/2711/2811), Redmine (4521), PunBB (4522), PHPS (2612), Episerver (141/1441), Joomla (11), osCommerce (21), Skype (23), SolarWinds Serv-U/Orion (24/21500/21501), PeopleSoft PS_TOKEN (13500), AuthMe (20711), Web2py (21600), Ruby on Rails (19500/27200), Atlassian PBKDF2 (12001), Apache Shiro (12150), Flask session (29100), Umbraco.

Containers / archives (35+): MS Office 2007/2010/2013/2016 (9400/9500/9600/25300), Office ≤2003 all variants (9700-9820), KeePass 1/2 (13400), all 7-Zip / RAR3 / RAR5 / WinZip / PKZIP (11600/12500/13000/13600/17200-17230), SecureZIP (23000-23003), PDF Acrobat all versions (10400-10700/25400), OpenDocument, JKS (15500), OpenSSH SSH-NG (22911-22951), PKCS#8 (24410/24420), AxCrypt 1/2 (13200/13300/23500/23600), 1Password agile/cloud (6600/8200), Password Safe v2/v3 (9000/5200), Bitwarden (23400), LastPass (6800), Apple Keychain/iWork/Notes (23100/23300/16200), iTunes backup (14700/14800), Ansible Vault (16900), Mozilla key3/4 (26000/26100), eCryptfs (12200).

Wi-Fi (2): WPA-EAPOL+PMKID (22000), WPA-PMKID plain (16800/16801).

Disk encryption (80+): VeraCrypt all cipher-KDF-boot combinations (13711-13783 / 29411-29483), TrueCrypt legacy (6211-6243 / 29311-29343), LUKS v1 SHA-1/256/512/RIPEMD (29511-29543), DiskCryptor (20011-20013), BestCrypt (23900/24000), FileVault 2 (16700), APFS (18300), Android FDE (8800).

Crypto wallets (15+): Bitcoin wallet.dat (11300), Ethereum keystore (15600/15700/16300), Electrum v1-5 (16600/21700/21800), Blockchain My Wallet v1/v2/2nd-pw (12700/15200/18800), MultiBit Classic/HD (22500/27700), MetaMask Chrome/Mobile (26600/31900), Exodus (28200), Stellar (25500).

DB (10+): MSSQL 2000/2005/2012+ (131/132/1731), MySQL 4.1/5 (300), MySQL CRAM SHA1 (11200), MySQL caching_sha2 (7401), PostgreSQL CRAM MD5 (11100), PostgreSQL SCRAM-SHA256 (28600), Oracle S/H/T (112/3100/12300), MongoDB SCRAM SHA1/256 (25200/24200).

Enterprise / apps (25+): SAP CODVN B/F/G/H (7700/7701/7800/7801/10300/35000), Lotus Notes/Domino 6/8 (8700/9100), FortiGate/FortiOS/FortiGate256 (7000/26300), Citrix NetScaler SHA1/512 (8100/22200), Cisco PIX/ASA MD5 (2400/2410), Cisco IOS type 4 (5700), IPMI2 RAKP (7300/7350), IKE-PSK MD5/SHA1 (5300/5400), TACACS+ MD5 (16100), iSCSI CHAP (4800), SNMPv3 MD5/SHA1/SHA224/SHA256/SHA384/SHA512 (25000/25100/25200/26700/26800/26900/27300), SIP digest (11400), RACF/RACF-KDFAES (8500/14200), AS/400 DES/SSHA1 (8501/35200), AIX smd5/ssha256/ssha512/ssha1 (6300/6400/6500/6700), macOS PBKDF2-SHA512 (7100).

KDFs / auth infra (15+): PBKDF2-HMAC-MD5/SHA1/SHA256/SHA512 (11900/12000/10900/12100), Argon2 i/d/id (34000), scrypt (8900), Amazon AWS4-HMAC-SHA256 (28700), Microsoft Online Account (33700), mega.nz link (33400), CRAM-MD5 (10200), CRAM-MD5 Dovecot (16400), SipHash (10100), TOTP HMAC-SHA1 (18100), Ansible Vault, GRUB 2 (7200), iPhone passcode (26500), VirtualBox (27500/27600), VMware VMX (27400), Telegram Desktop/Mobile (22600/24500/22301).

Signed-tokens / crypto messaging (5): JWT (16500), GPG symmetric with AES-128/256 + SHA1/256/512 (17010/17020/17030), ChaCha20 (15400).

Bare hex (ranked, never certain): MD5/NTLM/MD4 (32), SHA-1/RIPEMD-160 (40), SHA-256/SHA3-256/Keccak-256 (64), SHA-384/SHA3-384/Keccak-384 (96), SHA-512/SHA3-512/Keccak-512/Whirlpool/Streebog-512 (128), SHA-224/SHA3-224/Keccak-224 (56), MySQL323/LM/half-MD5 (16), CRC32/32C/64 (8/16).

Salted (opt-in, --salted): the full hex:salt family for MD5/SHA-1/SHA-224/SHA-256/SHA-384/SHA-512 plus all utf16le/HMAC/collider variants folded into one rule per hash length (~30 hashcat modes total).

Containers (magic-byte-detected): .kdbx, .7z, .rar, .zip, .pdf, OOXML Office, OLE2 legacy Office, .pcap/.pcapng → hcxpcapngtool hint, NTDS.dit → impacket-secretsdump hint, VeraCrypt (extension-only).

If a mode you need isn't in the ~200 out-of-hashcat's-500 that we don't cover, hashcat --identify is the ground-truth fallback. That's the honest scope split — hashglass is fast + context-aware for the ~300 realistic pentest modes; hashcat is comprehensive for the exotic tail.

Honest limitations

  • Some rules are ambiguity-tolerant on purpose. VeraCrypt's cipher-chain (AES vs Serpent vs Twofish, XTS 512/1024/1536-bit, boot vs non-boot) can't be told apart from the $veracrypt$ wire format alone — we return the whole family (24 modes) and let hashcat's file-header check pick the right one. Same for TrueCrypt, LUKS, PDF versions. This is by design, not a bug.
  • Cost numbers are 4090-class only. A pentester on a 3060 is ~4× slower. The ordering stays right; the absolute times don't. Fine for triage, wrong for planning.
  • bcrypt cost is variable. $2a$05$… = 200 kH/s, $2a$12$… = 1 kH/s. We pick the pentester-realistic "cost ≥ 10" number. Right for most real dumps; too pessimistic for weak cost-5.
  • Bare hex is ambiguous by nature. A 40-hex git commit SHA is byte-identical to a real SHA-1. Default mode guesses (ranked, with capped confidence); --strict returns nothing rather than guess.
  • ~200 exotic hashcat modes are NOT covered. Long-tail SAP variants, specialized DB formats, some legacy encryption chains. hashcat --identify is the fallback pointer.
  • hashglass never cracks anything. It identifies and hands you the runnable command. hashcat / john / hcxpcapngtool do the actual work.

Building from source

git clone <repo>
cd hashglass
cargo build --release
./target/release/hashglass --help

Two dependencies: regex, serde_json. Rust 2024 edition.

License

TBD (probably MIT or Apache-2.0).