Understanding CVE-2022–26923: A Vulnerability in Active Directo
A flaw in Active Directory Certificate Services let any ordinary domain user obtain a certificate that impersonates a more privileged account, by abusing default machine-enrolment rights and the certificate's Subject Alternative Name. An attacker could then request a Kerberos ticket as that account and escalate to Domain Admin in a single hop.
Published on mainekhacker.medium.com
CVE-2022–26923 is a significant vulnerability in Microsoft’s Active Directory Certificate Services (AD CS) that allows any Active Directory user to escalate their privileges to Domain Admin with just a single hop. This vulnerability was thoroughly researched and documented in a whitepaper by SpecterOps, which…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the machine certificate template put an attacker-controllable DNS hostname into the certificate's Subject Alternative Name, and the uniqueness check on the service principal name could be sidestepped by also changing that name.
Impact
An attacker with only ordinary domain user rights could escalate to Domain Admin, and certificates obtained this way can keep working after password changes for up to about ten years.
What the attacker needed
Any ordinary domain user account; default machine enrolment quota left enabled; default machine certificate template available
The fix
Microsoft added a security extension carrying the account's object identifier inside issued certificates and tightened the DNS hostname write permission so it must match the account name; organisations should also limit automatic template enrolment and set the machine account quota to zero where…
How it was found
- Join a new computer account to the domain using default enrolment rights.
- Change the DNS hostname of that computer object.
- Change the service principal name to get past the uniqueness check.
- Request a certificate from the machine template with the altered name in the Subject Alternative Name.
- Use the certificate to request a Kerberos ticket granting ticket as the targeted privileged account.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Active Directory is Microsoft's system for managing users and computers in a company network. It can also hand out digital certificates, which are electronic ID cards used to prove who you are. The bug meant a normal user could get an ID card that claimed to belong to a powerful administrator, so the network treated them as that administrator.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.