Save the 'vbaProject.bin' file and exit from hex editor. If value is longer - that is not a problem (paste it as is). If copied value is shorter than in encrypted file you should populate missing characters with 0 (zero). You can use this DPB value to skip steps 1-8)ĭo steps 4-7 for file with unknown password (file you want to unlock).Ĭhange DBP value in this file on value that you have copied in step 8. (This value generated for 'macro' password. Open the file you just extracted with a hex editor.įind and copy the value from parameter DPB (value in quotation mark), example:ĭPB="282A84CBA1CBA1345FCCB154E20721DE77F7D2378D0EAC90427A22021A46E9CE6F17188A".Find the file: 'vbaProject.bin' (in 'xl' folder).Change file extention to '.zip', open it by any archiver program.In the VBA part, set a simple password (for instance 'macro').
Pasted from a previous post from his blog:įor Excel 2007/2010 (.xlsm) files do following steps: You can see how it works by browsing his code.
Someone made a working vba code that changes the vba protection password to "macro", for all excel files, including. I have your answer, as I just had the same problem today: NEW: (TEST) GC="BAB816BBF4BCF4BCF40000" (what i used and what worked) NEW: (TEST) GC="BAB816BBF4BCF4BCF4" (from Ricko below) I used the "test" example given by Ricko at the bottom and it worked with ONE CAVEAT - i had to 'pad' out my GC value to make it that same length as the original one in my file. zip, editing the DPB= AND GC= values in the vbaproject.bin file with a hex editor then saving this in the. I DID manage to get this to work on an old windows machine (XP/Excel 2007) by modifying the. Something about changing the file from filname.xlsm to fielname.zip and back again results in a corrupted excel file which Excel 2011 refuses to recognise. I HAVE NOT been able to get this to work on Mac Excel 2011. Having now solved this (to some degree) i thought i'd add a summary here.
Is anyone aware if a patch has been applied that makes the "hex editor" approach invalid?.I had read elsewhere that in cases where the "target" keys were longer, you could pad the "dummy" keys to the same length but there is nothing i can find to say what to do in the reverse case. creating a spreadsheet with a known password and then copying across the relevant fields)īut find that the length of the "GC" key created on my 'dummy' spreadsheet is shorter than the "GC" key on the spreadsheet that I am wishing to access (the "target"). Is there a way to crack the password on an Excel VBA Project? (ie. The VBA editor then opens and, sure enough, all VBA is stripped out from modules and worksheets.
Opening the VBA editor gave a message saying that the project is corrupted and that the project will be removed. I tried using both Excel 2011 (Mac) and Excel 2003 (Windows) and in both cases, I got the same behaviour However I have just tried to do it yesterday and found that it no longer seems to work.
I have used the "Hex Editor to modify DPB to DPx" many times in the past to bypass VBA project security on my old Excel VBA projects (.xls), so I definitely know how to do it and know that I can do it.