Cracking password protected VBA Project code - macro code in complex encryption

It's pretty well documented on the internet how you can crack a password protected project code in office documents. It works almost in all cases :)

If the document is protected using a different scheme, you will not find the DPB entry for password in the hex code. This becomes a bit of an annoyance.

Here's how to crack quickly.

The file asks for a password when you try to look into the project code.

1. Save the file on your desktop.

Try to load this into a hex editor and see if you can find the DPB entry - you won't.

Now follow on to the next step.

2. Change the file extention to 'zip'

3. Now simply double-click on this archive to enter the compressed file.

You will see a bunch of stuff. Go into the 'word' folder and look for the .bin file.

Now, copy the bin file (vbaProject.bin) to a different location and open it  in your favourite hex editor and search for DPB.

You will find it now.

Change this to DPx and save the file.

4. Now, replace the bin file in the archive with this new file that you just saved. Note that we are not unzipping the file at any point.

5. Move back up and rename the file extention back to .doc from .zip.

6. Now open this file in word - it will throw a bunch of errors, just click through them.

7. Now, when you go into the project, it will not ask you for a password, but will still not shoew you the code. That's ok, its expected. Don't panic, just go into the project properties and give it a new password. Save and exit.

8. Re-launch the file in Word - go to the project, it'll ask you for a password. Give it the new password that you set.

9. Enjoy.


No comments:

Powered by Blogger.