I was solving bof challenge on http://pwnable.kr/play.phpit is required to smash the stack of the following code #include <stdio.h>#include <string.h>#include <stdlib.h>void func(int key){    char overflowme[32];    printf(overflow me : );    gets(overflowme);   // smash me!    if(key != 0xcafebabe){        system(/bin/sh);    }    else{        printf(Nah..\n);    }}int main(int argc, char* argv[]){    func(0xdeadbeef);    return 0;}and I was given compiler version of that I was supposed to exploitthe task was straightforward but when I overflow the array overflowme the control I never transfered to /bin/sh instead I get something like*** stack smashing detected ***: ./bof terminatedattempt1:try filling the array with zeros except for the key but failedattempt2:get memory dump for where the array is stored and overflow the array with that dump but still failed
How to effectively bypass GCC stack smashing detection
gdb;c;buffer overflow