New application security features in Clarion - Clarion

These are good changes for SV to make. I’ll probably stick with classic rebasing because it will be faster and use less memory.

For those that do not take the time to set DLL base addresses ASLR is an improvement over Loader rebasing. Both classic Image_Base and new Dynamic_Base can coexist. Only if the EXE has ASLR=On does the Process have ASLR for those DLLs with ASLR=On.

Note that EXEs get random rebased also, unless they have FIXED in the EXP. In that case the EXE with ASLR=On is loaded as usual at 40’0000h but the DLLs with ASLR get randomized. You can find mentions of this on the web for the MinGW compiler that defaults to FIXED for EXEs.

Some good description here:


1 Like

I’m curious, as far as I know (and I haven’t looked at this in years), isn’t this just implemented as flags in the PE header? If I’m right then in theory any CW app can support ASLR and DEP, you just have to know which bits to twiddle.

Yes PE Optional Header flags in Dll Characteristics. Maybe they made some code changes for DEP.

If you have VS you have EditBin and can set them now. LibMaker has all the code needed to read a PE file header and could write. To do this to the RTL DLLs you would have to unsign them or the digital signature checksum would be bad. There are 2+ on the web. I have one written I’ll post on Github soon. Its a function in ImageHlp.DLL.

IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE
IMAGE_DLLCHARACTERISTICS_NX_COMPAT for DEP