Conversation

Couldn't read past the first blatantly incorrect statement. "_chkstk" doesn't catch shit, all it does is touching all the pages so that you don't subtract more than a page in one go without touching the page guard. It throws, not catches.
1
5
Furthermore, your shellcode won't crash if you don't link against _chkstk, provided that you use the compiler flag for inlining it on gcc, one of the compilers you mention explicitly by name.
2
1
Of course you can simply just copy one after the shellcode too on any other compiler
1
Actually this still seems to call chkstk for whatever reason (despite it being clearly unnecessary after the generic part), but there's some magic combination of flags that omits that too.
1
Or maybe mingw-specific issue, because it seems to work on regular gcc. You can use it for shellcode just as well (or even better with ld scripts), just change default abi to ms
Image
1
Show replies