Hacking Word Documents via Other Formats

https://www.cs.dartmouth.edu/~sws/word/index.shtml     Last modified: 09/22/02 03:07:07 PM

(a work-in-progress)

We've been kicking around an interesting way to manipulate Word documents:


Why I think this is interesting

A couple of reasons...

Initially, this is fun because it's a way to use official, advertised functionality in a surprising way---and easily defeat a security mechanism. (However, the mechanism is not one designed to withstand a dedicated adversary anyway...)

More importantly:

Some recent examples:

This new line of attack suggests a number of interesting ways to go beyond the user interface.

If this stuff is going to be the standard, then reachable states needs to be well-specified and thought out.

In the long run, "formal methods for office tools" could be an interesting line of work.


Forms Protection in Word

The Motivation

Suppose Alice wants to send Bob a complex document with questions that Bob should answer. Bob should read the questions, fill in the appropriate answers in the spaces provided, and send the document back. In this scenario, to make it easier for Bob to do the right thing (and make it harder for him to surreptitiously change the questions before returning the form), Alice would like to write-protect the entire document, EXCEPT the spaces for the answers.

The IRS got burned by such an attack, back in the days of paper; a client changed the wording of a waiver, signed it, and sent it back; since the IRS neither objected nor noticed, the courts held that the client's altered version was binding.

How it works

Word has two types of forms protection: with and without password. Go to View->Toolbars->Forms to open the forms toolbar.

Here's how the transitions work:


HTML and RTF Workarounds

Word permits easy export into other formats, but expresses much Word-internal structure there, to facilitate bringing the document back. However, these other formats permit some interesting ways to manipulate ther Word doc that Word itself doesn't allow.


Open Office Workarounds

A student reports that Open Office doesn't even understand the the forms protection.


Contributors so far



Back to home page Maintained by Sean Smith, sws@cs.dartmouth.edu