1

Have an old filevault encrypted external hard drive. Would like to access but have forgotten the password.

However I do remember the style of password (XKCD four word style) and remember two of the four words. So I can generate a list of the possible passwords. What I'd like to be able to do is use this list to brute force the HD, but I can't figure out how to do this.

How can I do that?

1

The answer to your question

If you know two of the four words and the position of said words, it should be an easy* task. Write a script that generates passwords depending on your source list and your two known passwords like $known_pw_1 $known_pw_2 $test_pw_1 $_test_pw2 (of course depending on the position of your known passwords). For each word you put in $test_pw_1 you need to iterate through all $test_pw_2.

There's also a good StackOverflow answer on how to input passwords into command line prompts.

*depending on the following The "BUT"

The "BUT"

So here's the BUT that will take all the fun out of your programming exercise above:

Depending on the word list you used and the alphabet (UPPER case, lower case or MiXeD?), you'll have a hard time calculating through all possible combinations. So if you're using the original diceware word list, it has 7.776 words in it. Meaning your initial password list with two variables has 7.776^2 (=60.466.176) possible combinations. If you have lower case and upper case words mixed, that expands to 7.776^4 (=3.656.158.400.000.000) combinations.

So if you calculate 1-3 passwords per second (I haven't checked the filevault specs but I highly anticipate that it will most certainly slow decryption down to prevent such brute force attacks) you're still looking at around 700 DAYS when calculating all 7.776^2 combinations, 4 BILLION YEARS if we're talking about 7.776^4. And we haven't even talked about mixed character words.

(my math might be off here, please somebody correct)

PS: Hashcat apparently does ~61.481 H/s

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.