exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

04.12.05d.txt

04.12.05d.txt
Posted Apr 18, 2005
Site idefense.com

iDEFENSE Security Advisory 04.12.05 (d) - MSHTA vulnerabilities allow attacker-specified programs to be run by specifying a CLSID associated with the desired program.

tags | advisory, vulnerability
advisories | CVE-2005-0063
SHA-256 | 0183c6a07bad05a514025166c46b084f13076710dd0012c9d26bfb0369209dea

04.12.05d.txt

Change Mirror Download
Microsoft MSHTA Script Execution Vulnerability

iDEFENSE Security Advisory 04.12.05
www.idefense.com/application/poi/display?id=231&type=vulnerabilities
April 12, 2005

I. BACKGROUND

Microsoft HTML Application Host (MSHTA) is part of the Microsoft Windows
operating system and is needed to execute .HTA files.

II. DESCRIPTION

Remote exploitation of a design error vulnerability in Microsoft Corp.'s
Windows operating system allows attackers to execute arbitrary script
code from a non-executable object.

Various files, such as a Microsoft Word documents will be opened by the
appropriate program even if they are renamed with an unknown extension.
The reason for this is that the CLSID of the Microsoft Word program is
stored within the OLE2 document. The CLSID of a given file can be
manipulated to specify that another program should handle the opening of
the file. The CLSID is located after the Unicode string "Root Entry" as
seen in the following excerpt:

b800h: 52 00 6F 00 6F 00 74 00 20 00 45 00 6E 00 74 00 R.o.o.t. .E.n.t.
b810h: 72 00 79 00 00 00 00 00 00 00 00 00 00 00 00 00 r.y.............
b820h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b830h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b840h: 16 00 05 01 FF FF FF FF FF FF FF FF 03 00 00 00 ....ÿÿÿÿÿÿÿÿ....
b850h: 06 09 02 00 00 00 00 00 C0 00 00 00 00 00 00 46 ........À......F

In the above example, the CLSID {00020906-0000-0000-C000-000000000046},
can be found at the hex offset 0xb850 from above. An attacker can
execute arbitrary script code from a seemingly non-executable object by
appending script code to the end of a file and modifying the CLSID to be
that of the Microsoft HTML Application Host (MSHTA). The MSHTA CLSID can
be found in the Windows Registry. This attack works because MSHTA.EXE
will completely scan the file passed in as an argument in search of
script code. If found, the code will be executed.

While the given example is built on modifications to a Microsoft Word
document, it is important to note that this vulnerability is not Word
specific or dependant and in fact can not manifest in Word documents
containing a handled file extension.

III. ANALYSIS

Successful exploitation allows remote attackers to execute arbitrary
script code from a non-executable object. This vulnerability can be
leveraged by attackers when distributing malicious content as it will
appear harmless to most users. Exploitation requires that a target user
double-click on a malicious file that contains an unhandled extension.
An attacker may use an extension such as .d0c (numeric zero in place of
letter 'o') to mask the malicious file as a Word document.

Windows XP Service Pack 2 has added a new security feature to Internet
Explorer that prevents and/or warns the user when unsigned executable
content is selected for download. The described vulnerability also
allows an attacker to bypass this security protection.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in Microsoft
Windows 2000 and Microsoft Windows XP. It is suspected that all versions
of Microsoft Windows operating systems are vulnerable.

V. WORKAROUND

Removing the associated CLSID for MSHTA from system registry prevents
exploitation of the described vulnerability:

HKEY_CLASSES_ROOT\CLSID\{3050f4d8-98B5-11CF-BB82-00AA00BDCE0B}

This key should be backed-up before removal. Please note that removing
this key may cause other problems. Preliminary testing shows that the
key is not necessary for regular system usage.

VI. VENDOR RESPONSE

This vulnerability is addressed in Microsoft Security Bulletin MS05-016
available at:

http://www.microsoft.com/technet/security/Bulletin/MS05-016.mspx

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2005-0063 to this issue. This is a candidate for inclusion
in the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VIII. DISCLOSURE TIMELINE

11/02/2004 Initial vendor notification
11/02/2004 Initial vendor response
04/12/2005 Coordinated public disclosure

IX. CREDIT

The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research
http://www.idefense.com/poi/teams/vcp.jsp

Free tools, research and upcoming events
http://labs.idefense.com

X. LEGAL NOTICES

Copyright (c) 2005 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close