Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need a java code that will recover lost MD5 passwords. For security purposes, the passwords themselves are not stored, but rather their hashes are.

I need a java code that will recover lost MD5 passwords. For security purposes, the passwords themselves are not stored, but rather their hashes are. There are many ways to calculate hashes. In this case, we are using the MD5 hash which is provided in java.security.MessageDigest. Attached is an example program that provides a method called getHash, which when given a string, returns the MD5 hash of the string.

Unfortunately, it is near impossible to do the reverse: take an MD5 hash and produce the password which generated it. Instead, it is necessary to try all the combinations possible for a password until the MD5 hash is found. Unfortunately, there are too many combinations to try. It would take too long. Fortunately, however, people when choosing passwords choose strings that are familiar. Therefore, the way to find the password, is to try a dictionary of words until the hash is found. Attached is dictionary.txt, which is the file google-10000-english-no-swears.txt on https://github.com/first20hours/google-10000-english .

Attached is a list of 30 hashes. These hashes are from passwords with lengths of at least 8 and at most 12 characters. Write a program that uses the dictionary to try to find the passwords for the hashes. Some cannot be found this way. Have the program print the passwords found along with their hashes. Also, print the hashes that are unsolved.

The program should be able to find between 5 and 10 of the passwords. If it does this, you will receive full credit.

For extra credit, you can find more passwords, by using words with the dictionary with the following modifications: n00b l33t sp34k:

replace all letters 'a' with number '4'

replace all letters 'e' with number '3'

replace all letters 'i' with number '1'

replace all letters 'o' with number '0'

Using this technique, you should be able to find at least 5 more passwords.

For even more extra credit, you can look for passwords using words from the dictionary in mixed case. Instead of all letters in the password being lower case, some letters will be upper case and some letters lower case.

Using this technique, you should be able to find at least 5 more passwords.

If done properly, these three methods should find all 30 passwords.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions