With metasploit, we can do thing like injecting a backdoor to one exe file. For example, msfvenom is used ( here is a link for reference https://www.offensive-security.com/metasploit-unleashed/backdooring-exe-files/). Could you please tell me what really happens behind the scene when we inject shell code to an exe file?
To me, injecting backdoor to one exe file is just like injecting code to one existing process; and as I know, dll injection and inline function hooking can do this. However, we need to do DLL injection and inline function hooking in Windows. Here, metasploit and msfvenom could run in linux. Please help me correct my understanding if is there anything wrong.