当前位置:首页>>软件教程>>新闻内容  
破解Word2003文件密码保护的简单方法
作者:不停歇的脚步 发布时间:2004-1-14 17:13:03 | 【字体:

  在使用Word进行文件保护时,我们经常会使用到窗体保护(工具->保护文档),用窗体保护最为彻底,用户无法编辑,也无法进行Copy&Paste操作,前几天发布的Word文档的漏洞可以让你用很简单的方法去掉这个密码。

  我们自己来测试一下:

  首先创建一个word文档,使用窗体保护的方式保护文档,工具->保护文档->Check“仅允许在文档中进行此类编辑”->Choose“填写窗体”,此时会弹出一个密码框,输入2次密码(我这里选择123作为word文件密码),这样,该文档就已经被保护起来了。

  然后我们来破解它,打开刚才创建的word文档,文件->另存为->选择HTML格式,存为一个HTML文档,用记事本打开该HTML文件,搜索"<w:UnprotectPassword>",你会看到5BCECF7A的字样(如果你的密码是用的123的话)。
  接着我们用UltraEdit或其他类似的工具打开最初受保护的Word文档,搜索7ACFCE5B,搜索到后,都用8个0来代替,存盘。
  此时的Word文档的密码就被清空了,你就可以自己取消文档保护了,密码就不用输入了,按个回车了事。

  MS还没有对这个漏洞提供补丁,我觉得短期可能还无法解决这个问题,建议以后的文档不要用这个东西进行保护了。

提示:经过icech的测试,在Word XP中这种方法不行,在保存成HTML时,会提示什么密码丢失。

以下是原文:

To:  BugTraq
Subject:  Microsoft Word Protection Bypass
Date:  Jan 2 2004 10:51AM
Author:  Thorsten Delbrouck-Konetzko <Thorsten Delbrouck guardeonic com>
Message-ID:  <OF60A8C9AA.4F52F3E5-ON00256E0F.003B08BA-C1256E0F.003B9AEC@localhost>
Hi all,

Microsoft Word provides an option to protect "forms" by password. This is 
used to ensure that unauthorized users cannot manipulate the contents of 
documents except within specially designed "form" areas. This feature is 
also often used to protect documents which do not even have form areas 
(quotations/offers etc.).

This form protection can easily be removed without any additional tools 
(apart from a hex-editor).

Please find the full advisory attached.

best regards,
/tdk

-- 
 Thorsten Delbrouck
 Chief Information Officer

 Guardeonic Solutions AG
 Rosenheimer Str. 116
 D-81669 Munich
---------------------------------


Guardeonic Solutions AG
   Thorsten Delbrouck <tdk guardeonic com>
   http://www.guardeonic.com/

Security Advisory #01-2004

Advisory Name:          Microsoft Word Form Protection Bypass
Release Date:           2004-01-02
Affected Product:       Microsoft Word
Platform:               Microsoft Windows, probably Apple Mac OS
Version:                tested on 2000, 2002 (XP), 2003,
                        probably other versions vulnerable as well

Severity:               Document ("Form") protection can be easily removed

Author:                 Thorsten Delbrouck <tdk guardeonic com>

Vendor Communication:   2003-11-27, 10:30 UTC Microsoft notified
                        to: secure microsoft com
                        
                        2003-11-27 confirmed receipt
                        from: secure microsoft com
                        
                        2003-12-03 Note from Microsoft, Form 
                        protection "is not intended as a full-proof 
                        protection for tampering or spoofing, this is 
                        merely a functionality to prevent accidental 
                        changes of a document", request additional 
                        time to update Microsoft Knowledge Base 
                        article. Targetting beginning of January 2004 
                        for release of this advisory.
                        from: "Magnus" <secure microsoft com>
                        
                        2003-12-08 Microsoft has already released the 
                        KB article (or added a warning to an existing 
                        article). Read the KB article at
                        http://support.microsoft.com/?id=822924 
                        from: "Magnus" <secure microsoft com>

                        
Overview:
---------

Word provides an option to protect "forms" by password. This is used 
to ensure that unauthorized users can not manipulate the contents of 
documents except within specially designed "form" areas. This feature 
is also often used to protect documents which do not even have form 
areas (quotations/offers etc.).

(Word users will find this option on the "Tools" menu, entry 
"Protection", select "Forms" there and provide a password)

If a Word document is "protected" by this mechanism, users cannot 
select parts of the text or place the cursor within the text --- thus 
they cannot make any changes to the document.

Description:
------------

When saving protected Word-documents as html-files, Word adds a 
"checksum" of the password (enclosed in a proprietary tag) to the 
code. The checksum format looks somewhat like CRC32 but currently 
there are no further details available. The same checksum can be 
found within the original Word document (hexadecimal view). If this 
"checksum" is replaced by 0x00000000 the password equals an empty 
string.

Example:
--------

1.) Open a protected document in MS Word
2.) Save as "Web Page (*.htm; *.html)", close Word
3.) Open html-document in any Text-Editor
4.) Search "<w:UnprotectPassword>" tag, the line reads something like 
    that: <w:UnprotectPassword>ABCDEF01</w:UnprotectPassword>
5.) keep the "password" in mind
6.) Open original document (.doc) with any hex-editor
7.) search for hex-values of the password (reverse order!)
8.) Overwrite all 4 double-bytes with 0x00, Save, Close
9.) Open document with MS Word, Select "Tools / Unprotect Document" 
    (password is blank)

Variation:
----------

If the 8 checksum bytes are replaced with the checksum of a known 
password it should be fairly easy to unprotect the document, make any 
necessary changes, save, close and reset the password to the original 
(unknown!) password by simply restoring the original values. Document 
changed without even knowing the password. Nasty.

(Note: Take care to get file properties (author, organisation, 
date/time etc.) right.)

Solution:
---------

No solution is currently available. Do not rely on the "Protect 
Forms" mechanism to protect a Word document against changes.

Credits:
--------

Magnus from the Microsoft Security Response Center for his fast 
responses and for showing a decent sense of humour. :-)


文章来源:securityfocus
·[图]用WORD实现统计文本出现的次数
·[图]让Word自动给图片添加序号
·拯救损坏的Word文档又三招
·[图]Word也能看CCTV
·用Word保存网页中的内容
 放生
 愚爱
 够爱
 触电
 白狐
 葬爱
 光荣
 画心
 火花
 稻香
 小酒窝
 下雨天
 右手边
 安静了
 魔杰座
 你不像她
 边做边爱
 擦肩而过
 我的答铃
 怀念过去
 等一分钟
 放手去爱
 冰河时代
 你的承诺
 自由飞翔
 原谅我一次
 吻的太逼真
 左眼皮跳跳
 做你的爱人
 一定要爱你
 飞向别人的床
 爱上别人的人
 感动天感动地
 心在跳情在烧
 玫瑰花的葬礼
 有没有人告诉你
 即使知道要见面
 爱上你是一个错
 最后一次的温柔
 爱上你是我的错
 怎么会狠心伤害我
 不是因为寂寞才想
 亲爱的那不是爱情
 难道爱一个人有错
 寂寞的时候说爱我