Published on April 21, 2025
If you're performing a pentest or CTF and encounter a hash like $P$BINTaLa8QLMqeXbQtzT2Qfizm2P/nI0
, you’ll need to confidently identify and crack it using only local tools. This guide walks you through the process of identifying the hashing scheme by sight, validating with Kali tools, and launching a structured cracking campaign.
Many hashing formats embed clues in their structure. In this case:
$P$
→ Indicates PHPass (portable)B
→ Base-2 log of iterations (213 = 8192)INTaLa8Q
All together, this totals 34 characters, which confirms the PHPass portable MD5 format.
Prefix / Structure | Likely Algorithm | Notes |
---|---|---|
$P$ |
PHPass (Portable) | Iterated salted MD5, used in WordPress and others |
$2y$10$ |
bcrypt | Strongly salted, slower by design, includes cost factor |
$1$ |
MD5-Crypt | Common in older Linux systems |
$5$ |
SHA256-Crypt | Linux SHA256-based password hashing |
$6$ |
SHA512-Crypt | Linux SHA512-based password hashing |
32 hex chars | MD5 (Raw) | Unsaltted and fast to brute force |
40 hex chars | SHA1 | Often found in Git, older certificates |
64 hex chars | SHA256 | Used in modern certs, JWTs, APIs |
Even with solid manual analysis, confirmation is wise. Use these tools:
hash-identifier
– Python GUI for format detectionhashid
– CLI-based detection (install with apt if needed)john
– Automatically detects format and uses appropriate cracking modulehashcat -m 400 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt -O -w 3 --status
hashcat -m 400 -a 0 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule -O -w 3 --status
hashcat -m 400 -a 6 hashes.txt rockyou.txt ?d?d?d
hashcat -m 400 -a 3 hashes.txt ?l?l?l?l?l?l?d?d
hashcat -m 400 -a 3 hashes.txt ?a?a?a?a?a?a?a?a
Only use when absolutely necessary — PHPass is slow due to high iteration count.
John often auto-detects format from file. You can also specify it explicitly:
john --format=phpass --wordlist=/usr/share/wordlists/rockyou.txt --rules=Jumbo-small hash.txt
john --format=phpass --incremental hash.txt
--session
in Hashcat, or --restore
for John--status
, and tools like htop
or nvidia-smi