How the attack works
Active Directory has a feature called authentication mechanism assurance. An administrator links a certificate issuance policy to a security group, and when a user signs in with a certificate that carries this policy, the domain controller adds the group to the user's Kerberos ticket. The user is not a member of the group. The membership exists only for sessions that started with that certificate. The link is the attribute msDS-OIDToGroupLink on the issuance policy object (class msPKI-Enterprise-Oid) in the configuration partition, and a certificate template names the policies of its certificates in msPKI-Certificate-Policy.
The feature turns into an escalation path, known as ESC13, when the linked group has rights that the people who can enroll should not have. An attacker who can write to an issuance policy object links it to a group of their choice. An attacker who can write to a certificate template adds a policy that is already linked. After that, enrolling a certificate from the template and signing in with it is enough. No member is added to any group, so events 4728 and 4756 stay silent and a review of the group shows no members.
The two directory changes are what the logs can show: event 5136 on the policy object for the link, and event 5136 on the template for its policy list. Both objects live in the configuration partition, and the events are written only if an auditing entry (SACL) covers these writes. This page differs from Certificate Template Modification (ESC4), whose rules read the template settings that let an enrollee choose the subject or add an authentication purpose. They do not read the policy list or the policy objects.
What an attacker needs
- Write access to an issuance policy object to set the link, or write access to a certificate template to add a policy that is already linked. Where a template with a linked policy already exists, enrollment rights on it are enough and no directory change is needed.
- A group that can be linked. Microsoft's tooling for the feature accepts only a universal security group that has no members.
- A certification authority that is trusted for authentication and publishes the template, with a certificate purpose that allows client authentication.
Impact
Every session that starts with such a certificate holds the access of the linked group: file shares, servers, directory permissions or whatever the group was granted. The access lasts as long as the certificate is valid and the link exists, survives a password reset of the user, and does not appear in any group membership.
Detection rules
Issuance Policy Added to a Certificate Template
Detects a value added to msPKI-Certificate-Policy on a certificate template (event 5136, Value Added, object class pKICertificateTemplate). The attribute holds the list of policy OIDs that the CA puts into certificates issued from the template. When one of those issuance policies is linked to a group through msDS-OIDToGroupLink, every certificate from the template gives its holder that group at sign-in, so adding a linked policy to a template that many accounts can enroll in is the second way to build the ESC13 path. The event shows the OID that was added in AttributeValue. It does not show whether that policy is linked to a group, so check the policy object after an alert. The rules for Certificate Template Modification (ESC4) do not read this attribute. Requires Audit Directory Service Changes and a SACL that audits writes on certificate templates, which are in the configuration partition.
title: Issuance Policy Added to a Certificate Template
id: 6ebf66da-6e33-4843-a6ca-d43d6d1f8074
status: experimental
description: >-
Detects a value added to msPKI-Certificate-Policy on a certificate template
(event 5136, Value Added, object class pKICertificateTemplate). The
attribute holds the list of policy OIDs that the CA puts into certificates
issued from the template. When one of those issuance policies is linked to
a group through msDS-OIDToGroupLink, every certificate from the template
gives its holder that group at sign-in, so adding a linked policy to a
template that many accounts can enroll in is the second way to build the
ESC13 path. The event shows the OID that was added in AttributeValue. It
does not show whether that policy is linked to a group, so check the policy
object after an alert. The rules for Certificate Template Modification
(ESC4) do not read this attribute. Requires Audit Directory Service Changes
and a SACL that audits writes on certificate templates, which are in the
configuration partition.
references:
- https://learn.microsoft.com/en-us/windows/win32/adschema/a-mspki-certificate-policy
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd378897(v=ws.10)
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
- https://attack.mitre.org/techniques/T1649/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1649
logsource:
product: windows
service: security
detection:
selection:
EventID: 5136
ObjectClass: pKICertificateTemplate
AttributeLDAPDisplayName: msPKI-Certificate-Policy
OperationType:
- '%%14674'
- 'Value Added'
condition: selection
falsepositives:
- PKI administrators who add an issuance policy to a template, for example an assurance level or the organization's certificate policy. Most policies are not linked to a group. Confirm the change and check the policy object for a link.
level: medium
False positives
- PKI administrators who add an issuance policy to a template, for example an assurance level or the organization's certificate policy. Most policies are not linked to a group. Confirm the change and check the policy object for a link.
Issuance Policy Linked to a Group
Detects a value written to msDS-OIDToGroupLink (event 5136, Value Added). The attribute exists on issuance policy objects (class msPKI-Enterprise-Oid) in the configuration partition and identifies the group that corresponds to the issuance policy. Once it is set, a sign-in with a certificate that carries the policy receives that group in its Kerberos ticket. The link belongs to authentication mechanism assurance, a feature few organizations use, so a write is rare, and outside a planned deployment it is the directory change that builds the ESC13 escalation path. The distinguished name of the linked group is in AttributeValue and the policy object in ObjectDN. Requires Audit Directory Service Changes and a SACL that audits writes on the issuance policy objects, which are in the configuration partition.
title: Issuance Policy Linked to a Group
id: ed979810-31ef-43f5-b27e-4463390666e6
status: experimental
description: >-
Detects a value written to msDS-OIDToGroupLink (event 5136, Value Added).
The attribute exists on issuance policy objects (class msPKI-Enterprise-Oid)
in the configuration partition and identifies the group that corresponds
to the issuance policy. Once it is set, a sign-in with a certificate that
carries the policy receives that group in its Kerberos ticket. The link
belongs to authentication mechanism assurance, a feature few organizations
use, so a write is rare, and outside a planned deployment it is the
directory change that builds the ESC13 escalation path. The distinguished
name of the linked group is in AttributeValue and the policy object in
ObjectDN. Requires Audit Directory Service Changes and a SACL that audits
writes on the issuance policy objects, which are in the configuration
partition.
references:
- https://learn.microsoft.com/en-us/windows/win32/adschema/a-msds-oidtogrouplink
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd378897(v=ws.10)
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
- https://attack.mitre.org/techniques/T1649/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1649
logsource:
product: windows
service: security
detection:
selection:
EventID: 5136
AttributeLDAPDisplayName: msDS-OIDToGroupLink
OperationType:
- '%%14674'
- 'Value Added'
condition: selection
falsepositives:
- A planned deployment of authentication mechanism assurance by the PKI team, which links an issuance policy to a group once. Match the event to the change record and check what the linked group can access.
level: high
False positives
- A planned deployment of authentication mechanism assurance by the PKI team, which links an issuance policy to a group once. Match the event to the change record and check what the linked group can access.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Issuance policy linked to a group and added to a template by the same account
A planned rollout of authentication mechanism assurance is prepared over days by the PKI team. An attacker who builds the path does both steps in one sitting. One account that links a policy to a group and shortly after changes the policy list of a certificate template has built everything that is needed to receive the group.
- An issuance policy is linked to a group: event 5136 with
AttributeLDAPDisplayNamemsDS-OIDToGroupLink andOperationTypeValue Added. KeepObjectDN,SubjectUserNameandSubjectLogonId. - Within 24 hours the same
SubjectUserNamechanges the policy list of a certificate template: event 5136 withObjectClasspKICertificateTemplate andAttributeLDAPDisplayNamemsPKI-Certificate-Policy. - After the second change, look on the CA for certificates issued from that template (event 4887) and on the domain controllers for sign-ins with a certificate by the requesters (event 4768 in which
CertThumbprintis not empty).
Events513648874768
LimitsA PKI administrator who deploys the feature performs the same steps, usually with a change record. Where a template already carries the policy, the attacker needs only the link, and only the single-event rule fires. The 24 hours are a starting point. Both events need auditing entries in the configuration partition.
Triage
- Read the policy object (ObjectDN), the group it was linked to (AttributeValue) and the account that wrote the link (SubjectUserName, SubjectLogonId).
- Find out what the linked group can access, including the groups it is nested in and the permissions granted to it in the directory.
- Find the certificate templates that carry the policy and who may enroll in them.
- Search the CA for certificates issued from those templates since the change (event 4887) and for sign-ins with a certificate by their requesters (event 4768 with certificate fields).
- Match the change to a change record. Authentication mechanism assurance is a planned feature and a link that nobody ordered has no routine explanation.
Response
Once the attack is confirmed:
- Remove the link from the issuance policy object, or remove the policy from the template, so that new sign-ins no longer receive the group.
- Revoke the certificates that were issued from the affected templates since the change, and end the sessions of their holders.
- Disable or reset the account that made the change and remove the write access that allowed it.
- Review what the linked group gave access to and what the certificate holders did with it, because the group itself lists none of them as a member.
- Check the other issuance policies and templates for links and policy changes by the same account.
Mitigation
- List the issuance policies that are linked to a group and the templates that carry them, and remove every link that is not part of a documented design. Microsoft publishes a script for this with its guide to authentication mechanism assurance.
- Give a linked group only the access the assurance design needs, and never link a policy to a group that holds administrative rights or is nested in a privileged group.
- Limit write access to the issuance policy objects and to certificate templates to the PKI administrators, and treat both as Tier 0.
- Limit enrollment on templates that carry a linked policy to the accounts the design names, and require approval where that is possible.
- Add auditing entries for writes on the issuance policy and certificate template containers under Public Key Services in the configuration partition, and enable Audit Directory Service Changes on all domain controllers.
Frequently asked questions
Why does the linked group have no members although people use its access?
The domain controller adds the group to the Kerberos ticket at sign-in when the certificate carries the linked issuance policy. Nothing is written to the group. Microsoft's tooling for the feature even requires the group to be empty, so a membership review cannot show who holds the access.
Which groups can an issuance policy be linked to?
Microsoft's script for authentication mechanism assurance reports an error when the group is not a security group, is not universal in scope or has members. The risk therefore lies in empty universal groups that were granted access, directly or by being nested in other groups.
Is an event logged when the linked access is used?
Not one that names the policy. Event 4768 records the issuer, serial number and thumbprint of a certificate used to sign in, but not its issuance policies. The reliable traces are the directory changes, which is why the rules on this page match the link and the policy list of the template.
How does this differ from a certificate template modification (ESC4)?
ESC4 changes a template so that the requester can name another account. Here the certificate names its real owner, and the escalation comes from the group that the issuance policy adds at sign-in. The ESC4 rules do not read the policy list of a template or the issuance policy objects.
References
- MITRE ATT&CK T1649: Steal or Forge Authentication Certificates
- Authentication Mechanism Assurance for AD DS in Windows Server 2008 R2 Step-by-Step Guide
- ms-DS-OIDToGroup-Link attribute
- ms-PKI-Certificate-Policy attribute
- Credential Guard additional mitigations: mapping issuance policy OIDs to universal security groups
- Event 5136: A directory service object was modified
- Event 4768: A Kerberos authentication ticket (TGT) was requested
- Securing PKI, Appendix A: Events to Monitor (CA event 4887)
- SpecterOps: ADCS ESC13 Abuse Technique