Windows stores passwords

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.

  1. 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.)
  2. Open the password dictionary.
  3. Loop through the contents of the password dictionary one password at a time.
  4. Sort the list of keys from your dictionary
  5. 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:
    [hash]:[password]
  6. Store the output of your program as rainbow_table.txt.
    *** Run your program as ‘python3 rainbowtable.py dictionary.txt > rainbow_table.txt’
  7. Name your script rainbowtable.py