Excel Worksheet & Workbook passwords
Have you lost your Excel sheet password and need to remove the protection ?
As in previous versions, Excel 2007/2010 worksheets and the workbook structure are not protected using an encryption algorithm, as is the password-to-open. Actually, it is impossible to recover your exact original worksheet password, because Excel does not save the user's real password, but a fixed length 16-bit hash !
As a result, a lot of different passwords share the same hash and it seems that is no way to find which one was initially assigned to the worksheet. You don't seem convinced ? Well, protect a worksheet using the password test and then unprotect the same worksheet using the password zzyw or BBAb
Excel’s sheet protection seems geared towards preventing accidental editing and easier data entry than designed to protect sheet contents from malicious tampering. The password hash algorithm is documented in chapter 4.18.4 of the OpenOffice technical documentation and in this link.
The workbook and worksheet passwords can be easily cracked by a brute force attack on the hash passwords stored in Excel using VBA code due to its short length! A generic VBA procedure to unlock workbook & sheet passwords is listed below.
Please read also about our free Excel 2010 Password Removal Add-in here.
An alternative method for removing sheet protection is to edit its 'Open XML' file, as described here. Please read this tip to unprotect workbook structure.
As in previous versions, Excel 2007/2010 worksheets and the workbook structure are not protected using an encryption algorithm, as is the password-to-open. Actually, it is impossible to recover your exact original worksheet password, because Excel does not save the user's real password, but a fixed length 16-bit hash !
As a result, a lot of different passwords share the same hash and it seems that is no way to find which one was initially assigned to the worksheet. You don't seem convinced ? Well, protect a worksheet using the password test and then unprotect the same worksheet using the password zzyw or BBAb
Excel’s sheet protection seems geared towards preventing accidental editing and easier data entry than designed to protect sheet contents from malicious tampering. The password hash algorithm is documented in chapter 4.18.4 of the OpenOffice technical documentation and in this link.
The workbook and worksheet passwords can be easily cracked by a brute force attack on the hash passwords stored in Excel using VBA code due to its short length! A generic VBA procedure to unlock workbook & sheet passwords is listed below.
Please read also about our free Excel 2010 Password Removal Add-in here.
An alternative method for removing sheet protection is to edit its 'Open XML' file, as described here. Please read this tip to unprotect workbook structure.
Sheet password hashed in Excel 2007-2010
'http://superuser.com/questions/45868/recover-sheet-protection-password-for-and-excel-sheet
Sub PasswordBreaker()
'Author unknown
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 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)
If ActiveSheet.ProtectContents = False Then
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)
ActiveWorkbook.Sheets(1).Select
Range("a1").FormulaR1C1 = Chr(i) & Chr(j) & _
Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub
A popular sheet password breaking VBA procedure of an unknown author (republished for demo purposes)
The above examples are provided for informational purposes only and to create awareness that protection in Excel may not be a reliable method of securing data. Sheet passwords offer little more than protection against accidental damage or uninformed tinkering.
Please contact us to discuss our solution for data security in Excel.
Please contact us to discuss our solution for data security in Excel.
For our free Excel 2007-2010 workbook & worksheet password removal Add-in: click here
