NO

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

xxdb999

  • Guest
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?

xxdb999

  • Guest
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