Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Exploits-HackingTools
[Top] [All Lists]

[NT] Vulnerabilities in GDI Allows Code Execution (MS08-021)

Subject: [NT] Vulnerabilities in GDI Allows Code Execution (MS08-021)
Date: 9 Apr 2008 09:14:45 +0200
The following security advisory is sent to the securiteam mailing list, and can 
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html 

- - - - - - - - -



  Vulnerabilities in GDI Allows Code Execution (MS08-021)
------------------------------------------------------------------------


SUMMARY

This security update resolves two privately reported vulnerabilities in 
GDI. Exploitation of either of these vulnerabilities could allow remote 
code execution if a user opens a specially crafted EMF or WMF image file. 
An attacker who successfully exploited these vulnerabilities could take 
complete control of an affected system. An attacker could then install 
programs; view, change, or delete data; or create new accounts with full 
user rights.

This is a critical security update for Microsoft Windows 2000 Service Pack 
4, and all supported releases of Windows XP, Windows Server 2003, Windows 
Vista, and Windows Server 2008. For more information, see the subsection, 
Affected and Non-Affected Software, in this section.

DETAILS

Affected Software:
Operating System - Maximum Security Impact - Aggregate Severity Rating - 
Bulletins Replaced by this Update
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=caac000a-22b6-48cb-aa00-1a0bfe886de2>
 Microsoft Windows 2000 Service Pack 4 - Remote Code Execution - Critical - 
MS07-046
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=c2763dd8-a03e-4a48-aa86-a7ec00250a7a>
 Windows XP Service Pack 2 - Remote Code Execution - Critical - MS07-046
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=166f2ab5-913c-47a9-86fe-b814797b751e>
 Windows XP Professional x64 Edition and Windows XP Professional x64 Edition 
Service Pack 2 - Remote Code Execution - Critical - MS07-046
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=bee91d80-d49a-4d3d-82d6-d5aa63f54979>
 Windows Server 2003 Service Pack 1 and Windows Server 2003 Service Pack 2 - 
Remote Code Execution - Critical - MS07-046
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=e3dde449-e062-4ce0-a9f4-433bff23e224>
 Windows Server 2003 x64 Edition and Windows Server 2003 x64 Edition Service 
Pack 2 - Remote Code Execution - Critical - MS07-046
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=7886a802-f2b5-489c-b14b-631f4c4c0742>
 Windows Server 2003 with SP1 for Itanium-based Systems and Windows Server 2003 
with SP2 for Itanium based Systems - Remote Code Execution - Critical - MS07-046
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=9b51deb8-3873-4146-977f-7e3d0840a4c5>
 Windows Vista and Windows Vista Service Pack 1 - Remote Code Execution - 
Critical - None
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=4ad6dcd1-6ea5-43bf-8bee-a5f507beadc6>
 Windows Vista x64 Edition and Windows Vista x64 Edition Service Pack 1 - 
Remote Code Execution - Critical - None
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=006d5c47-53e6-4ee1-932c-497611804938>
 Windows Server 2008 for 32-bit Systems - Remote Code Execution - Critical - 
None
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=8909f144-655b-4f07-916f-fd967f1efb2b>
 Windows Server 2008 for x64-based Systems - Remote Code Execution - Critical - 
None
 *  
<http://www.microsoft.com/downloads/details.aspx?familyid=b7771a4a-4e4f-48d1-8551-bb8b778ca5a7>
 Windows Server 2008 for Itanium-based Systems - Remote Code Execution - 
Critical - None

GDI Heap Overflow Vulnerability - CVE-2008-1083
A remote code execution vulnerability exists in the way that GDI handles 
integer calculations. The vulnerability could allow remote code execution 
if a user opens a specially crafted EMF or WMF image file. An attacker who 
successfully exploited this vulnerability could take complete control of 
an affected system. An attacker could then install programs; view, change, 
or delete data; or create new accounts.

CVE Information:
 <http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1083> 
CVE-2008-1083

Mitigating Factors for GDI Heap Overflow Vulnerability - CVE-2008-1083
Mitigation refers to a setting, common configuration, or general 
best-practice, existing in a default state, that could reduce the severity 
of exploitation of a vulnerability. The following mitigating factors may 
be helpful in your situation.

 * An attacker who successfully exploited this vulnerability could gain 
the same user rights as the local user. Users whose accounts are 
configured to have fewer user rights on the system could be less impacted 
than users who operate with administrative user rights.

 * In a Web-based attack scenario, an attacker could host a Web site that 
contains a Web page that is used to exploit this vulnerability. In 
addition, compromised Web sites and Web sites that accept or host 
user-provided content or advertisements could contain specially crafted 
content that could exploit this vulnerability. In all cases, however, an 
attacker would have no way to force users to visit these Web sites. 
Instead, an attacker would have to persuade users to visit the Web site, 
typically by getting them to click a link in an e-mail message or Instant 
Messenger message that takes users to the attacker's Web site.

Workarounds for GDI Heap Overflow Vulnerability - CVE-2008-1083
Workaround refers to a setting or configuration change that does not 
correct the underlying vulnerability but would help block known attack 
vectors before you apply the update. Microsoft has tested the following 
workarounds and states in the discussion whether a workaround reduces 
functionality.

 * Turn off metafile processing by modifying the registry

Customers who have applied MS07-017 or customers using Windows Vista or 
Windows Server 2008 can disable metafile processing by modifying the 
registry. This setting will help protect the affected system from attempts 
to exploit this vulnerability.

To modify the key, follow these steps:

Note Using Registry Editor incorrectly can cause serious problems that may 
require you to reinstall your operating system. Microsoft cannot guarantee 
that problems resulting from the incorrect use of Registry Editor can be 
solved. Use Registry Editor at your own risk. For information about how to 
edit the registry, view the "Changing Keys And Values" Help topic in 
Registry Editor (Regedit.exe) or view the "Add and Delete Information in 
the Registry" and "Edit Registry Data" Help topics in Regedt32.exe.

1. Click Start, click Run, type Regedit in the Open box, and then click 
OK.

2. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\GRE_Initialize

3. On the Edit menu, point to New, and then click DWORD.

4. Type DisableMetaFiles, and then press ENTER.

5. On the Edit menu, click Modify to modify the DisableMetaFiles registry 
entry.

6. In the Value data box, type 1, and then click OK.

7. Exit Registry Editor.

8. Reboot the computer.

Impact of workaround. Turning off processing of metafiles may cause the 
appearance of software or system components to decrease in quality. 
Turning off processing of metafiles may also cause the software or system 
components to fail completely. It has been identified to have a potential 
significant functionality impact and should be evaluated and tested 
carefully to determine its applicability.

Examples include the following:
 * You cannot print on the computer.
 * Some applications on the computer may be unable to display Clipart.
 * Some scenarios that involve OLE rendering may break. Especially, it 
occurs when the object server is not active.

For more information on this setting please read Microsoft Knowledge Base 
Article  <http://support.microsoft.com/kb/941835> 941835.

Managed Deployment Script:

1. Save the following to a file with a .REG extension (e.g. 
Disable_MetaFiles.reg):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\GRE_Initialize]
"DisableMetaFiles"=dword:00000001

2. Run the above registry script on the target machine with the following 
command from an administrator (on Vista, an elevated administrator) 
command prompt:

Regedit.exe /s Disable_MetaFiles.reg

3. Reboot the computer.

How to undo the workaround:

1. Click Start, click Run, type Regedit in the Open box, and then click 
OK.

2. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\GRE_Initialize\DWORD

3. On the Edit menu, click Modify on the DisableMetaFiles registry entry.

4. In the Value data box, type 0, and then click OK.

5. Exit Registry Editor.

6. Reboot the computer.

Important Notice Regarding Workaround Information.
The Workaround information provided in this document is intended ONLY to 
be an interim (i.e., emergency) solution for an undisclosed security 
vulnerability. Once Microsoft provides a security update, or provides more 
detailed workaround information in a security bulletin, you should not 
continue to use or rely on this Workaround; and you should promptly apply 
any security update and/or updated workaround information subsequently 
provided by Microsoft. In the event this Workaround applies to a version 
of Microsoft software for which no security update will be made available, 
and a more recent version of Microsoft software has addressed the 
underlying security vulnerability or will be updated to address the 
underlying security vulnerability, then you should not rely on this 
Workaround as a permanent solution; and you should install the more recent 
version of such Microsoft software and security updates at the earliest 
possible time.

FAQ for GDI Heap Overflow Vulnerability - CVE-2008-1083
What is the scope of the vulnerability? 
This is a remote code execution vulnerability. An attacker who 
successfully exploited this vulnerability could take complete control of 
an affected system. An attacker could then install programs; view, change, 
or delete data; or create new accounts with full user rights.

What causes the vulnerability?
The vulnerability is caused by a buffer overflow when GDI improperly 
processes a malformed header in a specially crafted EMF or WMF image file.

What is GDI?
The Microsoft Windows graphics device interface (GDI) enables applications 
to use graphics and formatted text on both the video display and the 
printer. Windows-based applications do not access the graphics hardware 
directly. Instead, GDI interacts with device drivers on behalf of 
applications. For more information about GDI, visit the Windows GDI Start 
Page.

What are Windows Metafile (WMF) and Enhanced Metafile (EMF) image formats?
A WMF image is a 16-bit metafile format that can contain both vector 
information and bitmap information. It is optimized for the Windows 
operating system.

An EMF image is a 32-bit format that can contain both vector information 
and bitmap information. This format is an improvement over the Windows 
Metafile Format and contains extended features.

For more information about image types and formats, see Microsoft 
Knowledge Base Article  
<http://support.microsoft.com/default.aspx?scid=kb;en-us;320314> 320314. 
Additional information about these file formats is also available at the 
MSDN Library Web Site.

What might an attacker use the vulnerability to do?
An attacker who successfully exploited this vulnerability could run 
arbitrary code. An attacker could then install programs; view, change, or 
delete data; or create new accounts with full user rights.

How could an attacker exploit the vulnerability?
This vulnerability requires that a user open a specially crafted image 
file.

In an e-mail attack scenario, an attacker could exploit the vulnerability 
by sending a specially-crafted EMF or WMF image file or an Office document 
with a specially-crafted EMF or WMF image file embedded in it to the user 
and by convincing the user to open the document or view the email 
containing the specially crafted image file.

In a Web-based attack scenario, an attacker would have to host a Web site 
that contains an EMF or WMF image file that is used to attempt to exploit 
this vulnerability. In addition, compromised Web sites and Web sites that 
accept or host user-provided content could contain specially crafted 
content that could exploit this vulnerability. An attacker would have no 
way to force users to visit a specially crafted Web site. Instead, an 
attacker would have to convince them to visit the Web site, typically by 
getting them to click a link in an e-mail message or Instant Messenger 
message that takes them to the attacker's site.

What systems are primarily at risk from the vulnerability?
All currently supported Windows systems are at risk. Windows XP Service 
Pack 3 is not affected by this vulnerability.

What does the update do?
The update removes the vulnerability by modifying the way GDI performs 
integer calculations to prevent a heap overflow condition.

When this security bulletin was issued, had this vulnerability been 
publicly disclosed?
No. Microsoft received information about this vulnerability through 
responsible disclosure. Microsoft had not received any information to 
indicate that this vulnerability had been publicly disclosed when this 
security bulletin was originally issued. This security bulletin addresses 
the privately disclosed vulnerability as well as additional issues 
discovered through internal investigations.

When this security bulletin was issued, had Microsoft received any reports 
that this vulnerability was being exploited?
No. Microsoft had not received any information to indicate that this 
vulnerability had been publicly used to attack customers and had not seen 
any examples of proof of concept code published when this security 
bulletin was originally issued.

GDI Stack Overflow Vulnerability - CVE-2008-1087
A remote code execution vulnerability exists in the way that GDI handles 
filename parameters in EMF files. The vulnerability could allow remote 
code execution if a user opens a specially crafted EMF image file. An 
attacker who successfully exploited this vulnerability could take complete 
control of an affected system. An attacker could then install programs; 
view, change, or delete data; or create new accounts.

CVE Information:
 <http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1087> 
CVE-2008-1087

Mitigating Factors for GDI Stack Overflow Vulnerability - CVE-2008-1087
Mitigation refers to a setting, common configuration, or general 
best-practice, existing in a default state, that could reduce the severity 
of exploitation of a vulnerability. The following mitigating factors may 
be helpful in your situation.

 * An attacker who successfully exploited this vulnerability could gain 
the same user rights as the local user. Users whose accounts are 
configured to have fewer user rights on the system could be less impacted 
than users who operate with administrative user rights.

 * In a Web-based attack scenario, an attacker could host a Web site that 
contains a Web page that is used to exploit this vulnerability. In 
addition, compromised Web sites and Web sites that accept or host 
user-provided content or advertisements could contain specially crafted 
content that could exploit this vulnerability. In all cases, however, an 
attacker would have no way to force users to visit these Web sites. 
Instead, an attacker would have to persuade users to visit the Web site, 
typically by getting them to click a link in an e-mail message or Instant 
Messenger message that takes users to the attacker's Web site.

Workarounds for GDI Stack Overflow Vulnerability - CVE-2008-1087
Workaround refers to a setting or configuration change that does not 
correct the underlying vulnerability but would help block known attack 
vectors before you apply the update. Microsoft has tested the following 
workarounds and states in the discussion whether a workaround reduces 
functionality.

 * Turn off metafile processing by modifying the registry

Customers who have applied MS07-017 or customers using Windows Vista or 
Windows Server 2008 can disable metafile processing by modifying the 
registry. This setting will help protect the affected system from attempts 
to exploit this vulnerability.

To modify the key, follow these steps:

Note Using Registry Editor incorrectly can cause serious problems that may 
require you to reinstall your operating system. Microsoft cannot guarantee 
that problems resulting from the incorrect use of Registry Editor can be 
solved. Use Registry Editor at your own risk. For information about how to 
edit the registry, view the "Changing Keys And Values" Help topic in 
Registry Editor (Regedit.exe) or view the "Add and Delete Information in 
the Registry" and "Edit Registry Data" Help topics in Regedt32.exe.

1. Click Start, click Run, type Regedit in the Open box, and then click 
OK.

2. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\GRE_Initialize

3. On the Edit menu, point to New, and then click DWORD.

4. Type DisableMetaFiles, and then press ENTER.

5. On the Edit menu, click Modify to modify the DisableMetaFiles registry 
entry.

6. In the Value data box, type 1, and then click OK.

7. Exit Registry Editor.

8. Reboot computer.

Impact of workaround. Turning off processing of metafiles may cause the 
appearance of software or system components to decrease in quality. 
Turning off processing of metafiles may also cause the software or system 
components to fail completely. It has been identified to have a potential 
significant functionality impact and should be evaluated and tested 
carefully to determine its applicability.

Examples include the following:
 * You cannot print on the computer.
 * Some applications on the computer may be unable to display Clipart.
 * Some scenarios that involve OLE rendering may break. Especially, it 
occurs when the object server is not active.

For more information on this setting please read Microsoft Knowledge Base 
Article  <http://support.microsoft.com/kb/941835> 941835.

Managed Deployment Script:

1. Save the following to a file with a .REG extension (e.g. 
Disable_MetaFiles.reg):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\GRE_Initialize]
"DisableMetaFiles"=dword:00000001

2. Run the above registry script on the target machine with the following 
command from an administrator (on Vista, an elevated administrator) 
command prompt:

Regedit.exe /s Disable_MetaFiles.reg

3. Reboot the computer.

How to undo the workaround:

1. Click Start, click Run, type Regedit in the Open box, and then click 
OK.

2. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\GRE_Initialize\DWORD

3. On the Edit menu, click Modify on the DisableMetaFiles registry entry.

4. In the Value data box, type 0, and then click OK.

5. Exit Registry Editor.

6. Reboot the computer.

Important Notice Regarding Workaround Information.
The Workaround information provided in this document is intended ONLY to 
be an interim (i.e., emergency) solution for an undisclosed security 
vulnerability. Once Microsoft provides a security update, or provides more 
detailed workaround information in a security bulletin, you should not 
continue to use or rely on this Workaround; and you should promptly apply 
any security update and/or updated workaround information subsequently 
provided by Microsoft. In the event this Workaround applies to a version 
of Microsoft software for which no security update will be made available, 
and a more recent version of Microsoft software has addressed the 
underlying security vulnerability or will be updated to address the 
underlying security vulnerability, then you should not rely on this 
Workaround as a permanent solution; and you should install the more recent 
version of such Microsoft software and security updates at the earliest 
possible time.

FAQ for GDI Stack Overflow Vulnerability - CVE-2008-1087
What is the scope of the vulnerability?
This is a remote code execution vulnerability. An attacker who 
successfully exploited this vulnerability could take complete control of 
an affected system. An attacker could then install programs; view, change, 
or delete data; or create new accounts with full user rights.

What causes the vulnerability?
The vulnerability is caused by a stack overflow when GDI improperly 
processes a malformed file name parameter in a specially crafted EMF image 
file.

What is GDI?
The Microsoft Windows graphics device interface (GDI) enables applications 
to use graphics and formatted text on both the video display and the 
printer. Windows-based applications do not access the graphics hardware 
directly. Instead, GDI interacts with device drivers on behalf of 
applications. For more information about GDI, visit the Windows GDI Start 
Page.

What isWindows Enhanced Metafile (EMF) image format?
An EMF image is a 32-bit format that can contain both vector information 
and bitmap information. This format is an improvement over the Windows 
Metafile Format and contains extended features.

For more information about image types and formats, see Microsoft 
Knowledge Base Article  
<http://support.microsoft.com/default.aspx?scid=kb;en-us;320314> 320314. 
Additional information about these file formats is also available at the 
MSDN Library Web Site.

What might an attacker use the vulnerability to do?
An attacker who successfully exploited this vulnerability could run 
arbitrary code. An attacker could then install programs; view, change, or 
delete data; or create new accounts with full user rights.

How could an attacker exploit the vulnerability?
This vulnerability requires that a user open a specially crafted image 
file.

In an e-mail attack scenario, an attacker could exploit the vulnerability 
by sending a specially-crafted EMF image file or an Office document with a 
specially-crafted EMF image file embedded in it to the user and by 
convincing the user to open the document or view the email containing the 
specially crafted image file.

In a Web-based attack scenario, an attacker would have to host a Web site 
that contains an EMF image file that is used to attempt to exploit this 
vulnerability. In addition, compromised Web sites and Web sites that 
accept or host user-provided content could contain specially crafted 
content that could exploit this vulnerability. An attacker would have no 
way to force users to visit a specially crafted Web site. Instead, an 
attacker would have to convince them to visit the Web site, typically by 
getting them to click a link in an e-mail message or Instant Messenger 
message that takes them to the attacker's site.

What systems are primarily at risk from the vulnerability?
All currently supported Windows systems are at risk. Windows XP Service 
Pack 3 is not affected by this vulnerability.

What does the update do?
The update removes the vulnerability by modifying the way GDI handles 
filename parameters to prevent stack overflow conditions.

When this security bulletin was issued, had this vulnerability been 
publicly disclosed?
No. Microsoft received information about this vulnerability through 
responsible disclosure. Microsoft had not received any information to 
indicate that this vulnerability had been publicly disclosed when this 
security bulletin was originally issued. This security bulletin addresses 
the privately disclosed vulnerability as well as additional issues 
discovered through internal investigations.

When this security bulletin was issued, had Microsoft received any reports 
that this vulnerability was being exploited?
No. Microsoft had not received any information to indicate that this 
vulnerability had been publicly used to attack customers and had not seen 
any examples of proof of concept code published when this security 
bulletin was originally issued.


ADDITIONAL INFORMATION

The information has been provided by Microsoft Product Security.
The original article can be found at:  
<http://www.microsoft.com/technet/security/Bulletin/MS08-021.mspx> 
http://www.microsoft.com/technet/security/Bulletin/MS08-021.mspx



======================================== 


This bulletin is sent to members of the SecuriTeam mailing list. 
To unsubscribe from the list, send mail with an empty subject line and body to: 
list-unsubscribe@securiteam.com 
In order to subscribe to the mailing list, simply forward this email to: 
list-subscribe@securiteam.com 


==================== 
==================== 

DISCLAIMER: 
The information in this bulletin is provided "AS IS" without warranty of any 
kind. 
In no event shall we be liable for any damages whatsoever including direct, 
indirect, incidental, consequential, loss of business profits or special 
damages. 




<Prev in Thread] Current Thread [Next in Thread>
  • [NT] Vulnerabilities in GDI Allows Code Execution (MS08-021), SecuriTeam <=