Prevent unprivileged accounts from reading the configuration of the certification authority

During penetration tests and also for attackers searching the network for potential targets, insights into the configuration of the certification authority are highly interesting.

In addition to possible misconfigurations, attackers can obtain information about the policy module used on the certification authority.

Continue reading "Prevent unprivileged accounts from reading the configuration of the certification authority"

The role configuration for the Certificate Enrollment Web Service (CES) fails with error message "The RPC server is unavailable. 0x800706ba (WIN32: 1722 RPC_S_SERVER_UNAVAILABLE)"

Assume the following scenario:

  • A role configuration for the Certificate Enrollment Web Service (CES) is performed.
  • The role configuration fails with the following error message:
The Certificate Enrollment Web Service Setup failed because the CA "CA02.intra.adcslabor.de\ADCS Labor Issuing CA 1" cannot  be contacted. Check the name, and confirm that the CA is properly configured and available. The RPC server is unavailable. 0x800706ba (WIN32: 1722 RPC_S_SERVER_UNAVAILABLE)   

Continue reading "The role configuration for the Certificate Enrollment Web Service (CES) fails with error message "The RPC server is unavailable. 0x800706ba (WIN32: 1722 RPC_S_SERVER_UNAVAILABLE)""

Analyze network problems with Wireshark without installing software on production systems

Often, problems with the public key infrastructure can be found in the underlying network - for example, if a firewall rule is missing from the network.

Thus, it is helpful if one is able to record network traffic in order to analyze it. Excellent tools exist for this purpose, such as Wireshark , but these require that an installation be made on the system in question, which cannot and should not be done easily on a production system.

Fortunately, the Windows Server operating system has a built-in mechanism to capture network packets. However, the resulting files are not compatible with Wireshark. Microsoft's own tool, Message Analyzer, was discontinued on Nov 25, 2019 and the download links removed .

The following therefore describes how such a recording can be generated and subsequently converted into a Wireshark-compatible format in order to be able to analyze the recording away from the server in question.

Continue reading "Analyze network problems with Wireshark without installing software on production systems"

The Network Device Enrollment Service (NDES) logs the error message "The Network Device Enrollment Service cannot be started (0x80004005). Unspecified error"

Assume the following scenario:

  • An NDES server is configured on the network.
  • When accessing the NDES request web page (mscep) and the NDES administration web page (certsrv/mscep_admin), HTTP error 500 (Internal Server Error) is reported with error code 0x80004005.
  • Events No. 2 and No. 8 are logged in the application event log:
The Network Device Enrollment Service cannot be started (0x80004005). Unspecified error

Continue reading "The Network Device Enrollment Service (NDES) logs the error message "The Network Device Enrollment Service cannot be started (0x80004005). Unspecified error""

Configuring the certification authority to a static port (RPC endpoint)

In the default configuration, the certification authority's certificate request interface is configured to negotiate dynamic ports for the incoming RPC/DCOM connections (for more details, see the article "Firewall rules required for Active Directory Certificate Services ").

Network protocolDestination portProtocol
TCP135RPC Endpoint Mapper
TCP49152-65535RPC dynamic ports

This configuration is not feasible in every enterprise environment. Often there are restrictive firewall rules that do not allow the use of dynamic network ports.

In such a case, the certification authority must be configured to a static port.

Continue reading "Configuring the certification authority to a static port (RPC endpoint)"

Querying the configured RPC endpoints of a certification authority

In the default configuration, the certification authority's certificate request interface is configured to negotiate dynamic ports for the incoming RPC/DCOM connections (for more details, see the article "Firewall rules required for Active Directory Certificate Services ").

However, it is also possible to configure the certification authority to a static port (see article "Configuring the certification authority to a static port (RPC endpoint) ").

The following describes how to check the current configuration of the certification authority.

Continue reading "Querying the configured RPC endpoints of a certification authority"

Requesting a certificate via Certification Authority Web Enrollment (CAWE) fails with HTTP error code 500 "Internal Server error"

Assume the following scenario:

  • A Certification Authority Web Enrollment (CAWE) server is installed on the network.
  • The role is installed on a separate server, not on the certification authority directly.
  • A user attempts to request a certificate via Certification Authority Web Enrollment or submit an existing certificate request to the certification authority.
  • The request takes a very long time and finally fails with HTTP code 500 "Internal server error":
There is a problem with the resource you are looking for, and it cannot be displayed.

Continue reading "Requesting a certificate via Certification Authority Web Enrollment (CAWE) fails with HTTP error code 500 "Internal Server error""

Required firewall rules for the Certificate Enrollment Policy Web Service (CEP)

Implementing a Certificate Enrollment Policy Web Service (CEP) often requires planning the firewall rules to be created on the network. The following is a list of the required firewall rules and any pitfalls.

Continue reading "Required firewall rules for the Certificate Enrollment Policy Web Service (CEP)"

Requesting a certificate via Certification Authority Web Enrollment (CAWE) takes a very long time

Assume the following scenario:

  • A Certification Authority Web Enrollment (CAWE) server is installed on the network.
  • The role is installed on a separate server, not on the certification authority directly.
  • A user attempts to request a certificate via Certification Authority Web Enrollment or submit an existing certificate request to the certification authority.
  • The process is successful, but the request takes a very long time (up to several minutes).

Continue reading "Requesting a certificate via Certification Authority Web Enrollment (CAWE) takes a very long time"

Requesting certificates via the Certificate Enrollment Web Service (CES) fails with error code "ERROR_INTERNET_TIMEOUT"

Assume the following scenario:

  • You try to request a certificate via a Certificate Enrollment Web Service (CES) from an Active Directory-integrated certification authority (Enterprise Certification Authority).
  • The operation fails with the following error message:
The operation timed out 0x80072ee2 (INet: 12002 ERROR_INTERNET_TIMEOUT)

Continue reading "Requesting certificates via the Certificate Enrollment Web Service (CES) fails with error code "ERROR_INTERNET_TIMEOUT""

Requesting certificates via the Certificate Enrollment Web Service (CES) fails with error code "ERROR_WINHTTP_CANNOT_CONNECT"

Assume the following scenario:

  • You try to request a certificate via a Certificate Enrollment Web Service (CES) from an Active Directory-integrated certification authority (Enterprise Certification Authority).
  • The operation fails with the following error message:
Certificate Request Processor: A connection with the server could not be established 0x80072efd (WinHttp: 12029 ERROR_WINHTTP_CANNOT_CONNECT)

Continue reading "Requesting certificates via the Certificate Enrollment Web Service (CES) fails with error code "ERROR_WINHTTP_CANNOT_CONNECT""