Smart card logon fails with 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)"

Assume the following scenario:

  • The company would like to use smart card logon.
  • The domain controllers are equipped with certificates that can be used for smart card logon .
  • The users are equipped with certificates that can be used for smart card logon.
  • Logon to the domain via smart card 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 "Smart card logon fails with 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)""

Signing certificates bypassing the certification authority

Time and again in discussions about the security of a certification authority, it comes up that abuse of the certification authority could be contained by its security settings.

However, the fact that the integrity of a certification authority is directly tied to its key material and can therefore also be compromised through it is not obvious at first glance.

One has to think of the certification authority software as a kind of management around the key material. For example, the software provides an online interface for certificate enrollment , takes care of the authentication of the enrollees, the automated execution of signature operations (issuing certificates and certificate revocation lists ) and their logging (certification authority database , audit log , event log ).

However, signature operations require nothing more than the private key of the certification authority. The following example shows how an attacker, given access to the certification authority's private key, can generate and issue certificates without the certification authority software and its security mechanisms noticing.

With such a certificate, it would in the worst case even be possible to take over the Active Directory forest undetected .

Continue reading "Signing certificates bypassing the certification authority"

Use SSH (PuTTY) on Windows with a certificate / smart card

Secure administration of Linux systems includes avoiding SSH logons by password and instead logging on with RSA keys.

The de facto standard for SSH connections on Windows is PuTTY . Here, logon with RSA keys is implemented, but only key files can be used, which has the disadvantage that they are almost unprotected in the file system.

Surely a great option would be to use RSA keys from the Windows world, and perhaps even stored on a physical or virtual smart card.

Continue reading "Use SSH (PuTTY) on Windows with a certificate / smart card"

Logon via smart card using Remote Desktop (RDP) fails with error message "The requested key container does not exist on the smart card."

Assume the following scenario:

  • A user logs on to a Remote Desktop system using the smart card logon function.
  • The user uses a Yubico Yubikey as a smart card. The required middleware is installed on both the local and the remote system.
  • The logon fails with the following error message:
The system could not log you on. The requested key container does not exist on the smart card.

Continue reading "Logon via smart card using Remote Desktop (RDP) fails with error message "The requested key container does not exist on the smart card.""

Using Authentication Mechanism Assurance (AMA) to secure the logon of administrative accounts

Authentication Mechanism Assurance (AMA) is a feature designed to ensure that a user is a member of a security group only if they can be shown to have logged on using a strong authentication method (i.e., a smart card). If the user logs on via username and password instead, he or she will not have access to the requested resources.

Originally intended for access to file servers, however, AMA can also be used (with some restrictions) for administrative logon. Thus, for example, it would be conceivable for a user to be unprivileged when logging on with a username and password, and to have administrative rights when logging on with a certificate.

Continue reading "Using Authentication Mechanism Assurance (AMA) to secure the logon of administrative accounts"

Logon via smart card fails with error message "Signing in with a security device isn't supported for your account."

Assume the following scenario:

  • A user has a Smartcard Logon certificate and uses it to log on to the Active Directory domain.
  • The logon fails. The following error message is returned to the user on their computer:
Signing in with a security device isn't supported for your account. For more info, contact your administrator.

Continue reading "Logon via smart card fails with error message "Signing in with a security device isn't supported for your account.""

Associate a universal security group with an Object Identifier (OID) in the Active Directory directory service (Authentication Mechanism Assurance)

Authentication Mechanism Assurance (AMA) provides the ability to tie membership in a security group to logon with a smart card certificate containing a specific Object Identifier (OID).

If the user does not log on with the smart card certificate, but with user name and password, he is also not a member of the security group.

The following describes how to establish the connection between the certificate and the security group.

Continue reading "Associate a universal security group with an Object Identifier (OID) in the Active Directory directory service (Authentication Mechanism Assurance)"

Configuring a Certificate Template for Authentication Mechanism Assurance (AMA)

Authentication Mechanism Assurance (AMA) provides the ability to tie membership in a security group to logon with a smart card certificate containing a specific Object Identifier (OID).

If the user does not log on with the smart card certificate, but with user name and password, he is also not a member of the security group.

The following describes how to generate a certificate template for use with Authentication Mechanism Assurance.

Continue reading "Configuring a Certificate Template for Authentication Mechanism Assurance (AMA)"

Creating a virtual smart card in a Hyper-V guest system

For test environments, it is often helpful to be able to work with smart cards. Below is a brief guide on how to set up a virtual smart card in a Hyper-V guest using a virtualized Trusted Platform Module (TPM).

Continue reading "Creating a virtual smart card in a Hyper-V guest system"

Editing the NTAuthCertificates object in Active Directory

In the default configuration, all certification authority certificates of Active Directory integrated certification authorities (enterprise CAs) are located in an object of type CertificationAuthority named NTAuthCertificates within the Configuration Partition of the Active Directory forest.

Continue reading "Editing the NTAuthCertificates object in Active Directory"

Domain controllers do not check Extended Key Usage on smart card logon

Anyone who wants to use the smart card logon feature in their company would be well advised to ensure that their certification authority has the strongest possible security hardening. This includes some essential measures:

  • Removing all unnecessary certification authority certificates from the NTAuthCertificates object in Active Directory : Each certification authority located in this store is authorized to issue smart card logon certificates in Active Directory for the complete forest.
  • Use qualified subordination : Restricting the certification authority certificates so that they are only trusted for the Extended Key Usages actually issued. In the event of a compromise of the certification authority, the damage is then limited to these Extended Key Usages. The "Smart Card Logon" Extended Key Usage would then only be present in the certification authority certificate of the certification authority that actually issues such certificates.

What is interesting about these thoughts, however, is that the domain controllers do not check the Extended Key Usages at all when logging on via smart card.

Continue reading "Domain controllers do not check Extended Key Usage on smart card logon"

Active Directory forest compromised by EDITF_ATTRIBUTESUBJECTALTNAME2 flag

Unfortunately, far too many instructions are circulating online (the big players are not exempt from this either, not even Microsoft itself or the grand master Komar ), which fatally recommend setting the EDITF_ATTRIBUTESUBJECTALTNAME2 flag on the certification authority - supposedly so that one would be able to issue certificates with a Subject Alternative Name (SAN) extension for manually submitted certificate requests.

Unfortunately, this approach is not only unnecessary, it also has some unpleasant side effects, which in the worst case can help an attacker to take over the entire Active Directory forest.

Continue reading "Active Directory forest compromised by EDITF_ATTRIBUTESUBJECTALTNAME2 flag"