C++ script to migrate your running process to another, by injecting your shell code into 64 bit process knowing its id.
-
Update the code by generating new msfvenom with your local address and local port, noting that the payload used for that code is windows/x64/meterpreter/reverse_tcp, after generating your venom update the "shellcode" variable with your venom.
-
Compile the code using g++ inject.cpp -o inject.exe.
-
Upload your exe file to the target machine.
-
Configure the listner in new metasploit window.
-
Choose the target process to which you would like to migrate.
-
run migrate.exe <process_id>