PKI Blog

Unable to install Network Device Enrollment Service (NDES) at a site with only read-only domain controllers

Assume the following scenario:

  • A Network Device Enrollment Service (NDES) is to be implemented in the network.
  • Only read-only domain controllers (RODC) are located at the Active Directory site of the NDES server.
  • NDES role configuration fails with the following error message:
Failed to add the following certificate templates to the enterprise Active Directory Certificate Service or update security settings on those templates:
EnrollmentAgentOffline 
CEPEncryption
IPSEC(Offline request)
A referral was returned from the server. 0x8007202b (WIN32:8235 ERROR_DS_REFERRAL)

Continue reading "Unable to install Network Device Enrollment Service (NDES) at a site with only read-only domain controllers"

Subsequent archiving of private keys

For the encryption of email messages, companies typically use the Secure / Multipurpose Internet Message Extensions (S/MIME) standard and provide their users with appropriate certificates for this purpose.

An important aspect here is that the users' private keys should be secured centrally - in contrast to the signing certificates that are otherwise mostly used. Incoming messages are encrypted for a specific private key and can only be decrypted again by this key . Thus a backup of these keys must absolutely be available - this is also indispensable for synchronization to mobile devices . For this purpose, the Microsoft Active Directory Certificate Services offer the private key archival function.

But what if private key archival has not been set up and users have already requested corresponding certificates?

Continue reading "Subsequent archiving of private keys"

Requesting certificates for endpoints managed with Microsoft Intune

In a networked world, it has become standard to work from anywhere, and also to work with mobile end devices such as smartphones or tablets in addition to classic desktop computers. Such end devices are usually managed by Mobile Device Management (MDM) systems such as Microsoft Intune.

In most cases, users of mobile devices need digital certificates to prove their identity in order to gain access to corporate resources. Thus, it is necessary to provide these devices with an automatable yet secure interface for requesting these certificates.

Continue reading "Requesting certificates for endpoints managed with Microsoft Intune"

Transferring S/MIME certificates to Microsoft Intune

In a modern networked world, the confidential transmission of messages in the corporate environment is essential for business success. Despite its age , it is still impossible to imagine modern corporate communications without e-mail. However, its use has changed significantly over the decades.

Nowadays, it is common to be able to read and write business e-mails on mobile devices such as smartphones and tablets. Such end devices are usually managed with Mobile Device Management (MDM) systems such as Microsoft Intune.

To encrypt e-mail messages, companies typically use the Secure / Multipurpose Internet Mail Extensions (S/MIME) standard and provide their users with the corresponding certificates. How do these certificates get to the end devices of the users in a scalable way?

Continue reading "Transferring S/MIME certificates to Microsoft Intune"

Signing certificates bypassing the certification authority - solely using built-in tools

In the article "Signing certificates bypassing the certification authority " I described how an attacker with administrative rights on the certification authority can generate a logon certificate for administrative accounts of the domain by bypassing the certification authority software, i.e. by directly using the private key of the certification authority.

In the previous article I used the PSCertificateEnrollment Powershell Module to demonstrate the procedure. However, with certreq and certutil Microsoft already ships perfectly suitable pentesting tools directly with the operating system ex works.

Continue reading "Signing certificates bypassing the certification authority - solely using built-in tools"

Details of the event with ID 41 of the source Microsoft-Windows-Kerberos-Key-Distribution-Center

Event Source:Microsoft-Windows-Kerberos-Key-Distribution-Center
Event ID:41 (0x80000029)
Event log:System
Event type:Warning or error
Event text (English):The Key Distribution Center (KDC) encountered a user certificate that was valid but contained a different SID than the user to which it mapped. As a result, the request involving the certificate failed. See https://go.microsoft.com/fwlink/?linkid=2189925 to learn more. User: %1 User SID: %2 Certificate Subject: %3 Certificate Issuer: %4 Certificate Serial Number: %5 Certificate Thumbprint: %6 Certificate SID: %7
Event text (German):Der Schlüsselverteilungscenter (KDC) hat ein gültiges Benutzerzertifikat gefunden, das jedoch eine andere SID enthielt als der Benutzer, dem es zugeordnet ist. Dies hat zur Folge, dass bei der Anforderung, die das Zertifikat betrifft, ein Fehler aufgetreten ist. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=2189925 . Benutzer: %1 Benutzer-SID: %2 Zertifikatantragsteller: %3 Zertifikataussteller: %4 Seriennummer des Zertifikats: %5 Zertifikatfingerabdruck: %6 Zertifikat-SID: %7

Continue reading "Details of the event with ID 41 of the source Microsoft-Windows-Kerberos-Key-Distribution-Center"

Details of the event with ID 40 of the source Microsoft-Windows-Kerberos-Key-Distribution-Center

Event Source:Microsoft-Windows-Kerberos-Key-Distribution-Center
Event ID:40 (0x80000028)
Event log:System
Event type:Warning or error
Event text (English):The Key Distribution Center (KDC) encountered a user certificate that was valid but could not be mapped to a user in a secure way (such as via explicit mapping, key trust mapping, or a SID). The certificate also predated the user it mapped to, so it was rejected. See https://go.microsoft.com/fwlink/?linkid=2189925 to learn more. User: %1 Certificate Subject: %2 Certificate Issuer: %3 Certificate Serial Number: %4 Certificate Thumbprint: %5 Certificate Issuance Time: %6 Account Creation Time: %7
Event text (German):Der Schlüsselverteilungscenter (KDC) hat ein gültiges Benutzerzertifikat gefunden, das jedoch keinem Benutzer auf sichere Weise zugeordnet werden konnte (z. B. über eine explizite Zuordnung, eine Schlüsselvertrauenszuordnung oder eine SID). Das Zertifikat hat auch dem Benutzer vorangestellt, dem es zugeordnet ist, weshalb es abgelehnt wurde. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=2189925 . Benutzer: %1 Zertifikatantragsteller: %2 Zertifikataussteller: %3 Zertifikatseriennummer: %4 Zertifikatfingerabdruck: %5 Zertifikatausstellungszeit: %6 Erstellungszeit des Kontos: %7

Continue reading "Details of the event with ID 40 of the source Microsoft-Windows-Kerberos-Key-Distribution-Center"

Details of the event with ID 39 of the source Microsoft-Windows-Kerberos-Key-Distribution-Center

Event Source:Microsoft-Windows-Kerberos-Key-Distribution-Center
Event ID:39 (0x80000027)
Event log:System
Event type:Warning or error
Event text (English):The Key Distribution Center (KDC) encountered a user certificate that was valid but could not be mapped to a user in a secure way (such as via explicit mapping, key trust mapping, or a SID). Such certificates should either be replaced or mapped directly to the user via explicit mapping. See https://go.microsoft.com/fwlink/?linkid=2189925 to learn more. User: %1 Certificate Subject: %2 Certificate Issuer: %3 Certificate Serial Number: %4 Certificate Thumbprint: %5
Event text (German):Der Schlüsselverteilungscenter (KDC) hat ein gültiges Benutzerzertifikat gefunden, das jedoch keinem Benutzer auf sichere Weise zugeordnet werden konnte (z. B. über eine explizite Zuordnung, eine Schlüsselvertrauenszuordnung oder eine SID). Solche Zertifikate sollten entweder ersetzt oder dem Benutzer über eine explizite Zuordnung direkt zugeordnet werden. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=2189925 . Benutzer: %1 Zertifikatantragsteller: %2 Zertifikataussteller: %3 Zertifikatseriennummer: %4 Zertifikatfingerabdruck: %5

Continue reading "Details of the event with ID 39 of the source Microsoft-Windows-Kerberos-Key-Distribution-Center"

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"

Installation of a new certification authority certificate fails with error code "ERROR_INVALID_PARAMETER"

Assume the following scenario:

  • A new certification authority certificate is requested for a subordinate certification authority and issued by the parent certification authority.
  • The Subject Distinguished Name (Subject DN) is identical to that of the previous certification authority certificate.
  • However, the installation of the certification authority certificate fails with the following error message:
An error was detected while configuring Active Directory Certificate Services.
The Active Directory Certificate Services Setup Wizard will need to be rerun to complete the configuration.
The new certificate subject name does not exactly match the active CA name.
Renew with a new key to allow minor subject name changes: The parameter is incorrect. 0x80070057 (WIN32: 87 ERROR_INVALID_PARAMETER).

Continue reading "Installation of a new certification authority certificate fails with error code "ERROR_INVALID_PARAMETER""

Character encoding in the Subject Distinguished Name of certificate requests and issued certificates

Usually, the encoding of characters and strings in certificates is not a topic of great interest to the users of a PKI. However, there are cases where the default settings of the certification authority do not provide the desired results.

Continue reading "Character encoding in the Subject Distinguished Name of certificate requests and issued certificates"

List of certificate use cases for which compatibility with elliptic curve (ECC)-based keys is known

As computing power becomes increasingly available, the need to use stronger cryptographic keys also increases. In this course, there is often a need (for example, because the keys have to be protected by a Trusted Platform Module) to use keys based on elliptic curves (ECC) . For their use, it is essential that compatibility with the intended use cases is ensured.

Below is a list of use cases for which I know the compatibility.

Continue reading "List of certificate use cases for which compatibility with elliptic curve (ECC)-based keys is known"

Configuring the Network Device Enrollment Service (NDES) to work with a domain account

The Network Device Enrollment Service (NDES), because it implements the web-based Simple Certificate Enrollment Protocol (SCEP), is mapped as a web application in Microsoft Internet Information Service (IIS). Here, the service runs in an application pool called "SCEP". In many cases it is sufficient to use the integrated application pool identity for it .

However, there are cases where you want to use a domain account. An example of this is the Certificate Connector for Microsoft Intune, which requires this.

Continue reading "Configuring the Network Device Enrollment Service (NDES) to work with a domain account"

The Certificate Connector for Microsoft Intune throws the error message "ArgumentException: String cannot be of zero length" during configuration

Assume the following scenario:

  • An NDES server has been set up for use with Microsoft Intune.
  • The configuration of the Intune Certificate Connector cannot be completed because the following error message is thrown:
Fehler bei der Microsoft Intune Certificate Connector Konfiguration. Es wurden keine Änderungen an Feature- oder Proxyeinstellungen vorgenommen.
Unerwarteter Fehler: System.ArgumentException: Die Zeichenfolge kann keine Länge von 0 (null) haben.
Parametername: name
  bei System.Security.Principal.NTAccount.ctor(String name)

Continue reading "The Certificate Connector for Microsoft Intune throws the error message "ArgumentException: String cannot be of zero length" during configuration"

Logon error with Windows Hello for Business: "Contact your system administrator and tell them that the KDC certificate could not be validated."

Assume the following scenario:

  • The company is using Windows Hello for Business.
  • Users receive the following error message when logging on to the client:
Sign-in failed. Contact your system administrator and tell them that the KDC certificate could not be validated. Additional information may be available in the system event log.

Continue reading "Logon error with Windows Hello for Business: "Contact your system administrator and tell them that the KDC certificate could not be validated.""