Wednesday, May 20, 2009

Recovering a lost Windows XP password

I have a computer that run linux 99% of the time... But I also boot windows XP once in a while (every year or so) to do something specific like trying out some 3d game. Don't ask why, but I tend to forget that password. It happened twice already, so I am documenting the workaround for the next time it happens!

Very quickly, here are the steps:
  1. Download ophcrack: http://ophcrack.sourceforge.net/
  2. Download also some rainbow tables. I have used xp_free_small (380mb). The smallest but not fastest or strongest table -- enough for my purposes.
  3. ./configure && make
  4. (I skip the make install -- I am going to use the binary that is left in src/)
  5. I am running windows in the same computer, so I will just mount the windows partition: sudo mount /dev/sda1 /mnt/xp
  6. Click Load -> Encripted SAM. Choose /mnt/xp/WINDOWS/system32/config . This will load all your password hashes directly from that Windows.
  7. Select accounts you don't want to crack (e.g. you already know the password), to save cpu time, and click Delete on them.
  8. Tables -> Install , add the one(s) that you downloaded.
  9. Click Crack!
That's it. If you are lucky, just as I am, you will have your password shown in screen, in the clear, for anyone looking on your shoulders.

ophcrack has a lot of useful options, I strongly recommend reading at least the help (big Help button on top of main window).

happy cracking!

No comments:

Post a Comment