We've covered generating payloads at several points throughout this book. We played around with just plain msfvenom for generating payloads in a variety of formats and with custom options, and we explored stealthy patching of legitimate executables with Shellter for advanced compromise. Now we bring the discussion full-circle by leveraging Metasploit's persistence module.
Persistence with Metasploit and PowerShell Empire
Creating a payload for Metasploit persister
For the sake of this demonstration, we're going to generate a quick and dirty reverse Meterpreter executable. Note, when we configure the persistence module, however, that we can use any executable we want.Â
We'll keep it nice and simple...