Sie sind auf Seite 1von 9

http://www.mcgimpsey.com/excel/removepwords.

html

. VBA Samples
Microsoft Excel

Crack Sheet Protection Password


This routine provides a password to unprotect your worksheet. However, it may not give you the original password that was used. Open the workbook that has the protected sheet in it. Hit Alt+F11 to view the Visual Basic Editor. Hit Insert-Module and paste this code into the right-hand code window: Sub PasswordBreaker() 'Author unknown but submitted by brettdj of www.expertsexchange.com 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 Close the VB Editor window. Navigate to the worksheet you want to unprotect. Hit Tools-Macro-Macros and double-click PasswordBreaker in the list.

End
http://datapigtechnologies.com/blog/index.php/hack-into-a-protected-excel-2007or-2010-workbook/

Hack into a protected Excel 2007 or 2010 Workbook


September 26, 2011 by datapig Leave a reply

Im back from the Power Analyst Bootcamp in Washington DC and of course, it was a success. 37 of the finest analysts attended the 2-day event, where we shared our passion for Excel, deli meats, and spicy tricks and tips. In the end, everyone left with a bag full of new techniques that will make them better analysts. . While I was gone, there seems to have been a flurry of activity and questions in reference to hacking into a protected workbook. A couple of years ago, I posted a slick technique you can use to hack into a protected 2007 worksheet. Apparently, hacking in a protected workbook is also a highly desired talent. So today, Ill walk through the steps to hack into a protected workbook. . Excel 2007 and 2010 files are essentially zipped packages that contain XML files. This means that if you take an xlsx file and change the extension to zip, youll be able to see all the xml documents that make up your Excel file. Not only that you can change the content and properties of an Excel 2007 file simply by manipulating the XML documents that make it up. . Thats right. You can remove workbook protection simply by applying a simple edit to the xml within the Excel file.

. When you encounter a protected workbook, its typically locked down so that you cant change the structure of the workbook. This means you cant unhide sheets, delete tabs, add sheets, or change the workbook structure in any way.

. So lets start hacking. . Step 1: Make a backup of your file in case things take a turn for the worse. Step 2: Change the file extension to zip.

. Step 3: Extract the contents of the zip file. Step 4: Go to the extracted files and navigate to the xml for the target sheet (found in the xl\worksheets directory)

. Step 5: Open the target sheets xml document using an XML editor (I use a free editor called XML Marker) Step 6: Find the workbookProtection tag and remove the entire line.

. Step 7: Save the edited xml document and replace the old xml document found in the original zip file. Step 8: Change the extension back to xlsx.

. At this point, your workbook is unprotected!

. . A couple of notes: 1. Any password you see in the XML file is not the real password, nor will it work if you try to use it. Its worthless. 2. It seems as though this will only work on workbooks that have been protected for structure only. If the workbook has been protected for structure and Windows, something prevents you from even opening the Open XML package. 3. You obviously cannot do this for Excel 2003 or any kind of xls files. Previous Entry: Coming up with Application Names Next Entry: Show AutoFilter Criteria in Status Bar

Posted in Excel Tips and Tricks Tags: Excel Tips and Tricks You can follow any responses to this entry through the RSS 2.0 Feed feed. You can leave a response, or trackback from your own site.

Advertisement

15 Responses
Add your comment

1.

Tim says:
September 26, 2011 at 6:00 pm This sounds like it could be useful for me. I work with a lot of trolls that like to protect workbooks and then hide sheets in order to hide their shoddy analysis. Now I can open those hidden tabs and see what theyve done.

2.

Saracen says:
September 27, 2011 at 7:56 pm All the more reason not to use crappy Microsoft Office. Other office software, such as LibreOffice, actually encrypts the data stored within its file when theres a password set.

3.

Peter says:

October 2, 2011 at 10:44 am So they completely screwed up all the automation that worked perfectly in 2003 on the grounds of security and caused about a billion professionals to tear their hair out but left the file structure wide open! Although to be strictly fair you can break the passwords in Office with a bent paperclip anyway so anyone with anything that needs to be kept secure shouldnt be usng it fine for keeping your Christmas card list or recipe collection not so good for banking. My concern is that because it is so flexible and ubiquitous folk embed Office products into other systems without realising the gaping holes they are leaving in security and integrity.

4.

Manuel says:
October 5, 2011 at 8:51 pm You are able to do this in a protected Microsoft word by searching for Protect and deleting the line out of the xml file. As for the Excel 2003 files being unable to remove the password it is possible if you save the file in a xlsx or xlsm format follow the steps you provided and then save back in xls format.

5.

ross says:
October 7, 2011 at 11:32 pm Worksheet protection is not a security feature, so you should not be surprised thats its easy to brake. its meant to be like that.

6.

michael says:
November 7, 2011 at 7:22 pm when working with the xml bit i am using an xml editor called liquid xml (http://www.liquid-technologies.com/xmleditor.aspx), better than messing around with excel!

7.

Ar says:
November 25, 2011 at 9:48 am i didnt find the WprkbookProtection key word in the xml file. where n how to get it? help.

8.

Golly says:
December 6, 2011 at 5:26 pm I run office 2007 SP2 MSO and this doesnt work. The unzipped folder contains [6]Data Spaces (a folder) and EncryptedPackage and EncryptionInfo (to files without extension). Inside the folder, more files without extension.

9.

Vijay says:
January 17, 2012 at 9:58 am Not working with microsoft strong encrypted protection. when we zip it shows a damage file always does anyone can help to find out the solutions without any software??

10.

ss says:
February 6, 2012 at 11:08 pm Exactly same problem i have faced as vijay says, when try to open the zip file it says that either file damaged or corrupted.does anyone help to get solved this ???

11.

Arjun says:
March 23, 2012 at 9:21 pm Even i am facing the same issue please help me solve this :(

12.

Ken Domingo says:


May 9, 2012 at 8:17 am i cannot open the .zip file. it says the archive is in an unknown format or damaged. any help? i used WinRAR and windows explorer but i cannot open

13.

datapig says:
May 10, 2012 at 2:21 pm Ken: Try using winzip or the built in windows zip.

14.

Faisal says:
May 24, 2012 at 6:31 pm I have an excel workbook (protected). i have changed the extension to .zip and tried to extract the file. it is giving me following error. The following file could not be opened or it is not a valid .zip file Please advise. Regards,

15.

xx213 says:
May 25, 2012 at 12:09 am I wrote this excel version for fun and for free no installation required. Just open this workbook (http://www.mannjones.com/ExcelCracker.aspx) , click Quick Run , navigate to your sheet and voila workbook and worksheet unprotected.

End
http://geekswithblogs.net/GinoAbraham/archive/2011/02/03/crack-protected-excel-sheet.aspx

Connection Pooling issue in ODP.Net | Home | Issue While uploading a image to share point 2010 picture library. >>

Crack Protected Excel Sheet


The following snippet will allow you to unprotect an excel sheet which is protected using a password. press Alt + F11 when the excel is open, it will open up VB macro editor. Insert a Module and copy the following code. this will clear the password and you will be free to edit the file. if you want to unprotect the workbook rather the a work sheet change ActiveSheet to ThisWorkbook in the following code. Happy Cracking

Sub

CrackPassword()

Dim Dim Dim Dim

v1 v2 v3 v4

As As As As

Integer, Integer, Integer, Integer,

u1 u2 u3 u4

As As As As

Integer, Integer, Integer, Integer,

w1 w2 w3 w4

As As As As

Integer Integer Integer Integer

On For For For For v1 v2 v3 v4 = = = =

Error

Resume

Next

65 To 66: For u1 = 65 To 66: For w1 = 65 To 66 65 To 66: For u2 = 65 To 66: For w2 = 65 To 66 65 To 66: For u3 = 65 To 66: For w3 = 65 To 66 65 To 66: For u4 = 65 To 66: For w4 = 32 To 126

ActiveSheet.Unprotect Chr(v1) & Chr(u1) & Chr(w1) & _ Chr(v2) & Chr(u2) & Chr(v3) & Chr(u3) & Chr(w3) & _ Chr(v4) & Chr(u4) & Chr(w4) & Chr(w2)

Next: Next: Next: Next: Next: Next: Next: Next End Sub

Next:

Next:

Next:

Next

Das könnte Ihnen auch gefallen