Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1989

C++ Shellcode from char into virtualalloc & memcpy does not work

$
0
0
I am having a hard time figuring out why the payload isn't working after reversing in decoder2.cpp. When I "cout" the output of the "Reverse(input);" I get a valid shellcode and can be inserted into decoder1.cpp without any problems.

decoder1.cpp
Code:
int main()
{
  //char code[]  = "\xfc\xe8\x8f...";  // INSERT SHELLCODE HERE
    void *exec = VirtualAlloc(0, sizeof input, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
    memcpy(exec, input, sizeof input);
    ((void(*)())exec)();...
C++ Shellcode from char into virtualalloc & memcpy does not work

Viewing all articles
Browse latest Browse all 1989

Trending Articles