PDA

View Full Version : Forgot password to dmg..


plutoniumman
09-09-2009, 01:46 AM
Hello all!
I was being stupid one night and put a bunch of serials in a 256-bit AES encrypted DMG, and then forgot the password... Most of those I can get back any way.

Though I'd still like to open it, because I don't remember if that's all I put in, and I don't wanna contact all those companies. Is there a program other than mackrack to attempt to open DMGs? It just crashes when I try run it. I have a very good idea of what the password is, the only problem is I replaced a lot of letters with numbers, and I don't remember which ones I replaced.

I'm some-what familiar with the terminal, so it doesn't matter if it's gui or terminal, windows or unix.
Unix or Macintosh app preferred, if possible... Though I don't know what a program to crack mac disk images would be doing on windows :rolleyes: lol


Any help, hints, pointers or etc is greatly appreciated. :)

ghell
09-09-2009, 07:53 PM
You aren't going to be able to brute force it or magically break the encryption like they do on TV.

Since you know the rough password and just want to try variations, your best chance is to write a small script that tries all of those permutations and lets you know which one worked and which ones didn't.

It doesn't have to be pretty. It could just be something like
for char1 in ["h", "H"]:
for char2 in ["o", "O", "0"]:
for char3 in ["i", "I", "l", "L", "1"]:
for char4 in ["a", "A"]:
decrypt(char1 + char2 + char3 + char4)

where the example password here is something like "hola".

This example is valid python (assuming you already have a "decrypt" function that tries to decrypt it when given a password) and generates a list such as this:

hoia
hoiA
hoIa
hoIA
hola
holA
hoLa
hoLA
...
H0LA
H01a
H01A