how to turn off DEP (Data Execution Prevention) wi

2020-04-14 08:51发布

问题:

I'm writing a test webpage which calls into a function in a DLL file. But every time before i use IE or FF to open it i have to disable DEP(Data Execution Prevention) or the script can't be executed. Current method of disabling DEP requires reboot but i don't want to reboot.

Basically, i'm looking for a way to how to turn off DEP (Data Execution Prevention) without required reboot.

Thanks

回答1:

You can't disable it for a given process after it's enabled, but SetProcessDEPPolicy might help.

If you need to disable it for during boot, you'd have to set the nx boot entry with BCDEdit /set.



回答2:

In linux, you can use the compiler flag "-z execstack"



回答3:

Buffer overflow exploits for windows will often call SetProcessDEPPolicy() after they have gained control of the instruction pointer(EIP). This step is used to make shellcode executable.