Requesting Certificates with ML-DSA-Based Keys Through the Network Device Enrollment Service (NDES)

With the May 2026 security update, Microsoft has added support for the ML-DSA algorithm in Active Directory Certificate Services.

In their documentation, they do write that NDES is not compatible with ML-DSA :

You can enroll ML-DSA certificates through the Certificates Microsoft Management Console (MMC) snap-in and certreq.exe. Enrollment through the Network Device Enrollment Service (NDES) isn't currently available.

But that's not entirely true…

Continue reading "Requesting Certificates with ML-DSA-Based Keys Through the Network Device Enrollment Service (NDES)"

Cryptographic Hardening of SCEP Transactions for the Network Device Enrollment Service (NDES)

The Simple Certificate Enrollment Protocol (SCEP) is an ancient protocol from the early 2000s. It does not use Transport Layer Security (TLS). Therefore, the protocol messages are encrypted at the transport layer.

When sending the certificate request to the NDES server, the client will encrypt the certificate request with the NDES server's CEP Encryption certificate (which was previously communicated to it via the GetCACert message).

When the issued certificate is received, the NDES server will encrypt the response with a self-signed certificate temporarily created by the SCEP client.

In both cases, a symmetric encryption algorithm is used.

Continue reading "Cryptographic Hardening of SCEP Transactions for the Network Device Enrollment Service (NDES)"

Attack on the Active Directory via Microsoft Intune - and how it can be contained with TameMyCerts

Dirk-jan Mollema recently presented an attack that can be used to obtain a certificate for highly privileged accounts via Intune . This can then be used to compromise the entire Active Directory environment.

The attack is similar in its basic features to what I have already described in the article "From Zero to Enterprise Administrator through Network Device Enrollment Service (NDES) - and What to Do About It " and in the article "Attack vector on Active Directory directory service via smart card logon mechanism " (generally also known as ESC1 ).

What is new, however, is to utilize the Mobile Device Management (MDM) system - in this case Microsoft Intune - accordingly.

What is not new, however, is what can be done with the TameMyCerts Policy Module for Active Directory Certificate Services to drastically reduce the attack surface...

Continue reading "Attack on the Active Directory via Microsoft Intune - and how it can be contained with TameMyCerts"

Renewal of a certificate via the Network Device Enrollment Service (NDES) fails with error code CERT_E_UNTRUSTEDCA

Assume the following scenario:

  • A certificate is requested through the Network Device Enrollment Service (NDES).
  • Renewal mode is used here, i.e. the certificate request is signed with an existing certificate.
  • The request for the new certificate fails with the following error message:
A certification chain processed correctly, but one of the CA
certificates is not trusted by the policy provider. 0x800b0112 (-2146762478 CERT_E_UNTRUSTEDCA)

Continue reading "Renewal of a certificate via the Network Device Enrollment Service (NDES) fails with error code CERT_E_UNTRUSTEDCA"

Details of the event with ID 86 of the source Microsoft-Windows-CertificateServicesClient-CertEnroll

Event Source:Microsoft-Windows-CertificateServicesClient-CertEnroll
Event ID:86 (0xC25A0056)
Event log:Application
Event type:Error
Event text (English):SCEP Certificate enrollment initialization for %1 via %2 failed: %3 Method: %4 Stage: %5 %6
Event text (German):Fehler bei der Initialisierung der SCEP-Zertifikatregistrierung für %1 über %2: %3 Methode: %4 Phase: %5 %6

Continue reading "Details of the event with ID 86 of the source Microsoft-Windows-CertificateServicesClient-CertEnroll"

Details of the event with ID 87 of the source Microsoft-Windows-CertificateServicesClient-CertEnroll

Event Source:Microsoft-Windows-CertificateServicesClient-CertEnroll
Event ID:87 (0xC25A0057)
Event log:Application
Event type:Error
Event text (English):SCEP Certificate enrollment for %1 via %2 failed: %3 Method: %4 Stage: %5 %6
Event text (German):Fehler bei der SCEP-Zertifikatregistrierung für %1 über %2: %3 Methode: %4 Phase: %5 %6

Continue reading "Details of the event with ID 87 of the source Microsoft-Windows-CertificateServicesClient-CertEnroll"

From Zero to Enterprise Administrator through Network Device Enrollment Service (NDES) - and What to Do About It

In the following, I would like to present a highly dangerous PKI configuration, perhaps not necessarily known to the general public, which can probably be encountered quite frequently in this way in corporate networks.

I show how, by exploiting various unfortunate circumstances in the Windows PKI, it is possible to elevate privileges from mere network access to complete Active Directory takeover.

The initial point of attack in this example is the Network Device Enrollment Service (NDES).

Continue reading "From Zero to Enterprise Administrator through Network Device Enrollment Service (NDES) - and What to Do About It"

SSCEP: Subject of our request does not match that of the returned Certificate!

Assume the following scenario:

sscep: Subject of our request does not match that of the returned Certificate!

Continue reading "SSCEP: Subject of our request does not match that of the returned Certificate!"

Install SSCEP for Linux (Debian Buster) and request certificates via the Network Device Enrollment Service (NDES)

If you want to equip a large number of systems with certificates, a manual request and renewal of the certificates is not an option. The only viable path is automation.

For systems that are not members of the Active Directory forest, an automatic certificate request via RPC/DCOM is not an option.

For certain use cases, the Simple Certificate Enrollment Protocol (SCEP) is an interesting alternative. For this protocol, there are clients not only for Windows but, with SSCEP, also for Linux. SSCEP is used, among others, by thin clients with the eLux operating system .

The following describes how to set up the SSCEP client on a Debian Buster Linux system - either to use it to manage servers or to be able to test the client-side behavior.

Continue reading "Install SSCEP for Linux (Debian Buster) and request certificates via the Network Device Enrollment Service (NDES)"

Requesting a Certificate for Windows Systems Using the SCEP Protocol via the Network Device Enrollment Service (NDES) with Windows PowerShell

If you want to equip Windows systems with certificates that do not have the option of communicating directly with an Active Directory-integrated certification authority, or that are not even in the same Active Directory forest, the only option in most cases is to install certificates manually.

Since Windows 8.1 / Windows Server 2012 R2, however, there is an integrated client for the Simple Certificate Enrollment Protocol (SCEP) on board. On the server side, SCEP has been implemented in the Microsoft PKI via the Network Device Enrollment Service (NDES) since Windows Server 2003.

A particularly interesting feature of SCEP is that the protocol allows a certificate to be renewed by specifying an existing one. So what could be more obvious than to use this interface? What is still missing is a corresponding automation via Windows PowerShell.

Continue reading "Requesting a Certificate for Windows Systems Using the SCEP Protocol via the Network Device Enrollment Service (NDES) with Windows PowerShell"

Basics: Network Device Enrollment Service (NDES)

The Simple Certificate Enrollment Protocol (SCEP) was developed by Verisign for Cisco in the early 2000s to provide a simplified method for requesting certificates. Previously, network devices required manually generating a certificate request on each device, submitting it to a certification authority, and then manually installing the issued certificate on the corresponding device again.

Continue reading "Basics: Network Device Enrollment Service (NDES)"

Details of the event with ID 37 of the source Microsoft-Windows-NetworkDeviceEnrollmentService

Event Source:Microsoft-Windows-NetworkDeviceEnrollmentService
Event ID:37 (0x25)
Event log:Application
Event type:Error
Symbolic Name:EVENT_SCEP_WRITE_DATA
Event text (English):The Network Device Enrollment Service failed while attempting to write the data portion of an http response (%1). %2
Event text (German):Beim Registrierungsdienst für Netzwerkgeräte ist ein Fehler aufgetreten, als versucht wurde, in den Datenbereich einer HTTP-Antwort (%1) zu schreiben. %2

Continue reading "Details of the event with ID 37 of the source Microsoft-Windows-NetworkDeviceEnrollmentService"

Details of the event with ID 36 of the source Microsoft-Windows-NetworkDeviceEnrollmentService

Event Source:Microsoft-Windows-NetworkDeviceEnrollmentService
Event ID:36 (0x24)
Event log:Application
Event type:Error
Symbolic Name:EVENT_SCEP_SERVER_SUPPORT
Event text (English):The Network Device Enrollment Service failed while attempting to write the header portion of an http response (%1). %2
Event text (German):Beim Registrierungsdienst für Netzwerkgeräte ist ein Fehler aufgetreten, als versucht wurde, in den Headerbereich einer HTTP-Antwort (%1) zu schreiben. %2

Continue reading "Details of the event with ID 36 of the source Microsoft-Windows-NetworkDeviceEnrollmentService"

Details of the event with ID 35 of the source Microsoft-Windows-NetworkDeviceEnrollmentService

Event Source:Microsoft-Windows-NetworkDeviceEnrollmentService
Event ID:35 (0x23)
Event log:Application
Event type:Error
Symbolic Name:EVENT_SCEP_RA_CLOSE_TO_EXPIRE
Event text (English):At least one of the certificates for the Network Device Enrollment Service will expire soon. Check the validity period for both the encryption and signing certificates. Renew any certificates that are nearing the end of their validity period and restart the service.
Event text (German):Mindestens ein Zertifikat für den Registrierungsdienst für Netzwerkgeräte wird bald ablaufen. Prüfen Sie den Gültigkeitszeitraum für sowohl die Verschlüsselung als auch die Signaturzertifikate. Erneuern Sie alle Zertifikate, deren Gültigkeitszeitraum bald abläuft, und starten Sie den Dienst neu.

Continue reading "Details of the event with ID 35 of the source Microsoft-Windows-NetworkDeviceEnrollmentService"

Details of the event with ID 34 of the source Microsoft-Windows-NetworkDeviceEnrollmentService

Event Source:Microsoft-Windows-NetworkDeviceEnrollmentService
Event ID:34 (0x22)
Event log:Application
Event type:Error
Symbolic Name:EVENT_SCEP_RA_EXPIRE
Event text (English):At least one of the certificates for the Network Device Enrollment Service has expired. Verify that both the encryption and signing certificates are valid and restart the service.
Event text (German):Mindestens ein Zertifikat für den Registrierungsdienst für Netzwerkgeräte ist abgelaufen. Stellen Sie sicher, dass sowohl die Verschlüsselung als auch die Signaturzertifikate gültig sind, und starten Sie den Dienst neu.

Continue reading "Details of the event with ID 34 of the source Microsoft-Windows-NetworkDeviceEnrollmentService"