Raw MD5 format cannot handle uppercase hexadecimal characters (fixed for CPU, need fix for OpenCL)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Although it shouldn't matter in case of hexadecimal encoding, the Raw MD5 format not only cannot handle uppercase characters, but the error message is not really helpful.
Steps to reproduce
Using uppercase hexadecimal characters (unexpected behavior)
run ➤ echo -ne "foobar" | md5sum | tr 'a-z' 'A-Z' | cut -c -32 | tee foobar.RAWMD5
3858F62230AC3C915F300C664312C63F
run ➤ ./john --format=Raw-MD5 foobar.RAWMD5
Using default input encoding: UTF-8
No password hashes loaded (see FAQ)
Using lowercase hexadecimal characters (expected behavior for uppercase)
run ➤ echo -ne "foobar" | md5sum | cut -c -32 | tee foobar.rawmd5
3858f62230ac3c915f300c664312c63f
run ➤ ./john --format=Raw-MD5 foobar.rawmd5
Using default input encoding: UTF-8
Loaded 1 password hash (Raw-MD5 [MD5 256/256 AVX2 8x3])
Warning: no OpenMP support for this hash type, consider --fork=4
Press 'q' or Ctrl-C to abort, almost any other key for status
foobar (?)
1g 0:00:00:00 DONE 2/3 (2017-11-02 13:59) 2.380g/s 6285p/s 6285c/s 6285C/s rosita..denali
Use the "--show" option to display all of the cracked passwords reliably
Session completed
System configuration
Although the environment shouldn't matter in this case, I'm running this on Debian testing x86_64, I compiled John from bleeding-jumbo (in this case 7c4e6d423).
run ➤ ./john --list=build-info
Version: 1.8.0-jumbo-1-5985-g7c4e6d423
Build: linux-gnu 64-bit AVX2-ac OMP
SIMD: AVX2, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
CPU tests: AVX2
$JOHN is ./
Format interface version: 14
Max. number of reported tunable costs: 4
Rec file version: REC4
Charset file version: CHR3
CHARSET_MIN: 1 (0x01)
CHARSET_MAX: 255 (0xff)
CHARSET_LENGTH: 24
SALT_HASH_SIZE: 1048576
Max. Markov mode level: 400
Max. Markov mode password length: 30
gcc version: 7.2.0
GNU libc version: 2.24 (loaded: 2.24)
Crypto library: OpenSSL
OpenSSL library version: 01010006f
OpenSSL 1.1.0f 25 May 2017
GMP library version: 6.1.2
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Raw-MD5 OpenCL implementation and compare its input handling with the CPU behavior described in the issue. Reproduce the uppercase and lowercase commands with the OpenCL format, then verify that uppercase hexadecimal hashes load successfully and that the resulting error behavior is useful.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100