Windows stores passwords using the NT LAN Manager (NTLM) hash. This hash is created by hashing the plain text password with the MD4 algorithm. There is no salt used. The lack of salt enables the use of a rainbow table to lookup passwords from their hash. For this assignment you will create a rainbow table for a set of passwords.
More about NTLM: http://techgenix.com/how-cracked-windows-password-part1/
For this assignment you will create a Rainbow table for NTLM passwords. Use the following list of steps as a guide.
- Use the sys library to read a command line argument that is the name of a password dictionary file.
For your submission used the password dictionary file found at this link: http://www.openwall.com/passwords/wordlists/password-2011.lst (Links to an external site.)
- Open the password dictionary.
- Loop through the contents of the password dictionary one password at a time.
- Sort the list of keys from your dictionary
- Use a for loop to print all keys and passwords. Print on hash and password pair per line. Structure each line as follows to allow a password to be looked up easily from it’s hash:
- Store the output of your program as rainbow_table.txt.
*** Run your program as ‘python3 rainbowtable.py dictionary.txt > rainbow_table.txt’
- Name your script rainbowtable.py