So I went to the O2 Platform REPL and quickly wrote this script (included in full at the end of this post):
… which creates files with MD5 Hashes:
… in the “{MD5} \tab {value} \newline” format:
Note: It might be easier to see what is inside these txt files if I rename the names to:
Note that this version is VERY inefficient from a memory point of view. This is why its limits are at about 70Mbs, which at the moment are reached with:
- 10x numbers with a depth/length of 6
- 26x letters with a depth/length of 4
- 10x numbers and 26x letters (36 chars) with a depth/length of 4
To consume these files
1) load the md5 hashes files:
2) get its contents:
3) split the file on its lines
4) create a Dictionary to hold the mappings (which is a split of \tab for each line):
5) resolve an MD5 Hash (for example FBD7939D674997CDB4692D34DE8633C4):
… which is the number 76
Note: we can confirm this result, if we try to resolve the FBD7939D674997CDB4692D34DE8633C4 hash on http://www.md5this.com/:
6) create a GUI to resolve the MD5 Hashes:
… which when executed looks like this (on first run)
… like this when there is a match:
… and like this when there is no match:
For reference the 40Mb file with 45,432,060 hashes loaded in about 25sec and resolved hashes like in milliseconds:
Source code of scripts created
(also available as the PoC - Generate Small MD5 Rainbow Table.h2 and PoC - Consume Simple MD5 Rainbow Table.h2 scripts)