0

I need writing a safe program and prevent it against exploiting in Delphi. I need to enable all protection and mechanism but i don't understand do it.

Protection example:

  1. Safe SEH
  2. SEH Overwrite Protection(SEHOP)
  3. DEP Permanent

and How to running my program under EMET and get green tick?

Grateful you for response and share your information with me.

HamiD
  • 197
  • 1
  • 2
  • 11

1 Answers1

5
  1. Delphi does not support Safe SEH.
  2. SEHOP is an operating system setting. Enable it at the system level.
  3. DEP is enabled by a PE flag. Set it by adding this to your program, e.g. in your .dpr file: {$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_NX_COMPAT }
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Thanks David, Delphi does not support, this mean Delphi default has SEH security? Can you help me How to running my program under EMET? I don't know. – HamiD Oct 03 '13 at 06:50
  • No, Delphi does not produce executables that contain the tables needed for SafeSEH. Well, it probably does in x64 compiler since that uses table based exceptions, but even then I'm not sure if an x64 executable meets SafeSEH. Somehow I doubt it. I've no idea about EMET. I've chosen to answer those parts of your question that I have some knowledge. Your problem is that you ask many questions at the same time (should be one at a time) and give very little background information. That's what your last question was deleted. – David Heffernan Oct 03 '13 at 06:52
  • 4
    OK, websearch suggests that safeseh meaningless on x64 due to table based exception model in the x64 ABI. No need to defend against attacks that modify exception handlers on stack since they don't live on the stack: http://security.stackexchange.com/questions/23315/safeseh-and-x64 – David Heffernan Oct 03 '13 at 09:06