VBA password protection: how it works? is it secure? are there any alternatives?

折月煮酒 提交于 2019-11-28 11:31:15

问题


In case one wants to protect VBA applications to make trial(demo) versions and not to expose the scripts, how secure the built in password protection is? Are there any alternatives?

Edit: I'm asking about Excel VBA here.


回答1:


Your password security is going to depend largely upon the version of office used. All other Office solutions prior to 2007 can be cracked. Office 2007 requires brute forcing the password. The default encryption mechanism is 128 bit AES.

This means the higher the complexity of the password, the harder to crack. IE - Numbers, special characters, mixing case, etc.




回答2:


It's not very safe, and can be pretty easily cracked with a tool.

This video shows how it's done.




回答3:


If you really want to protect source, this may be the way to go for you. For those who may not want to follow the link it's an article regarding developing an XLL add-in for Excel 2007. Xll is a specialized dll for use with MS Excel.




回答4:


It is not secure. Anyone opening your document in OpenOffice will get immediate access to the code. Open office basically ignores any password protection.

The OO folks have a very good document describing the Excel file format. Section 4.18 (pg. 114) starts the discussion on how protection is handled. Onorio's suggestion on using an add-in will slow someone down, but will not stop a determined hacker.

It's sort of like locking the door to your house. It won't keep out someone determined to get in, but does 'keep honest people honest'.




回答5:


Absolutelly argree with DaveParillo, security is quite poor even in 2010/13 version. The only way to protect your file is put password for openning wich uses real crypting (AES 128 bit), option "Encrypt Document" give the same result. All others:

  • Workbook/Worksheet protection: uses 15 Bit HASH of any password, so you should try only 32768 passwords (wich gives unique HASH) to remove this protection. Here is a good algoringm How does Excel's worksheet password protection work
  • VBA Project lock: you need to change DBP value in vbaProject.bin file. How do I remove the password from a VBA project?


来源:https://stackoverflow.com/questions/259663/vba-password-protection-how-it-works-is-it-secure-are-there-any-alternatives

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!