Questions tagged [data-execution-prevention]

Data Execution Prevention (DEP) is a security feature of modern operating systems and CPUs intended to prevent the execution of code/data located in a memory region not explicitly marked as executable.

Data Execution Prevention (DEP) is a security feature of modern operating systems and CPUs intended to prevent the execution of code/data located in a memory region not explicitly marked as executable. One of the usual ways of accomplishing this in hardware is by use of the NX bit. Modern versions of Windows, OS X, and Unix-like operating systems all support DEP: Windows support was instituted in Windows XP Service Pack 2 in 2004, in all versions of OS X running on x86 processors in 2006, and in the 2.8.6 version of the Linux kernel in 2004.

A limited form of DEP is available without hardware support, but it is less effective. DEP provides some protection against attacks but, like any other individual security feature, DEP alone is not sufficient to protect against all forms of attack. Other security features such as address space layout randomization, structured exception handler overwrite protection, and Mandatory Integrity Control, can be used in conjunction with DEP.

The name "Data Execution Prevention" is primarily used in the Windows contexts: other OSes may use different terms for the feature.

13 questions
11
votes
1 answer

why can't Javascript shellcode exploits be fixed via "data execution prevention"?

The "heap spraying" wikipedia article suggests that many javascript exploits involve positioning a shellcode somewhere in the script's executable code or data space memory and then having interpreter jump there and execute it. What I don't…
7
votes
1 answer

Simple Data Execution Prevention example code for Delphi

For a test 'crash' I need a small piece of Delphi code to see how the operating system logs the DEP violation in the event log. I have found many sources around activating DEP but not about how to 'trigger' a DEP violation. Do you have an…
mjn
  • 36,362
  • 28
  • 176
  • 378
6
votes
1 answer

How do I enable DEP or ASLR for my .NET application?

I'm writing my program in VS2010 and the build target is .NET 4. I believe that the DEP compatibility flag is on by default. Is that true? Is .NET also compatible by default with ASLR, and is ASLR turned on by default for my process, or do I have…
Scott Whitlock
  • 13,739
  • 7
  • 65
  • 114
2
votes
6 answers

AccessViolationException with a webbrowser in a windows form

I have written a basic Windows Form app in C# that has an embedded web browser control. I am navigating to a page to view a camera's feed. The application works fine on Windows XP, but not on Vista. On Vista, I get a AccessViolationException. …
David Hodgson
  • 10,104
  • 17
  • 56
  • 77
2
votes
1 answer

Linux equivalent for VirtualProtectEx?

I am doing some simple JITing, and use VirtualProtectEx under Windows to mark pages as executable. What would be the equivalent of that under Linux, and preferably, other POSIX/Unix-like OSes too?
uj2
  • 2,255
  • 2
  • 21
  • 32
1
vote
1 answer

Data Execution Prevention with Windows Services

I am running Windows 7 Ultimate 64 bit. I have a windows service (written in C#) that calls into a dll released by an major telecoms service provider here in South Africa (TELKOM). The dll is called MPIEst.dll, and I believe it was written in C++.…
CODES_ONLY
  • 181
  • 2
  • 11
1
vote
1 answer

Cannot execute function JITed by LLVM

Using LLVM-5.0 I implemented a minimal testcase that creates assembly for a function returning the 32bit integer "42" at runtime and executes it. Using llvm::ExecutionEngine I was able to generate the following code at runtime (displayed with…
Richard
  • 1,117
  • 11
  • 31
1
vote
1 answer

when will a process need memory pages with both write and exec permissions at once

I'm trying to understand how programs can be isolated and secured. Are there any valid cases when processes should require PROT_WRITE |PROT_EXEC on a memory page? Can this be avoided? This seems like the opposite of the things the NX bit or W^X or…
staticd
  • 1,194
  • 9
  • 13
1
vote
4 answers

Delphi 2006 always stops working when closed on Vista

Whenever I stop the Galileo IDE from Delphi 2006 under Vista, I get Microsoft Windows Borland® Developer Studio for Windows has stopped working A problem caused the program to stop working correctly. Please close the program. [Close the…
0
votes
1 answer

Check if DEP is enabled

Is it possible to check if Data Execution Prevention is enabled? Is there any function that works the same as this CMD command wmic OS Get DataExecutionPrevention_SupportPolicy And returns something like this? 0 – DEP is disabled for all…
John
  • 21
  • 4
0
votes
1 answer

Possible Data Execution Prevention (DEP) problem in Windows 7

I have a serious problem with my .Net program. It calls a native dll, and then crashes instantly because it can't find a native method. This is behaviour we have seen before, whereby the C# compiler, in its infinite wisdom, sets the flag that the…
Joel in Gö
  • 7,460
  • 9
  • 47
  • 77
0
votes
0 answers

Data Execution Prevention of Delphi 6

I have Delphi 6 on a computer using VISTA. It has been running OK for years, but now Windows just sends me a message saying Delphi 32 Development Environment has stopped working and was closed due to Data Execution Prevention. I tried to change…
-1
votes
5 answers

Why does FogBugz require that the DEP is turned off?

I am really wondering why FogBugz when installed locally insists that DEP is turned off?
Johan