The principal has control over a victim computer with permission to enroll on one or more certificate templates, configured to enable certificate authentication, and require the dNSHostName
of the enrollee included in the Subject Alternative Name (SAN).
dNSHostName
attribute to match the dNSHostName
of a targeted computer. The attacker principal will then abuse their control over the victim computer to obtain the credentials of the victim computer, or a session as the victim computer, and enroll a certificate as the victim in one of the affected certificate templates. The dNSHostName
of the victim will be included in the issued certificate under SAN DNS name. The UPN certificate mapping configuration on the affected DCs make it possible to authenticate over Schannel as the targeted computer. The DC will split the SAN DNS name into a computer name and a domain name, confirm that the domain name is correct, and use the computer name appended a $ to identify a computer with matching sAMAccountName
which the attacker will be authenticated as.
dNSHostName
on victim.
The SPNs of the victim will be automatically updated when you change the dNSHostName
. AD will not allow the same SPN entry to be set on two accounts. Therefore, you must remove any SPN on the victim account that includes the victim’s dNSHostName
.
Set SPN of the victim computer using PowerView:
dNSHostName
of victim computer to targeted computer’s dNSHostName
.
Set dNSHostName
of the victim principal using Certipy:
dNSHostName
and SPN of victim to the previous value.
To avoid issues in the environment, set the dNSHostName
and SPN of the victim computer back to it’s previous values using Certipy and PowerView:
dNSHostName
on victim.
The SPNs of the victim will be automatically updated when you change the dNSHostName
. AD will not allow the same SPN entry to be set on two accounts. Therefore, you must remove any SPN on the victim account that includes the victim’s dNSHostName
.
Remove SPN entries with ldapmodify:
dNSHostName
of victim computer to targeted computer’s dNSHostName
.
Set dNSHostName
of the victim principal using Certipy:
dNSHostName
and SPN of victim to the previous value.
To avoid issues in the environment, set the dNSHostName
and SPN of the victim computer back to it’s previous value using Certipy and ldapmodify: