hasherezade / pe_to_shellcode

Converts PE into a shellcode
https://www.youtube.com/watch?v=WQCiM0X11TA
BSD 2-Clause "Simplified" License
2.27k stars 423 forks source link

Issue creating shellcode #8

Closed matt-handy closed 4 years ago

matt-handy commented 4 years ago

I'm trying to get this working out-of-the-box, and hitting a snag. When I try to run it against both calc.exe and a simple "Hello World" file, I get the following error.

[-] Stub not loaded [-] Adding the stub failed!

I recompiled with debug in the peconv library, and the error being returned comes from this block: HRSRC res = FindResourceA(hInstance, MAKEINTRESOURCEA(res_id), res_type); if (!res) {

ifdef _DEBUG

    std::cerr << "Cannot find resource" << std::endl;

endif

    return nullptr;
}

Am I feeding something incorrect to the program? My arguments are just calc.exe and HelloWorld.exe, making sure those exe files are local to the execution directory.

matt-handy commented 4 years ago

Found an issue in my build environment, closing issue