psypanda / hashID

Software to identify the different types of hashes -
http://psypanda.github.io/hashID
1.35k stars 183 forks source link

Add CRAM-MD5 #17

Closed psypanda closed 9 years ago

psypanda commented 9 years ago

Hashcat example hash:

$cram_md5$PG5vLXJlcGx5QGhhc2hjYXQubmV0Pg==$dXNlciA0NGVhZmQyMmZlNzY2NzBmNmIyODc5MDgxYTdmNWY3MQ==

Hashcat Mode: 10200 Taken from hashcat wiki.

psypanda commented 9 years ago

I have no idea why the hash on the hashcat wiki is encoded in base64 which decodes to $cram_md5$<no-reply@hashcat.net>$user 44eafd22fe76670f6b2879081a7f5f71 since a created hash by dovecot using doveadm pw -p hashID -u hashID results in {CRAM-MD5}997d9e2e55848f9bc0b0bc0a79b20cda91d9b54225bac8f6b706c7e6786a0f40?!

psypanda commented 9 years ago

Ok now I know why: magnumripper/JohnTheRipper@a5edfee767274f3b84be60dfdaf36c3a9aedd61b. I'll implement the hashcat bas64 encoded version then. I'll use a simplified regex [a-z0-9\/+=-] for "validating" base64 since (?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4}) would be to long.