So you recently took over a project and as the new lead you need to change some content in a key process document. After you open the document, you find out that it is read only and protected by a password from the last guy who is no longer there…
What??? Anyway, I realize that there are a number of reasons why you need to break read-only protection on a word doc. So before we start, please note that I take zero responsibility for these instructions. You are the master of your own actions and by proceeding, you take full responsibility of your own actions.
Alright, lets crack some Word passwords! Before you start, CREATE A BACKUP FILE OF YOUR DOCUMENT!!!
Crack Microsoft Word Password Instructions
This guide covers the process of breaking the password for read-only or edit protection. If the document is encrypted, This isn’t the guide for you.
Step 1 – Establish the correct file format
This will only work with “.docx” document formats. So, if your document is saved as a 97/2003 document, click file>save-as to a word 2007, 2010 (.docx) document.
Step 2 – Disassemble your document
By default, file extensions are hidden for common document types. You will need to change your folder settings to show file extensions.
Here are some instructions that should cover Windows XP, Vista and Windows 7:
http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions#show-hide-file-name-extensions=windows-vista
UPDATE 02/25/2014: If you are using WinRAR: Open WinRAR, select menu File>Open Archive. Change the file type filter at the bottom to all files. Browse to your .docx file and click Open. Move to step 3.
Once you can see the file extension of your Word Document, change the file extension from .docx to .zip – during this process, you will get a warning that you are changing the extension. Click OK or YES to accept.
Using WinZip, WinRar, or the built in compress/decompress utility, decompress the file into its own folder.
Step 3 – Modify the Password Settings File
Open the main folder of the document>Word(folder) and locate the settings.xml file. Open this file in a text editor such as notepad. My favorite editor for Windows is Notepad++. What ever editor you decide to use, you must use a TEXT editor. Not Word, or Wordpad or MS Works – notepad is always available if you need a default.
Method 1: Remove Password Protection
This method seems to be the most effective and removes password protection completely.
Once you locate the code:
<w:documentprotection w:edit="readOnly" w:formatting="1" w:enforcement="1" w:cryptprovidertype="rsaFull" w:cryptalgorithmclass="hash" w:cryptalgorithmtype="typeAny" w:cryptalgorithmsid="4" w:cryptspincount="100000" w:hash="12YKM3ZX6RxHDHbA4QjcrPZ5SiA=" w:salt="GhD83cbaGHVwS8aGLfql5A==">
</w:documentprotection>
UPDATE: 03/26/2014 – Delete the entire line as formatted like the example above. “w:documentProtection” through the end “/>” after w:salt.
Previous Recommendation:
Change w:enforcement=”1″ to w:enforcement=”0″
Save your file and move to Step 4.
Method 2: Change the Password to 123456
Only attempt this if method #1 was unsuccessful.
This article was originally written based on success breaking password protection on .docx files created in Word 2010. I recently applied these steps to a .docx created in Word 2013 and was experiencing some issues getting the password to change based on the hash values below. Be sure to try method #1 first.
Method #2 Instructions:
Once in the file, locate the line where you see:
<w:documentprotection w:edit="readOnly" w:formatting="1" w:enforcement="1" w:cryptprovidertype="rsaFull" w:cryptalgorithmclass="hash" w:cryptalgorithmtype="typeAny" w:cryptalgorithmsid="4" w:cryptspincount="100000" w:hash="12YKM3ZX6RxHDHbA4QjcrPZ5SiA=" w:salt="GhD83cbaGHVwS8aGLfql5A==">
</w:documentprotection>
Change “w:hash” and “w:salt” to:
w:hash=”12YKM3ZX6RxHDHbA4QjcrPZ5SiA=”
w:salt=”GhD83cbaGHVwS8aGLfql5A==”
After editing, save the document. Move to step 4.
Step 4: Reassemble your document
Although the default Windows file compression tool will work just fine, Winzip and WinRar are great for this task. Compress all files and folders back into an archive folder.
MAKE SURE YOUR ARCHIVE IS IDENTICAL TO THE ORIGINAL – NOT FOLLOWING THIS WILL MAKE IT FAIL.
If you opened your .docx file in WinRar without changing the extension to .zip: Save your changes and move to step 5.
Step 5: Open Your Document
Method #1
Your document should be free of password protection.
Method #2
In Word 2010
Click File Tab>Protect Document>Restrict Editing
At the bottom right Click “Stop Protection”
YOUR NEW PASSWORD IS 123456
Please comment if you get stuck, find an improvement or have a suggestion.
I tried to follow the steps, but in step #2 when I extract the file I get several extension-less files, none of them is named “settings.xml ”
Any help would be highly appreciated, thank you in advance.
Is your source file a .doc or a .docx? If .docx, is the file encrypted?
It is a .docx file and yes it is encrypted.
The file encryption is the problem. This work-around only addresses unencrypted .docx files that are password protected for editing.
Is there anyway to remove or bypass the password of the encrypted file?
Depending on password complexity, most encrypted .docx documents can take a long time to decrypt. I have read estimates of into the thousands of years. This is because of the enterprise strength AES encryption used.
when I reassembled, I had to assume that all of the files from all of the extracted folders should be put back together into ONE archive folder and the zipped?
It did this and the file opened up again ok, but the password does not remove the editing protection. Have checked over and over that I have have replaced just as you said. Any ideas why it is not working?
I added a fix that I found while testing this method against Word 2013 files. Instead of changing the hash and salt, change w:enforcement=”1″ to w:enforcement=”0″. Please let me know if that works.
This does not seem to work for me at all 🙁
Even tried it with a normal (non protected file) and it will not reopen in word as it just say that it is corrupted. I presume I am reassembling incorrectly – anyone help?
On the non protected file…. Change to docx, change to zip, extract using winrar, open (but no changes) to the setting file, close again, use win rar to create archive (by selecting the folders and file that it created when extracting, change rar back to .docx …..
I even tried it by chaning the .docx to ,rar at the start (as I thought maybe the rar-zip thing was the issue. Still no joy…
still just says ‘corrupted’…. 🙁 anyone??
In this case, it sounds like you may be changing your folder structure upon reassembly.
Thank you so much! I had been working on some password-protected documents for ages but after a break from the job suddenly I found the software telling me I was using the wrong password, even though I was sure I had it correct.
Anyway, I cracked it using your method. I’ve never done anything like this before! Alarmingly easy!
Jane
P.S. I had a .dotx (Word 2010 template) file, and the method worked fine.
Excellent! Thank you for the update!
Ruddy marvellous! thanks for your instructions.
Incidentally, I got the following messages when I reopened in Word
“the file cannot be opened because there are problems with the contents”
after clicking on OK I then got
“Word found unreadable content in …..docx. Do you want to recover the contents of this document? If you trust the source of this document, click Yes”
which I did, and it opened without further drama.
I suspect I didn’t re-zip/archive it properly, but I still got it open. On visual comparison, the content is all there.
Much obliged to you Ryan. Your blood’s worth bottling.
That’s awesome! I am happy it worked for you!
i just cantr seem to open my docx file no mattter how i tried all the combinations. i simply dont have the settings .xml thing.pls help.
If you don’t have settings.xml – your document might be encrypted. Unfortunately, this crack does not work on encrypted files.
This time I”m trying to open the same file, but in the meantime I have added a macro to it. Your method works, but the macro is lost! I saved it again as a .docm afterwards, but no macro. Any workaround?
Also, re Clinton’s query, I also wasn’t sure how to put the file back together after changing “enforcement” to “0”, so I just closed it, okayed saving changes, and opened it from within Word. That worked except that macros have disappeared.
What version of Word are you using? Also, which method? Are you opening the document with WinRar or Winzip or saving as a .zip file first?
This worked beautifully for me. It was a .docx file we could open, but could not un-protect until using your method.
Hi,
After i changed the extension and tried to open it in winzip, it says that “Cannot open file: it does not appear to be a valid archive”. Can you tell me whats wrong?
Sounds like your document is encrypted. This fix only removes simple password protection.
Hey, i can´t open a archive using the steps… I think that is encrypted. I have any chance to discover/break the password?
Unfortunately if you don’t know the password, you are pretty much out of options.
I am a novice, so bare with me. Above, when you say “change the file extension from .docx to .zip”, so you mean use ‘rename’ to change the file extension or some other way?
Hello Sandra – Before you do anything, make a backup copy of your file. Yes, to get at the settings file, you need to change the extension of the document from .docx to .zip . Or, since you are more of a novice, I recommend using WinRAR. I will add an update to this post with WinRAR instructions when I get some time in the next few days, but I have a good explanation in my post on cracking Excel Documents. Use the Excel post as a guide for disassembly and the instructions in this post for what to change.
In step 3 above, when you say “Open the main folder of the document>Word(folder) and locate the settings.xml file” , I don’t know where to find the main folder of the document.Word(folder). Sorry for being so basic.
I have a template file with a .dotx extension on it with a password in it to stop editing. I have tried your suggestions several times using WinZip and 7Zip but I get errors with both. I can rename the file and uncompress it into it’s components and edit the file using Notepad++ but whichever method I use when I compress the files back together and try to open the file it fails. Is there some specific method to use to re-compress the zip file before renaming it back and opening the file in Word (Office 2007)? I get an error message “The file [file name].dotx cannot be opened because there are problems with the contents.”. If I then click “Details”, I get “Microsoft Office cannot open this file because some parts are missing or invalid.”. The next message is “Word found unreadable content in “[file name].dotx. Do you want to recover the contents of this document? If you trust the source of this document, click Yes.”. If you click “Yes”, then you go back to the previous error. Can you please suggest a fix for this?
Kev
Dont compress the main folder. If you have windows, select all of the files and send to zip. Rename the zip file back to a docx. or dotx
Thanks Ryan that worked.
This is fantastic. I renamed the .docx as .7Z, opened the settings XML within 7 zip itself (notepad), deleted the code in mehtod 1, saved it and then just renamed the whole folder back to .docx. Couldn’t be simpler!
I tried this metheod, but document doesn’t “havew:documentProtection” statement… Why is that…?
Hi
Thanks a lot. This method worked so well.
If the document you are removing the password from has a referenced template .dotm you will also need to remove the password from the referenced template. If not the template will override the .docx file.
That sounds like it should be correct, thank you for the info!
I have a dotm template that is unviewable with some company macros in it. I need to edit the macros but the guy who wrote the original dotm is long gone and we have no password. I tried the methods detailed here but without any luck. I’m using a Windows 7 Pro machine with Office 2007 in stalled.
Can you offer any advice on how I can edit the macros?
Worked for me!
Amazing! Thanks