Skip to content
Access control Write-up Advanced

Relaying to AD Certificate Services over RPC

A misconfigured Active Directory Certificate Services (AD CS) certificate authority did not enforce encryption on its RPC interface, allowing an attacker to relay NTLM authentication and obtain a valid certificate for the victim. This certificate could then be used to impersonate the victim in the domain.

Sylvain Heiniger Follow

Published on blog.compass-security.com

In June last year, the good folks at SpecterOps dropped awesome research on Active Directory Certificate Services (AD CS) misconfigurations. Since then, we find and report these critical vulnerabilities at our customers regularly.

Sylvain Heiniger (@sploutchy), on blog.compass-security.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

The CA's RPC interface did not enforce packet privacy (encryption) for certificate requests, allowing NTLM relay.

What the attacker needed

CA with encryption not enforced; Ability to relay NTLM authentication; Victim authenticates to attacker

The fix

Enforce encryption by setting the IF_ENFORCEENCRYPTICERTREQUEST flag on the CA.

How it was found

  1. Identify a CA with encryption not enforced for ICPR requests.
  2. Set up a relay server to forward NTLM authentication to the CA's RPC interface.
  3. Trigger the victim to authenticate to the attacker's machine.
  4. Relay the authentication to the CA and request a certificate.
  5. Obtain the certificate for the victim.

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) issues digital certificates for authentication. If a certificate authority (CA) does not require encryption on its RPC interface, an attacker can relay a victim's NTLM authentication to the CA and get a certificate for that victim. This certificate can then be used to impersonate the victim.

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.

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.