CodeGear’s new Delphi 2007 supports ASLR and NX


From the Helping to Secure the Ecosystem Dept.


 


Here’s some good news for people using CodeGear’s Delphi. The new Delphi 2007 release, available now, supports NX and ASLR.


 


The CodeGear Delphi 2007 compiler supports ASLR via any of these three techniques:



  • Add the command-line switch –dynamicbase when compiling with dcc32

  • Add the preprocessor command ‘{$DYNAMICBASE ON}’ to the source code

  • Manually OR in the bit in the header, with ‘{$SETPEOPTFLAGS $40}’ in the source code


The CodeGear Delphi 2007 compiler supports NX via this technique:



  • Manually OR in the bit in the header, with ‘{$SETPEOPTFLAGS $100}’ in the source code


The easiest way of enabling both ASLR and NX is to do this:



  • Add ‘{$SETPEOPTFLAGS $140}’ to the project source file (.dpr or .dpk)

You can find out more about Delphi 2007 at www.codegear.com.


 


Big thanks to the folks at CodeGear for doing this, thanks Mike :)

Comments (2)

  1. Matthew Murphy says:

    The next logical step: default-on.  That will drastically increase the uptake of NX/ASLR, if the decision to enable Buffer Safety Checking by default in Visual Studio is any indication.