How to (maybe) recover a lost sparse image password
Like most people, I’ve accumulated a large number of backup data over the years. While I was sifting through an old external hard drive recently, I discovered and encrypted sparse image created many years ago for which I had forgotten the password. Gulp… I knew it didn’t contain anything of much importance but I still couldn’t bring myself to give it the ol' ⌘+delete without at least spending some time trying to recover it’s contents.
Now before I got into the details of how I was able to retrieve my password and ultimately access my files, it needs to be said that I was at an advantage. Although the password had escaped me, I did have some information about it. Specifically, I knew it contained two words, which I knew, and a number and a symbol, which I could narrow down to a few. Their order and case however where unknown to me.
Step 1: Generate a password list file
With the bit of information I remembered about the password, I was able to generate a list of potential passwords with a small Python script.
Fire up the Terminal, run the script and dump the password list in a text file.
$ python password-list-generator.py > password-list.txt
Step 2: Get out your crowbar
Download George Starcher’s utility crowbarDMG.
The interface is pretty much self explanatory. Just add you dictionary and disk image and hit Start. Hopefully in under a few hours it will have gone through your password list and mounted your image.
Have you ever attempted to recover a lost password? Tell me about your experience in the comments.