NO

Author Topic: How do I turn off stack overflow protection etc in linker/compiler switches?  (Read 89 times)

Offline xxdb999

  • Member
  • *
  • Posts: 3
Hi,

I'm doing a security certification (OSCP) one part of which is exploiting basic buffer overflows. I'd like to write some code which overflows stack buffers so I can practice for my exam but I believe there is stack protection turned on because my overflow code doesn't overflow and doesn't segfault.

What are the linker/compiler switches to turn off any kind of stack or buffer protection?

Offline xxdb999

  • Member
  • *
  • Posts: 3
REPLY TO SELF (and for those who are interested):

It looks like the answer is /SAFESEH:No added to  command line options (LINKFLAGS):

in Project > Options > Linker > Command line options (LINKFLAGS)

in my case:

-subsystem:console -machine:x86 /SAFESEH:NO kernel32.lib advapi32.lib delayimp.lib