Results 1 to 14 of 14
  1. #1
    3 Star Lounger
    Join Date
    Jun 2005
    Posts
    386
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Password cracking (xp, 2003)

    I have a time sheet template which has some print macros attached. The person who put this together did a fair enough job but I want to write formulas so the employees could key in the in and out and the template would calculate the hours. Anyway, the author password protected the worksheet and he is no longer with the company. Are their any programs to aid in cracking the password or getting around the password so I can automate the timesheet.

    Thanks

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    <P ID="edit" class=small>(Edited by AlanMiller on 19-Jul-05 22:10. )</P>Sorry, didn't notice that vital word: "protected the worksheet" until Jan Karel's response.

    If you Google Search: excel 2003 vba password you'll find quite a few programs claiming to do the job. Any of the <img src=/S/free.gif border=0 alt=free width=30 height=15> offerings will probably so crippled as to deem them pretty useless, other than for demo purposes. In other words, it'll probably cost ya!

    Alan

  3. #3
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    London, United Kingdom
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    If you want to purchase a cracking package, I can recommend Ultimate Zip Cracker. It is easy to use. Some of the passwords I have encountered to open the workbook were quite long but it didn't take very long to get the password.

    http://www.vdgsoftware.com/index.html

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Password cracking (xp, 2003)

    <P ID="edit" class=small>(Edited by macropod on 20-Jul-05 19:56. correct attribution to JKP)</P>This code removes worksheet protection:

    Sub UnProtectAllSheets()
    Application.ScreenUpdating = False
    Dim oSheet As Worksheet
    Dim wsActvSht As Worksheet
    Set wsActvSht = ActiveSheet
    For Each oSheet In ActiveWorkbook.Worksheets
    oSheet.Protect "", , , , True
    oSheet.Range("A1").Copy oSheet.Range("A1")
    Next oSheet
    wsActvSht.Activate
    Application.ScreenUpdating = True
    End Sub

    JKP's version also gives you a useable password that you can restore the original with.

    Note: The above code fails if Cell A1 is merged. In that case, change the cell references in the code to an unmerged cell.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    I saw this code before and I've used it successfully in previous versions of Excel but it doesn't work at all in xl2003 - at least for me. I just now re-tested it and created a new workbook (empty), three sheets. I protected each sheet with "deb" and then ran this code. No errors, it just didn't unprotect anything. I guess MS has finally filled that security hole. I had 2-3 other tricks that I got from this lounge in the last few years and none of those work to break the sheet password in xl2003.

    I also tried the other password breaking code from JKP. I ran that in the same workbook (xl2003) and it said one useable password was "AAAAAAAAAAA". I then pasted that into the password prompt to unprotect the sheet and it failed.

    Did either of these work for you?

    Deb <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15>

  6. #6
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    Oops, there is a mistake in the code. I edited the post to correct it.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    ### Edited July 21 2005, corrected an error in the test to see whether the sheet is unprotected.

    This code removes worksheet protection:

    <div style="width: 100%; background-color: #FFFFFF;"><code><font color=black><font color=blue>Sub</font color=blue> PasswordBreaker()
    <font color=448800>'Breaks worksheet password protection.</font color=448800>
    <font color=blue>Dim</font color=blue> i <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>, j <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>, k <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>
    <font color=blue>Dim</font color=blue> l <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>, m <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>, n <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>
    <font color=blue>Dim</font color=blue> i1 <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>, i2 <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>, i3 <font color=blue>As</font color=blue> Integer
    <font color=blue>Dim</font color=blue> i4 <font color=blue>As</font color=blue> Integer, i5 <font color=blue>As</font color=blue> Integer, i6 As Integer

    <font color=blue>On</font color=blue> <font color=blue>Error</font color=blue> <font color=blue>Resume</font color=blue> <font color=blue>Next</font color=blue>
    <font color=blue>For</font color=blue> i = 65 <font color=blue>To</font color=blue> 66: <font color=blue>For</font color=blue> j = 65 <font color=blue>To</font color=blue> 66: <font color=blue>For</font color=blue> k = 65 <font color=blue>To</font color=blue> 66
    <font color=blue>For</font color=blue> l = 65 <font color=blue>To</font color=blue> 66: <font color=blue>For</font color=blue> m = 65 <font color=blue>To</font color=blue> 66: <font color=blue>For</font color=blue> i1 = 65 <font color=blue>To</font color=blue> 66
    <font color=blue>For</font color=blue> i2 = 65 <font color=blue>To</font color=blue> 66: For i3 = 65 <font color=blue>To</font color=blue> 66: For i4 = 65 <font color=blue>To</font color=blue> 66
    For i5 = 65 <font color=blue>To</font color=blue> 66: For i6 = 65 To 66: For n = 32 To 126
    ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
    Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) _
    & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
    <font color=blue>If</font color=blue> ActiveSheet.ProtectContents = <font color=blue>False</font color=blue> <font color=blue>Then</font color=blue>
    MsgBox "One usable password is " & Chr(i) & Chr(j) _
    & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) _
    & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
    <font color=blue>Exit</font color=blue> <font color=blue>Sub</font color=blue>
    <font color=blue>End</font color=blue> <font color=blue>If</font color=blue>
    Next: Next: Next: Next: Next: Next
    Next: Next: Next: Next: Next: Next
    <font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue></font color=black></code>

    </div hiblock>
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  8. #8
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Password cracking (xp, 2003)

    You could try the AllInternalPasswords macro from McGimpsey & Associates. It uses the same algorithm as shown in Jan Karel's post but you only have to run it once to remove passwords on all the sheets.

    An alternative is the free "Find lost passwords" add-in from Erlandsen Data Consulting. Again this one removes all the passwords in one go and is very quick.

  9. #9
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    Great!! This now worked in xl2003 (I just had a short 3-char password, no special characters) and it took probably 10+ seconds or so but it's a nice to have trick as most casual users use simple passwords anyway. And for a moment there I thought MS finally fixed their too easy to break protection method --- silly me.

    Deb <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

  10. #10
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    Loved the article by McGimpsy - I always wondered by the returned passwords were so similar in format.

    Deb

  11. #11
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    Along the same lines, what about the times when they have protected the VBA data?

    Any good methods to get these unprotected?

    Thanks,
    Brad

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Password cracking (xp, 2003)

    If VBA code is password-protected, this is usually done to protect the author's intellectual property. Cracking the password is often unethical.
    Apart from that, a VBA password is much harder to crack than a worksheet password. If you search Google for lost vba password you'll find many utilities that claim to be able to do so, but I have no experience with any of them.

  13. #13
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password cracking (xp, 2003)

    Hans,
    I understand the Authors intellectual property portion, but I am specifically looking at instances where I have an employee that has protected the VBA, and has since moved on. The Code technically belongs to the company, as the proper documents have been signed to indicate all "intellectual property" developed on Company owned equipment for company use belongs to the company.


    Thanks for the heads-up,

    Brad

  14. #14
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Password cracking (xp, 2003)

    Any decent commercial software will break a VBA password instantly (technically it just removes it rather than cracking it) and you can also do it with a hex editor with a little bit of work.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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