Computer and Software Support


How to determine that hardware DEP is available and configured on your computer

This article is from Microsoft. Article ID 912923  written January 5, 2006

On this Page

 

INTRODUCTION

Data Execution Prevention (DEP) is a set of hardware and software technologies that perform additional checks on memory to help protect against malicious code exploits.

Hardware-enforced DEP marks all memory locations in a process as non-executable unless the location explicitly contains executable code. One kind of malicious code attacks tries to insert and run code from non-executable memory locations. DEP helps prevent these attacks by intercepting them and raising an exception.

This article describes the requirements for using hardware-enforced DEP. This article also describes how to confirm that hardware DEP is working in Windows.

Return to Top

MORE INFORMATION

Requirements for using hardware-enforced DEP

To use hardware-enforced DEP, you must meet all the following conditions:
  1. The computer's processor must support hardware-enforced. DEP. Many recent processors support hardware-enforced DEP. Both Advanced Micro Devices (AMD) and Intel Corporation have defined and shipped Windows-compatible architectures that are compatible with DEP. This processor support may be known as NX( (no-execute) or XD (execute disable) technology. To determine whether your computer's processor supports hardware-enforced DEP, contact the manufacturer of your computer.
  2. Hardware-enforced DEP must be enabled in the BIOS. On some computers, you can disable processor support for hardware-enforced DEP in the BIOS. You must not disable this support. Depending on your computer manufacturer, the option to disable this support may be labeled "Data Execution Prevention," "XD," "Execute Disable," or "NX."
  3. The computer must have Windows XP with Service Pack 2 or Windows Server 2003 with Service Pack 1 installed. Note Both 32-bit versions and 64-bit versions of Windows support hardware-enforced DEP. Windows XP Media Center Edition 2005 and Microsoft Windows XP Tablet PC Edition 2005 include all the features and components of Windows XP SP2.
  4. Hardware-enforced DEP must be enabled for programs on the computer. In 64-bit versions of Windows, hardware-enforced DEP is always enabled for 64-bit native programs. However, depending on your configuration, hardware-enforced DEP may be disabled for 32-bit programs.
For more information, click the following article number to view the article in the Microsoft Knowledge Base: the number will take you to upgradenrepair's page the link to the right is to Microsoft's page.
875352 (http://support.microsoft.com/kb/875352/) A detailed description of the Data Execution Prevention (DEP) feature in Windows XP Service Pack 2, Windows XP Tablet PC Edition 2005, and Windows Server 2003
For information about how to configure memory protection in Windows XP with Service Pack 2, visit the following Microsoft Web site:
http://www.microsoft.com/technet/security/ prodtech/windowsxp/ depcnfxp.mspx (http://www.microsoft.com/technet/security/ prodtech/windowsxp/ depcnfxp.mspx)

How to confirm that hardware DEP is working in Windows

To confirm that hardware DEP is working in Windows, use one of the following methods.

Method 1: Use the Wmic command-line tool

You can use the Wmic command-line tool to examine the DEP settings. To determine whether hardware-enforced DEP is available, follow these steps:
  1. Open the Run or Search window
  2. Press Enter
       
  3. Type wmic os get DataExecutionPrevention_Available
  4. Press Enter
  5. If the output is "TRUE," hardware-enforced DEP is available.

To determine the current DEP support policy, follow these steps

  1. Open the Run or Search window
  2. Press Enter
       
  3. Type wmic OS Get DataExecutionPrevention_SupportPolicy
  4. Press Enter
  5. The value returned will be 0, 1, 2 or 3.
  6. This value corresponds to one of the DEP support policies that are described in the following table

DataExecution Prevention_ Support Policy property value Policy Level Description
2 OptIn (default configuration) Only Windows system components and services have DEP applied
3 OptOut DEP is enabled for all processes. Administrators can manually create a list of specific applications which do not have DEP applied
1 AlwaysOn DEP is enabled for all processes
0 AlwaysOff DEP is not enabled for any processes

Note To verify that Windows is running with hardware DEP enabled, examine the DataExecutionPrevention_Drivers property of the Win32_OperatingSystem class. In some system configurations, hardware DEP may be disabled by using the /nopae or /execute switches in the Boot.ini file. To examine this property, type the following command at a command prompt:
wmic OS Get DataExecutionPrevention_Drivers

Method 2: Use the graphical user interface

To use the graphical user interface to determine whether DEP is available, follow these steps:
  1. Open the Run or Search window
  2. Type wbemtest
  3. Press Enter
       
  4. In the Windows Management Instrumentation Tester dialog box, click Connect
  5. In the box at the top of the Connect dialog box, type root\cimv2
  6. Click Connect
  7. Click Enum Instances
  8. In the Class Info dialog box, type Win23_OperatingSystem in the Enter superclass name box.
  9. Click OK
   
  • In the Query Result dialog box, Double-click the top item. Note This item starts with"Win32_operatingSystem.Name= Microsoft..."
  • In the Object editor dialog box, locate the DataExecutionPrevention_Available property in the properties area.
  • Double-click DataExecutionPrevention_Available.
  • In the Property Editor dialog box, note the value in the Value box
  • If the value is TRUE, hardware DEP is available.
  • NOTES

    The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

    APPLIES TO