views:

34

answers:

1

Hi.

I am writing a program for linux in C to extract the wpa/wep key from a windows registry hive.

Initially I was hoping to use wine's CryptUnprotectData function, but I realise now that wine uses a different algorithm and just mimics window's version. I also realise that only the user that encrypted the data can decrypt it.

I am using wzcook from the aircrack-ng suite as a guide. http://tools.assembla.com/b6stFY7MOr2QtlaaeP0Qfc/browser/Windows/wzcook/wzcook.c

I've extracted the data from a hive without problems but I'm kind of stuck on how to decrypt the key.

If the key is encrypted in the registry for one user, then how does another user decrypt that data? I'm sure they don't have to retype the psk / passphrase if it has been already stored?

Is the data definitely encrypted even when offline (accessing the hive from linux)?

Any other solution for solving this, other than reverse engineering Microsoft's algorithm? :D

Any help / advise you can give is really appreciated,

Thanks.

A: 

As I understand it DPAPI uses a hash calculated from the user's actual password, so you would need both an open-source implementation of the Crypt functions and an explicit password from the user.

There has been some work on implementing CryptUnprotectData recently: DPAPIck

bobince
Thanks for the link! Was thinking that I'd have to give up on this but maybe there's a way.They haven't released their source yet, but I found this paper by them on it http://ly.tl/t6a .It looks interesting, will read through it.At least then I should know more about how it works and whether it'll be possible to implement.Thanks for your help.
jcul
Just had a read through that paper. Was exactly what I needed. Thank you.
jcul
Oh great! I'm glad if it's workable, last time I looked at this it was a dead end.
bobince