+ Reply to Thread
Results 1 to 17 of 17

Cracking password protection

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    161

    Cracking password protection

    Hi all,

    I've created VBA password protection for Excel document. I like to test it how easy/difficult will be to crack the protection.
    Can you try to open the document and tell me is it possible, or how easy is it to crack it (there are 2 questions in the file that will prove if you've cracked the password).

    Also, I would appreciate any comments for improving the password protection.

    Thank you in advance.
    Igor
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,058

    Re: Cracking password protection

    Your post does not comply with Rule 11 of our Forum RULES.

    Don't post questions regarding breaking or bypassing any security measure. Such posts will be deleted, and repeat offenders will be banned. This includes posting of links to sites that offer software, code or services to do this or posting of code to remove passwords

    Thread Closed
    Never use Merged Cells in Excel

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cracking password protection

    Hi,

    Zbor and I have had discussions and I think we have a way forward. We both realise that you're not asking HOW to crack a password but for the benefit of others who may read this it's worth re-iterating the point that discussions about how to crack passwords are verboten.

    Therefore in the interests of helping you (and maybe others) we've agreed to offer some advice in order that you may consider how to better protect your workbook. The thread is being re-opened on that basis.

    The code in the Test sheet can be revealed by first opening the workbook with macros disabled. Then immediately save the file as a .xlsx file and close the workbook. Open the .xlsx file, go into then VBE and set the Visible property of the Test sheet to xlSheetVisible to reveal the code "Kasandra".

    Unprotecting the VBE is another matter completely and doesn't lend itself to any standard Excel operations that I know of.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Cracking password protection

    Further to Richard's comments, I would also re-iterate that Excel is not a secure environment; it is trivial to remove any VBA/Sheet protection so should not be used if this is a requirement.

    There are commercial applications that claim to lock the workbook to improve security - the good ones wrap the workbook in a compiled application, so it opens in a protected environment - something like LockXLS take this approach (to be explicit, I have never used so therefore cannot endorse the product).

    There are also many commercial applications that claim to secure your code that really aren't worth the money - so be wary before splashing out!

  5. #5
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    863

    Re: Cracking password protection

    I agree with the above. Password protection of the VBA is generally considered a safety measure in stopping the typical Excel and end user from breaking the code inadvertently. But if someone wants to read the code, there various web searches that can show ways to break into the code if someone really wants to get at it.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,496

    Re: Cracking password protection

    I guess I would be breaching forum rules if I told you how I got this ...

    Please Login or Register  to view this content.
    And (most of) the Workbook_Open code ...

    Please Login or Register  to view this content.
    Needless to say, Excel is not a secure environment. If your desire is to protect the code against accidental or intentional interference, it's probably good enough. However, if it is intended to protect against someone who want to steal the proprietory information/code, it doesn't present much of a barrier.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Cracking password protection

    Show off ;p

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,496

    Re: Cracking password protection

    To follow up on Kyle's comments, my research on Third Party Excel protection products would lead me to believe that they are expensive, complex and limiting in what you can and cannot do. They typically have multiple user licensing agreements that could prove to be very expensive depending on the size of the organisation and/or number of people needing to use the protected workbook(s).

    I once saw a review of several products and none came out well. However, a) I can't find it and b) it would be relatively old now. If you did want to go down that track, I would urge you to download a trial version of the product and see how well it meets your needs. I did trial Spreadsheet Sentry some time ago and it seemed to work but the client decided not to use it ... probably a licensing issue.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,496

    Re: Cracking password protection

    @Kyle: if you've got it, flaunt it .

    Just something I invested in a long time ago and it still seems to work quite well ... at least with VBA/VBE protection.

  10. #10
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Cracking password protection

    That was fun... had never tried this before but it is surprisingly easy to just change the VBA Project password and get to the code. I knew sheet protection was easy of course, but had no idea how useless the project protection is for a user with moderate abilities. Once in the code it is of course simple to just get or change the required password for "Test"
    Last edited by Arkadi; 05-12-2016 at 08:44 AM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  11. #11
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,049

    Re: Cracking password protection

    This was a very interesting discussion. My understanding is that Microsoft strengthened its protection in Excel 2013. Would anyone be able to comment if this is true and if so, how much stronger did the protection become? Many thanks.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Cracking password protection

    I think you're referring to the password to open, which is completely different - in that case I believe it was strengthened, that encrypts the whole workbook which isn't the same thing

  13. #13
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,049

    Re: Cracking password protection

    My understanding was that they changed the algorithm that protects the password making it more difficult to crack. This is noticeable when using a macro to protect and unprotect a sheet using a password in Excel 1213. The macro takes longer to run particularly if you want to loop through all the sheets.

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,496

    Re: Cracking password protection

    To quote John Walkenbach:

    Spreadsheet Protection FAQ

    If I protect my worksheet with a password, is it really secure?
    No. Don't confuse protection with security. Worksheet protection is not a security feature. Fact is, Excel uses a very simple encryption system for worksheet protection. When you protect a worksheet with a password, that password -- as well as many others -- can be used to unprotect the worksheet. Consequently, it's very easy to "break" a password-protected worksheet.

    Worksheet protection is not really intended to prevent people from accessing data in a worksheet. If someone really wants to get your data, they can. If you really need to keep your data secure, Excel is not the best platform to use.

    So are you saying that protecting a worksheet is pointless?
    Not at all. Protecting a worksheet is useful for preventing accidental erasure of formulas. A common example is a template that contains input cells and formulas that calculate a result. Typically, the formula cells would be Locked (and maybe Hidden) the input cells would be Unlocked, and the worksheet would be protected. This helps ensure that a novice user will not accidentally delete a formula.

    Are there any other reasons to protect a worksheet?
    Protecting a worksheet can also facilitate data entry. When a worksheet is locked, you can use the Tab key to move among the Unlocked cells. Pressing Tab moves to the next Unlocked cell. Locked cells are skipped over.

    I can't believe that the algorithm has changed but it would be interesting to try to crack the password from a worksheet protected in Excel 2013 or above. That said, I suspect the slower performance is related more to innate inefficiencies in later versions of Excel. Other things perform much worse, for example, Conditional Formatting can be a nightmare.

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,496

    Re: Cracking password protection

    And ... here's the apology

    http://www.thespreadsheetguru.com/bl...ty-methodology

    This explains how the hashing algorithm has changed and improved so the old password macros won't work. However, it must be noted that the level of protection depends on the version of Excel where the password is applied. So, if you protect a sheet in Excel 2013 and then Unprotect and Reprotect in Excel 2010 or earlier, you end up with old style password protection.

  16. #16
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Cracking password protection

    By applying a very messy "Spaghetti" Coding, With another Workbook for your own use as copy for clarification, you could throw the less knowledgeable "thief" well of balance, and hopefully incapable of making any sense of what the heck it is.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  17. #17
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,049

    Re: Cracking password protection

    Thank you, TMS, for the link. It provided some very interesting and useful information.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Password protection not showing password on screen as user types it
    By tony7262 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2016, 10:05 AM
  2. [SOLVED] Password Protection Formula - Remembering I already entered the Password!
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-10-2014, 01:35 PM
  3. Cracking excel password(how to prevent it)
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2009, 03:36 AM
  4. password protection-is there anyway to put a password on running a macro in excel?
    By Solarissf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2008, 10:06 AM
  5. Cracking 'File Open' password
    By Andrew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2005, 10:06 AM
  6. Password Cracking
    By Wynn in forum Excel General
    Replies: 1
    Last Post: 03-16-2005, 07:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1