1. Research - Home |
  2. Advisories |
  3. Alerts |
  4. Tools |
  5. Papers |
  6. Services |
  7. Contact |
  8. About
Home > Advisories > Published Advisories > AD20030903-1
Advisories
Microsoft WordPerfect Document Converter Buffer Overflow Release Date:
September 3, 2003

Date Reported:
May 6, 2003

Patch Development Time (In Days):
120  

Severity:
Medium (Code Execution with User Interaction)

Vendor:
Microsoft

Systems Affected:
Microsoft Office 97, 2000, XP
Microsoft Word 98 (J)
Microsoft FrontPage 2000, 2002
Microsoft Publisher 2000, 2002
Microsoft Works Suite 2001, 2002, 2003

Overview:
The Microsoft Word "WordPerfect" document converter included in Microsoft Word has a buffer overflow vulnerability. If the WordPerfect document converter is installed (installed by default in Office 2000) and a malicious .doc file is opened, an attacker has the ability to execute arbitrary code.

This buffer overflow can also happen within Internet Explorer, because Microsoft Word is executed automatically as a helper-application when a .doc file is received.

This buffer overflow overwrites the return address in the stack area. We confirmed that arbitrary code can be executed by using this buffer overflow vulnerability.

Technical Details:
Technical Description:
While parsing a WordPerfect file, the WordPerfect converter copies data stored in the .doc file to a local buffer. If we modify some bytes of the .doc file, we can specify the data offset and data size. The WordPerfect converter doesn't properly check the size of the data contained in the .doc file, and tries to copy all of the data from the file to the local buffer allocated in the stack area. This results in a typical buffer overflow vulnerability with which we can set any value for EIP.

The process for making the .doc file to confirm this buffer overflow is as follows:

1. Open Word and save an empty document as a WordPerfect 5.0 file.
2. Open the .doc file in a binary editor. You'll be able to confirm the following dump image:

ADDRESS 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
0123456789ABCDEF

00000000 FF 57 50 43 6D 02 00 00 01 0A 00 00 00 00 00 00
.WPCm...........
...
00000130 00 00 00 00 CD 01 00 00 08 00 02 00 00 00 CD 01
................
...
000001C0 61 75 74 68 6F 72 00 65 45 79 65 00 00 00 00 FB
author.eEye.....
000001D0 FF 05 00 32 00 00 00 00 00 01 01 6C 00 00 00 01
...2.......l....
000001E0 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................

3. Modify 0x00 to 0x01 in offset 0x00000139.
4. Modify 0x00 to the value more than 0x80 in offset 0x000001D8.
5. Modify 0x00 to the value more than 0x01 in offset 0x000001E1 to 0x000001FF.
6. Append garbage data (e.g., a long string of A's) onto the end of this file.

Protection:
Retina Network Security Scanner has been updated to identify this vulnerability.

Vendor Status:
Microsoft has released a patch for this vulnerability. The patch is available at:
http://www.microsoft.com/technet/security/bulletin/MS03-036.asp

Credit:
Yuji "The Ninja" Ukai

Related Links:
Retina Network Security Scanner - Free 15 Day Trial
http://www.eeye.com/html/Products/Retina/index.html

Greetings:
Shanti, Yukkie, TEX, Sakuranamiki people, AD200X people

Copyright (c) 1998-2008 eEye Digital Security
Permission is hereby granted for the redistribution of this alert electronically. It is not to be edited in any way without express consent of eEye. If you wish to reprint the whole or any part of this alert in any other medium excluding electronic medium, please email alert@eEye.com for permission.

Disclaimer
The information within this paper may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are no warranties, implied or express, with regard to this information. In no event shall the author be liable for any direct or indirect damages whatsoever arising out of or in connection with the use or spread of this information. Any use of this information is at the user's own risk.