Skip to content
Access control Write-up Advanced

Exploiting Cve 2022 26923 By Abusing Active Directory Certificate Services Adcs

A vulnerable Active Directory Certificate Services template allowed a low-privileged user to request a certificate with an arbitrary subject alternative name, impersonating the domain administrator. An attacker could then authenticate as that administrator and take over the domain.

Lsec Follow

Published on systemweakness.com

CVE-2022–26923 is dangerous. There is large privilege escalation vector aiming directly at the domain’s administrative account(or machine).

Lsec, on systemweakness.com

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 certificate template allowed enrollees to supply the subject (including the subject alternative name) and had client authentication enabled, so a user could request a certificate for any identity.

Impact

An attacker with a low-privileged account could escalate to domain administrator and take over the domain.

What the attacker needed

Low-privileged domain user; AD CS enabled with vulnerable template; template allows enrollee to supply subject

The fix

The vulnerability should be fixed by removing the CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT flag from certificate templates or by ensuring that only trusted users can enroll.

How it was found

  1. Enumerate vulnerable certificate templates using Certify.
  2. Request a certificate for the Administrator using the altname parameter.
  3. Convert the PEM certificate to PFX format using OpenSSL.
  4. Transfer the PFX file back to the Windows machine.
  5. Use Rubeus to request a ticket for the Administrator and perform pass-the-ticket.
  6. Change the Administrator's password and authenticate via SMB.

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 Certificate Services (AD CS) is a system that issues digital certificates, which can be used like ID cards to log in. If a certificate template lets the person asking for a certificate choose whose name goes on it, they can ask for a certificate with the administrator's name and then use it to log in as the 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.

More by Lsec

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.