Hi List,

i had to unlock a password protected word template today. It was protected 
against modification (not the access protection)

So i thought i might share these simple steps to unlock such documents.


A feature of word documents is, that they are some kind of zip files with a 
different extenstion. 

When you unzip these files you get a lot of folders/files likeĀ 

_rels
customXml
docProps
word <-- the main files

in the folder "word" you will find a settings.xml, when you open it look for 
the tag <w:documentProtection


It will look similar to this:

<w:documentProtection w:edit="forms" w:enforcement="1" 
w:cryptProviderType="rsaFull" w:cryptAlgorithmClass="hash" 
w:cryptAlgorithmType="typeAny" w:cryptAlgorithmSid="4" 
w:cryptSpinCount="100000" w:hash="dawdadaw4324aw2dascas=" 
w:salt="sdf+sdfdsf/WA=="/>

delete that tag. Replace the settings.xml in the zip. save and rename to 
.dotx/.doc/.whatever again. 


That's it, the document is unlocked. 

I mean, they are even using salted hashes and all you need to do is delete the 
line. Like its 1998. Impressive. 

Have a nice day,

Conan the Bavarian

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Reply via email to