2015年5月31日星期日

Excel VBA bypass password

es there is, as long as you are using a .xls format spreadsheet (the default for Excel up to 2003). For Excel 2007 onwards, the default is .xlsx, which is a fairly secure format, and this method will not work.
As Treb says, it's a simple comparison, so one method is simply to swap out the password entry in the file using a hex editor (see Hex editors for Windows). Step by step example:
  1. Create a new simple excel file.
  2. In the VBA part, set a simple password (say - 1234).
  3. Save the file and exit. Then check the file size - see Stewbob's gotcha
  4. Change file extension to zip file and open this file and find a file Name "\xl\vbaPorject.bin"
  5. Open the file you just created with a hex editor.
  6. Copy the lines starting with the following keys:
    CMG=....
    DPB=...
    GC=...
  7. FIRST BACKUP the excel file you don't know the VBA password for, then open it with your hex editor, and paste the above copied lines from the dummy file.
  8. Save the excel file and exit.
  9. Now, open the excel file you need to see the VBA code in. The password for the VBA code will simply be 1234 (as in the example I'm showing here).
If you need to work with Excel 2007 or 2010, there are some other answers below which might help, particularly these: 123.



CMG="242688F6881E8C1E8C1A901A90"
DPB="484AE4EB01EB0114FFEC01C1C47BB8DE5744FFBF17D1555A6FA59509773EBA8A674EB593"
GC="6C6EC03EC063C163C163"

没有评论:

发表评论