Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


August 28, 2008

Configuring DEP to Prevent Malware Attacks


RSS
Subscribe to Windows IT Pro | See More Security Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Windows Gatekeeper

Q: What's the Data Execution Prevention (DEP) security feature that Microsoft introduced in Windows XP SP2? How can it make my Windows system more resistant to malware attacks?

A: DEP is a buffer overrun defense feature. Buffer overruns are often used by malware to get unauthorized access to a system or to execute its malicious payload on a system. A buffer overrun attack typically writes executable malicious code to a program’s memory buffers and then tricks the program into executing the malicious payload. The execution of maliciously injected code can be prevented by DEP. DEP lets an OS mark memory locations that should contain only data as No eXecute (NX). When an application attempts to execute code from NX-marked memory locations, the OS DEP logic will block the application from doing so.

 

DEP is supported in Windows Server 2008, Windows Vista, XP SP2, Windows Server 2003 R2, and Windows 2003 SP1. Two versions of DEP are available: hardware-enforced DEP and software-enforced DEP. Hardware-enforced DEP leverages a processor feature that AMD refers to as the NX-bit and Intel refers to as the eXecute Disable (XD) bit. Today, all Intel and AMD CPUs support DEP. However, this hasn't always been the case: in the early days of DEP, AMD supported NX only on its 64-bit processors, and Intel supported XD only on the Itanium processor, EM64T 64-bit processors, and a small number of 32-bit Prescott processors. Software-enforced DEP lets Microsoft provide DEP on 32-bit processor systems that aren't equipped with a NX- or XD-compatible processor. With software-enforced DEP, the processor-level NX- or XD-bit functionality is provided by set of cookies that the Windows OS automatically adds to data objects stored in the system memory.

 

You can verify whether your system supports hardware- or software-enforced DEP from the DEP configuration settings, which you can access by opening the System Control Panel applet and then selecting Advanced Settings, Performance, Data Execution Prevention. At the bottom of the Data Execution Prevention tab, you'll see a reference to the type of DEP your system supports.

Figure 1 shows the DEP configuration settings on a Vista system. The bottom line reads "Your computer’s processor supports hardware-based DEP." If your system supports software-enforced DEP (meaning your machine doesn't have a NX- or XD-compatible processor) the bottom line will read "Your computer’s processor does not support hardware-based DEP. However, Windows can use DEP software to help prevent some types of attacks."

 

On XP SP2 and Windows 2003 SP1 and later Windows OSs, DEP is enabled by default. However, DEP doesn't always protect all the programs that are running on your system. The programs that are protected by DEP are defined by DEP’s protection level. DEP supports two protection levels. The first protection level (level 1) protects only the Windows system code and executables and doesn't offer DEP protection for additional Microsoft or third-party applications that run on your system. The second protection level (level 2) protects all executable code that runs on your system. This level provides DEP protection for both Windows system code and the Microsoft or third-party applications that run on your system. Application developers can enable DEP support in their applications by using the /NXCompat compilation switch. By default, Vista and XP SP2 run DEP at protection level 1; Server 2008 and Windows 2003 SP1 run DEP at protection level 2.

 

Administrators can configure the DEP protection levels from the DEP configuration screen that Figure 1 shows. In Figure 1, DEP is enabled for essential Windows programs and services only—this is DEP protection level 1. To enable DEP protection level 2, select the Turn on DEP for all programs and services except those I select radio button, which is the default setting on Server 2008 and Windows 2003 SP1 systems.

Protection level 2 also lets you exempt certain applications from DEP protection, as Figure 1 shows. This functionality is very important because there are legacy applications that won't run properly when DEP is enabled. (For example, at the time of this writing, Microsoft Word was automatically exempted from DEP.) Before you switch your DEP protection to level 2, you must run an application compatibility test to ensure that all applications will run properly when DEP is enabled. To exempt one of your applications from DEP, you can add the application’s executable to the excluded list by clicking the Add button in the DEP configuration screen.

 

Another way to exempt an application from DEP is to create a software fix that you distribute to your systems that automatically disables DEP for a given application on those systems. Microsoft refers to this type of software fix as a DisableNX shim. DisableNX shim is described in greater detail in the Microsoft Application Compatibility Toolkit (ACT). ACT also includes the Compatibility Administrator tool, which can help you create the software fix for one of your applications. You can download ACT 5 from http://technet.microsoft.com/en-us/windowsvista/aa905078.aspx.

 

You can easily verify whether an application is protected by DEP by checking the DEP column of the application’s process in the Windows Task Manager. If you don’t see the Data Execution Prevention column in Task Manager, you can easily add it using the View, Select Columns Task Manager option. When you check the DEP column for the Microsoft Internet Explorer 7.0 executable (iexplore.exe) in the Task Manager, you'll notice that DEP is disabled by default. You can enable DEP protection for IE from the IE Advanced Internet Options by selecting Enable memory protection to help mitigate online attacks in the Security options. (Note that changing this property requires administrator-level permissions.) In IE 8.0, DEP protection will be enabled by default.

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

More fun TechEd 2005 Resources

Kevin points out some more TechEd resources ...

WinInfo Short Takes: Week of October 13, 2008

An often irreverent look at some of the week's other news... ...


Security Whitepapers Protecting (You and) Your Data with Exchange Server 2007

Extended Validation SSL Certificates

Unauthorized applications: Taking back control

Related Events Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Microsoft Exchange & Windows Connections event returns to Las Vegas Nov 10 - 13
Connections returns to Las Vegas for this exciting event where each attendee will receive SQL Server 2008 standard with 1 CAL. Co-located with Microsoft ASP.NET, SQL Server, and SharePoint Connections with over 250 in-depth sessions.

Free Online Event! Virtualization:Get the Facts!
Register now and attend this free, live in-depth online conference on November 13 and 20, 2008, produced by Windows IT Pro. All registrants are eligible to receive a complimentary one-year digital subscription to Windows IT Pro (a $49.95 value)!

Check Out Hyper-V Video on ITTV
Watch Karen Forster's interview on Hyper-V's performance on ITTV.net.

Ease Your Scripting Pains with the Flexibility of PowerShell!
Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer!

Latest Advancements in SSL Technology
There are a variety of different kinds of SSL to explore to ensure customer data is kept confidential and secure. In this paper, we will discuss some of these SSL advances to help you decide which would be best for your organization.

PASS Community Summit 2008 in Seattle on Nov 18-21
The don’t-miss event for Microsoft SQL Server Professionals. Register now and you’ll enjoy top-notch Microsoft and Community speakers and more.



Solving PST Management Problems
In this white paper, read about the top PST issues and how to administer local/network PST Files.

Get Protected -- Data Protection Manager 2007
Protect your virtualized environment with Data Protection Manager

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Maximize Your SharePoint Investment: Get Your Data Moving
Watch this web seminar now to learn how to maximize your SharePoint investment! Join us as we take a look at the complex business of securing, accessing and managing vast amounts of information in a global network and various ways to get your data moving.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing