views:

115

answers:

1

ASLR and DEP are two techniques that are used to protect applications from hackers. With many modern applications becoming more security-aware, these techniques are becoming more important. For now, I just focus on Windows 7 and these techniques. I wonder when and how I can best use these techniques, especially when developing desktop applications by using developer tools other than .NET compilers. (For .NET security, this question will provide an answer.) I'm especially interested in compilers like Delphi and C++Builder but also other WIN32 compilers. Basically, how do I get those applications to support both DEP and ASLR? And is there some way that I can control these options from within my own (WIN32) code?

+3  A: 

This is simply a matter of using the right linker option so it flips a bit in the executable header. The Microsoft linker options are /NXCOMPAT (DEP) and /DYNAMICBASE (ASLR). I don't know your tools well enough to know if they have similar options. Editbin.exe supports these options too, you can always run it in a post-build event.

Hans Passant