(Win2k12R2) Securing Public Key Infrastructure (PKI)
(Win2k12R2) Securing Public Key Infrastructure (PKI)
Infrastructure (PKI)
Microsoft IT
http://aka.ms/securingpki
Contents
Foreword....................................................................................................................................................6
Acknowledgements.....................................................................................................................................7
Executive Summary.....................................................................................................................................8
Introduction..............................................................................................................................................10
About this Document.....................................................................................................................................................11
Content Origin and Organization...............................................................................................................................11
PKI Assessments and Consulting................................................................................................................................11
Content Scope........................................................................................................................................................... 11
Introduction to PKI.........................................................................................................................................................11
PKI Components........................................................................................................................................................ 11
PKI Governance..........................................................................................................................................................12
Business Drivers for PKI.............................................................................................................................................12
Elements of a Successful PKI......................................................................................................................................13
Determining the Level of Protection Required..........................................................................................................14
Compromising PKI..........................................................................................................................................................15
How PKI Compromises Occur.....................................................................................................................................15
Protecting a PKI Deployment.....................................................................................................................................16
Planning a CA Hierarchy.............................................................................................................................17
CA Hierarchy Options.....................................................................................................................................................18
Conclusion......................................................................................................................................................................21
Compromise Response..............................................................................................................................77
Inventory PKI Consumers...............................................................................................................................................77
Understanding Compromise Scenarios..........................................................................................................................77
Full Key Compromise.................................................................................................................................................77
Full Key Access...........................................................................................................................................................77
Limited Key Access.....................................................................................................................................................78
Other Attacks.............................................................................................................................................................78
Full Key Compromise and Access...................................................................................................................................78
Operating System Compromise.................................................................................................................................78
Cryptographic Compromise.......................................................................................................................................79
CA Compromise Response Actions.................................................................................................................................79
Correlating Compromise Types and Response Actions...................................................................................................81
Conclusion......................................................................................................................................................................83
Appendices................................................................................................................................................84
Electronic credentials that prove identity are a critical necessity. Much like a
passport proves identity in the offline world, Public Key Infrastructure (PKI) delivers a way to prove identity in
the online world. PKI also supports secure information exchange over insecure networks and can protect the
transport of information, which is critical when conducting online transactions.
This whitepaper contains recommendations for establishing a robust, secure PKI to help organizations
provide basic security controls such as confidentiality and integrity to key business processes. If properly
implemented, a PKI becomes a foundational component used to build effective information security controls
over information resources. PKI plays a critical role in the protection of sensitive business data and is an
enabling technology that enhances information systems security and promotes secure electronic commerce.
This paper contains guidance and recommendations necessary for establishing a Certification Authority (CA),
an understanding of the physical controls for securing a PKI, the processes vital to establishing a PKI, the
technical controls for securing a PKI, procedures for planning certificate algorithms and their usages,
procedures for protecting CA Keys and critical artifacts, monitoring the PKI, and compromise response.
Information security and risk management practitioners will find the policies, procedures, and
recommendations to be a significant contribution to their understanding in the practical implementation of a
robust PKI.
Bret Arsenault
Microsoft Chief Information Security Officer
Ashish Popli
Jenn LeMond
Mario Rodriguez
Security of the systems and processes comprising a PKI should be the first and foremost considerations when
designing and deploying a PKI. Prior to deployment, careful consideration should be given to the numbers
and types of certification authorities that you will deploy. Design your PKI with any potential future use cases
in mind, because an improper design can lead to significant rework or security ramifications as your PKI sees
new and different use cases.
Physical controls should not be overlooked during the design. While much emphasis is placed on controlling
access to systems over the network, physical attacks can still occur and can lead to the full compromise of
your PKI, and subsequent compromise of other critical systems that depend on it. Secure critical
infrastructure from physical attacks that may originate from an outside attacker or potentially an insider
threat.
A large portion of the work involved with running a successful PKI is establishing secure and repeatable
processes that are well documented and followed. Any PKI that intends to be trusted for critical business
functions should document the policies and procedures. These policies and procedures can then be used in
Certificate Policy and Certification Practice Statement documents for a PKI trusted by customers and
partners. Strong processes should be developed to ensure that the PKI is run with oversight from the proper
teams within your organization.
PKI systems should be treated as critical systems and have strong technical controls deployed to protect
them from unauthorized access. As with other critical systems, hardened baselines and strict management
access should be implemented. Special consideration should be given to PKI systems that are always kept
offline. Implement controls for offline systems so they are never brought online and do not have malicious
software introduced to them.
When running a PKI deployed with Microsoft Windows® Active Directory® Certification Services, care should
be taken to control access to sensitive PKI tasks. Control access to certificate templates that allow for
certificate enrollment, and ensure that supporting processes such as backing up sensitive data and publishing
PKI data are properly secured.
Another key decision in PKI design is the suite of cryptographic algorithms that are used and the length of
time certificates are valid. Ensure that you select the strongest cryptographic algorithms afforded by your
environment, and be aware of potential compatibility issues between different operating systems and
cryptographic software packages. After proper algorithms are selected, ensure that the attributes you allow
Protection of the keys associated with a Certification Authority (CA) or other PKI systems is paramount.
Strong protection mechanisms should be deployed because a compromise of a key can lead to a compromise
of your IT infrastructure. Deploy critical CAs with hardware security modules (HSMs) to protect keys and
ensure that any artifacts (backups, HSM objects, etc.) kept are stored securely.
PKI systems should be monitored continuously for signs of compromise. Monitoring can uncover attempts to
enroll unauthorized certificates for important users (VIPs), such as system administrators, executives, and
individuals with access to business critical data. Monitor for changes to critical accounts and changes to key
security groups. Watch for anomalous behavior in certificate enrollment and have robust alerting capability
when events are detected.
In the event that your PKI is compromised, it is important to understand the extent of the breach and the
response options. Your response will be highly variable, depending on the level of access an attacker was able
to obtain, along with the level of impact your organization is willing or able to bear on the business processes
supported by the PKI.
Deploying and maintaining a secure PKI is not a trivial task. A PKI is a high value target for a determined
attacker, and is often used as part of a broader campaign to obtain sensitive organizational data. A PKI that is
not properly secured can lead to the compromise of most, if not all systems in your IT infrastructure. As your
organization deploys PKI, ensure the proper investment is made to deploy it securely and implement
adequate support for ongoing operations and monitoring.
Content Scope
This paper is not intended to address all potential security issues across PKI, but rather is focused on
providing actionable content for areas in which Microsoft has seen deficiencies while performing
assessments over several years with many customers. Specifically, this document does not attempt to
provide recommendations for other Active Directory® Certificate Services roles such as Network Device
Enrollment Services (NDES) or Online Certificate Status Protocol (OCSP).
Introduction to PKI
PKI Components
Within any PKI regardless of the technical implementation, a number of components and actors are present.
This brief introduction will help provide context and definition of terms used throughout this whitepaper.
Subscriber/End Entity – The person or computer listed as the subject in a certificate. In the context of this
whitepaper, an End Entity certificate is any certificate issued to a person or computer.
Relying Party – A user or system that consumes the certificates generated by the PKI. Examples of relying
parties would be users of web browsers visiting an SSL protected web site, a VPN server authenticating a
remote user, or a computer validating that an executable is signed correctly before running it.
Registration Authority (RA) – A CA may delegate some of the tasks related to verifying identities and
processing certificate revocation requests to a Registration Authority (RA). An RA could be a person
performing manual checks or a system automating the required validation checks. The CA will accept
certificate requests processed by the RA and sign them, trusting that the RA has done the proper validation.
PKI Repositories – A PKI repository is a location accessible by relying parties where PKI information is stored.
This information could include certificates, revocation information, or information regarding the policies of
the PKI. For example, this information can be posted to internal or external web locations.
For a glossary of terms used in this whitepaper, refer to Appendix D: Glossary of Terms.
PKI Governance
Maintaining the trust of relying parties is an integral component to running a PKI. If a relying party does not
know the policies a PKI uses for governance, or the PKI has no formal policies, they cannot make an informed
decision to trust that the certificates issued by the PKI are correct. To facilitate trust, a PKI must be operated
with some level of oversight, and with policies, standards, and procedures in place to control how the PKI is
managed. The level of oversight required will vary depending on the intended use. For example, a PKI trusted
and used internally at a company to issue certificates for wireless network authentication does not need the
same amount of oversight as a PKI used to issue SSL certificates trusted by default by all major web browsers.
Governance is not a topic unique to PKI- other critical infrastructure systems should also be run with
formalized change control and oversight.
Data Encryption – PKI provides several solutions for securing data in transit and at rest. PKI is
commonly included as a part of a solution to securely exchange data between partners, customers,
or internal sites. Common implementations include using certificates to enable Transport Layer
Security (TLS) for secure transmission of data, S/MIME certificates for sending encrypted email, and
Encrypting File System (EFS) certificates to encrypt files on a workstation.
Risk Assessment – A proper risk assessment and threat modeling should be performed prior to
deploying a PKI. A risk assessment will determine the level of security and the investment that should
be made in the PKI.
Executive Support – As with any other large-scale IT project, support from executive management is
crucial in the deployment of a PKI that meets large-scale needs. A properly implemented PKI often
represents a significant investment, both in capital and human resources. Executive management
needs to have a clear vision of why PKI must be designed and operated differently from commodity
IT services, as well as have a clear understanding of the business requirements the PKI helps to
satisfy.
Planning and Foresight – A PKI deployment is often unique from deployments of other technologies,
because more stringent security controls are required for the deployment to succeed. A PKI
deployment also requires the development of rigorous operating procedures. For a PKI to succeed,
careful planning must occur to ensure that the policy, procedures, and technical implementation
meet the needs of the business, both now and into the future. If a PKI is configured incorrectly,
frequently the only good solution is to start over and implement a new system. With proper
planning, you will be able to avoid costly rework or compromise.
When planning a deployment, pay special attention to any shorter term (12-18 months) uses of the
PKI. If you do not plan at the very beginning to accommodate known future uses, you may end up
setting up parallel infrastructures in the future, or be forced to modify the existing infrastructure in
ways that make it more complex and costly to operate.
Defined Policies – Prior to implementing any certification authorities or issuing certificates, define
and agree upon the policies which govern the use of the PKI. Applications either inside or outside
your environment will be dependent on the PKI, and these policies will provide clear guidance on
what to expect for topics such as certificate issuance, security, disaster recovery, etc. Policies do not
need to be overly complex, but it is critical to develop and follow them.
High Business Impact – Customer or Partner Impacting – This classification relates to CAs that, if
compromised, could impact your customers or partners, as well as have an internal impact.
High Business Impact – Internal Impact – This classification relates to CAs that if compromised, could
impact internal operations of your company significantly. Examples include CAs that issue certificates
used to protect proprietary data, or allow authentication to internal systems or networks. Many
ADCS deployments, regardless of intended use, will fall into this category.
Moderate Business Impact – This classification relates to CAs that are not widely trusted in your
environment or do not support critical business processes.
Each CA should be analyzed to determine the impact of a breach. In most cases, all CAs in a hierarchy will
have the same impact level. However, there are some cases where a subordinate CA may have a lower
impact level than the root or other subordinate CAs because technical constraints may prevent it from being
used in more critical use cases. For a complete list of recommendations in this paper along with the
recommended impact level at which to implement them, refer to Appendix F: List of Recommendations by
Impact Level.
Elevation of privilege – An attacker can leverage the PKI to gain credentials that will allow them to
gain full access to desired systems or potentially all systems across the target environment.
Persistent access – While many attacks begin with attackers using backdoors on systems to maintain
access to an environment, compromising a PKI and obtaining credentials can allow attackers to use
the “front door” and access the environment through legitimate means such as a Virtual Private
Network (VPN) or DirectAccess (DA).
Impersonation – Compromising a PKI can allow an attacker to create credentials of VIP users who
have access to desired data.
In many cases, compromising a PKI and obtaining fraudulent certificates allows an attacker to traverse the
network using methods that look very similar to normal user activity and are difficult to detect.
Misconfigurations
A common method of compromise is for attackers to leverage misconfigurations within the PKI to issue
certificates for other users of systems for which the requesting user should not have rights to request, or
certificate types that the user should not be able to request. Examples include misconfigurations in template
permissions, such as overly broad enrollment permissions, or misconfigurations on the CA that allow users to
request certificates with user-defined data. Misconfigurations in allowed certificate usages and constraints
could also allow attackers to create subordinate CAs with arbitrary attributes.
In other cases, the CA is built using a custom “one off” configuration where adequate documentation does
not exist and the configuration has not been thoroughly tested. While custom installations can lessen the
attack surface when done correctly, they can also introduce misconfigurations, as standard processes are
often not followed. Compromised CAs often do not adequately protect the CA keys, leaving them vulnerable
to attackers either on the system or in backups.
Social Engineering
Each CA should implement its own set of practices, both logical and process-driven to ensure the identity of
the subject requesting a certificate is validated. If there are deficiencies in these practices, it is possible for an
attacker to use social engineering techniques to have certificates issued to them. For example, an attacker
could have an employee smart card shipped to them by pretending to be a remote employee if home
addresses are not validated. An attacker pretending to be a web administrator could have an SSL certificate
issued on behalf of a highly sensitive payroll system to perform a man-in-the-middle attack.
Planning a CA Hierarchy
A PKI can be implemented either as part of the IT infrastructure or by using external, commercial CAs. In
general, the following are the PKI design options:
Implement a completely self-managed PKI within your organization that contains internal CAs
chained to an internal root CA at the top of the chain
Purchase a CA certificate from a commercial CA and issue certificates within the organization from
internal, self-managed CAs that are chained to the external root CA
Purchase certificates from a commercial CA that are chained to a public root CA (preferably a
member of the Microsoft Root Certificate Program that are automatically distributed to clients that
use Microsoft Windows® platforms)
If the security solutions supported by the PKI do not require external parties to trust the issued certificates,
and will not in the future, then you may opt for a self-managed PKI that uses an internal root CA as the trust
anchor for the PKI. Using an internal root CA allows you to maintain direct control over its security policies
and to align its Certificate Policy (CP) with the overall security policy. Therefore, you will use internal CAs for
issuing certificates to end users, to computers, and to services. These internal CAs can be expanded to
include additional functionality, such as support for new certificate types, at a lower cost than buying
external certificates.
CA Hierarchy Options
In a hierarchical PKI (a typical deployment), there are generally three types of hierarchies – one tier, two-tier,
and three-tier.
One-Tier Hierarchy – Consists of one single CA. The single CA is both a root CA and an issuing CA. A
root CA is the trust anchor of the PKI, so a root CA public key serves as the beginning of trust paths
for a security domain. Any applications, users, or computers that trust the root CA also trust any
certificates issued by the CA hierarchy. The issuing CA is a CA that issues certificates to end entities.
This one-tier hierarchy is not recommended for any production scenario because with this
hierarchy, a compromise of this single CA equates to a compromise of the entire PKI. For security
reasons, root and issuing CAs are normally separated because it is generally very difficult to quickly
distribute a new root CA certificate to replace a compromised CA. This is especially true when the
environment includes computers not joined to management domain or devices where a special
process is required to provision the root CA certificate. Because of this, a one-tier hierarchy may be
sufficient for only simple implementations where ease of manageability and lower cost outweigh the
need for greater levels of security or flexibility.
A common finding in PKI assessments is that some organizations install a single CA in order to
support a major project that may have required it. Perhaps this is an installation of System Center
Configuration Manager, or wireless network protection, or some other PKI-consuming technology
and one small line-item in the project’s plan is dedicated to the CA installation. Over time, this single
CA begins to get a lot of use as it is leveraged more and more for purposes other than those originally
conceived. Suddenly, there is a need for a proper PKI and administrators face some uneasy
questions:
Can I install multiple PKIs in my forest without them interfering with each other?
So there are multiple security risks in using a one-tier hierarchy – your only CA is online and more
susceptible to compromise, and you cannot revoke this CA if it was compromised. This hierarchy is
also more difficult to expand to support other scenarios. If you are in the position to move to the
recommended CA hierarchy design, refer to the Moving Your Organization from a Single Microsoft CA
to a Microsoft Recommended PKI article.
Three-Tier Hierarchy – In a three-tier hierarchy, there is a root CA tier (offline), an issuing CAs tier
(usually online), and an intermediate tier placed between them. The placement of this intermediate
CA can be for several different reasons. The first reason would be to use the second tier CA as a
policy CA. For example, one policy CA will issue certificates that requires that a user has to appear in
person and another CA will issue certificates to any authenticated corporate users. In other words,
the policy CA is configured to issue certificates to the Issuing CA that is restricted in the type of
certificates it issues. The policy CA can also just be used as an administrative boundary. That is, you
only issue certain certificates from subordinates of the policy CA, and perform a certain level of
verification before issuing certificates, but the policy is only enforced from an administrative and not
technical perspective.
Another reason to have the second tier added is that if you need to revoke a number of CAs due to a
key compromise, you can perform it at the second tier level, leaving other branches available. It
should be noted that second tier CAs in this hierarchy should, like the root, be kept offline.
Following the paradigm, security increases with the addition of a tier, and flexibility and scalability
increase due to the increased design options. On the other hand, manageability increases as there
are a larger number of CAs in the hierarchy to manage and cost goes up.
Two-Tier Hierarchy
Two-Tier Hierarchy – A two-tier hierarchy is a design that meets most company’s needs. In some
ways it is a compromise between the one and three-tier hierarchies. In this design there is a root CA
that is offline and a subordinate issuing CA that is online. The level of security is increased because
the root CA and issuing CA roles are separated. But more importantly the root CA is offline so the
private key of the root CA is better protected from compromise. The two-tier hierarchy also increases
scalability and flexibility due to the fact that there can be multiple issuing CAs subordinate to the root
CA. This allows CAs to exist in different geographical locations, as well as with different security
levels. Manageability is increased since the root CA has to be brought online to sign CRLs. Capital cost
is increased marginally because all you need is an additional server or a virtual machine. The two-tier
hierarchy is the recommended design for most PKI solutions.
Another advisable idea is to restrict certificates of the subordinate issuing CAs to limit their impact on
the CA hierarchy, so that subordinate CAs cannot issue “rogue” certificates that could be used for
unintended purposes. This is important when you have more complex certificate hierarchies. The
most obvious case occurs when an issuing CA is operated by different parts of an organization, but
Conclusion
For a complete list of the recommendations for planning a CA hierarchy, along with the level of business
impact at which you should consider implementing them, refer to Appendix F: List of Recommendations by
Impact Level.
Functional Considerations
The level of physical security a PKI requires depends on the functions it allows. Consider the following when
defining physical security requirements for PKI:
Assurance Level – The level of trust stated by the entity providing certificate services based on many
different factors including the stringency of the method used to identify a person or entity receiving
certificates, the criteria required for issuance, and the purpose of the certificates issued.
Function of the system – The function or functions a system has in relation to the PKI. Functions
include acting as a CA (online or offline), enrollment functions, and revocation verification hosting.
Different functions may require different levels of physical security.
Form Factor – The server operating system host type - virtual or physical.
Private Key Storage – The method by which the private keys are stored whether it is on a CA Server
file system or a Hardware Security Module (HSM) which is a dedicated hardware device for this
purpose.
PKI Artifact Storage – Storage of dependent components including HSM cards or tokens, backup
drives, USB drives, smart card readers, or biometric devices. See Protecting CA Keys and Critical
Artifacts for more information. Strong physical access controls should be in place for any sensitive PKI
artifacts.
Business Continuity and Disaster Recovery – Processes and procedures created to ensure a PKI is
functionally available after a minimal amount of downtime after an event causing disruption of
service.
Periodically audit physical access to sensitive areas to ensure no unapproved access has occurred. Consider
comparing physical access logs with known work orders that were executed and verifying that only trusted
personnel were allowed into the sensitive area.
Consider implementing technical controls that enforce multi person access, ideally with representation by
persons in differing roles or organizations. Examples include door readers that require multiple distinct
persons to present keys prior to allowing access, alarms that require two codes to disable, or safes that
require multiple combinations to unlock. Further enforcement mechanisms of multi person control are
discussed in the Protecting CA Keys section.
For a complete list of the recommendations for planning physical controls for securing PKI, along with the
level of business impact at which you should consider implementing them, refer to Appendix F: List of
Recommendations by Impact Level.
To facilitate this trust, you should deploy and operate a PKI with some level of oversight, and with policies,
standards, and procedures in place to manage the PKI. The level of oversight and the number of controls
required will vary depending on the intended use and security impact of issued certificates. For example, a
CA trusted and used internally to issue certificates for wireless network authentication does not need the
same amount of oversight as a CA that issues SSL certificates to customers. In both cases, define and set the
security bar for the PKI from the start.
PKI Policy
Prior to deploying any CA or issuing a certificate, define and agree upon the policy which governs the use of
the PKI. A policy usually takes into consideration regulatory and industry requirements as well as unique
requirements for your company. The policy may also specify technical aspects of the PKI such as the
cryptographic algorithms that must be used as well as operational controls for the CAs.
It is likely that other services either inside or outside of your environment will depend on the PKI, and the PKI
policy should provide a clear guidance on what can be expected for certificate issuance, security, disaster
recovery, etc. The policy does not need to be overly complex, but it is critical to develop and follow it from
the beginning to have a level of assurance in the operated PKI.
In addition to PKI policy, you may need to develop CA-specific policies before implementing the PKI. These
policies may be expressed differently depending on the required level of assurance. They can be expressed
either as documented statements about certificate usage and issuance controls for a simple internal CA or as
a formal Certificate Policy/Certification Practice Statement that follow IETF Public Key Infrastructure X.509
Certificate Policy and Certification Practices Framework (RFC 3647) with accompanying standard operating
procedures.
Certificate Policy
As defined by IETF, a Certificate Policy (CP) is “a named set of rules that indicates the applicability of a
certificate to a particular community and/or class of application with common security requirements.” That
is, a CP defines the expectations and requirements of the relying party community that will trust the
certificates issued by its CAs. For example, the CP explains what methods are used to establish the identity of
a subject before issuing a certificate. A Certification Practice Statement (CPS) outlines the operation of the
PKI from a security perspective and must be followed from the initial deployment of a company’s CAs. These
formal documents may be overkill for a typical enterprise PKI deployment, but they provide a good structure
to think about for your PKI and risk assessment.
The CPS basically translates CPs into operational procedures on the CA level. The CP focuses on the make-up
and uses of a certificate; the CPS focuses on a CA.
It is important to make conscious decisions about what practices will be used for certificates. You should
include both the decision and reasoning behind it in the documentation. By doing this, you are able to state
what your practices are so that these practices can be tested and evaluated in production. When setting up
monitoring, use this documentation to specify what should trigger an alert and what is acceptable per
certificate issuance best practices.
Effective key management controls and practices expressed in the CPS or similar documentation within your
company are essential to the trustworthiness of the PKI. These practices should cover CA key generation, CA
key storage, backup and recovery, CA public key distribution, CA key usage, CA key destruction, CA key
backup, and the management of CA cryptographic hardware through its life cycle.
The certificate lifecycle is at the core of the services provided by the CA. The user certificate lifecycle usually
includes the following:
Registration (the identification and authentication process related to binding the End Entity to the
issued certificate)
Renewal/rekey of certificates
Revocation of certificates
Effective controls over the registration process are essential because poor identification and authentication
controls jeopardize the ability of clients and relying parties to rely on the certificates issued by the CA.
Effective revocation procedures and timely publication of certificate status information are also critical
elements because it is critical for relying parties to know when they are unable to rely on certificates that
have been issued by the CA.
Security management
Personnel security
Operations management
Auditing
Whenever a PKI may affect external customers or partners, involve the legal department in the work
of the Policy Authority
Formalize the work that the Policy Authority does. For example, if members of the Policy Authority
approve changes, ensure that the approval process is documented and tracked. Take formal votes
and keep meeting notes.
While planning for CA deployment or operations, clearly define and assign individuals to trusted roles. A
trusted role is one whose incumbent performs functions that can introduce security problems if not carried
out properly, whether accidentally or maliciously. It is essential that the people selected to fill trusted roles
be held accountable to perform designated actions correctly because if they fail to do so, the integrity of the
CA and the PKI is weakened. The functions performed in these roles form the basis of trust in the CA. There
are two approaches to take in order to increase the likelihood that these functions can be successfully carried
out. The first approach is to minimize the number of trusted roles and ensure that the people filling those
roles are trustworthy and properly trained. The second is to enforce the concept of least privilege and
distribute the functions of the roles among several people, so that any malicious activity requires collusion
(multi-party control).
Overall responsibility for administering the implementation of the CA’s security practices
Cryptographic key life cycle management functions (for example, key component custodians)
Archiving or deleting CA audit logs. At least one of the participants must be in an auditor role.
Some roles require separation of duties. For example, individuals serving as auditors shall not perform or
hold any other trusted role. Therefore, only an auditor may perform internal auditing functions, with the
exception of those security audit functions (configuring, archiving, deleting) that require multi-person
control. Enforce roles separation by requiring that an individual who performs any trusted role have only one
identity when accessing CA equipment. The way to achieve this in AD CS is described in the Role Separation
section.
Personnel considered to fulfill trusted roles should present some proof of the requisite background,
qualifications, and experience needed to perform their prospective job responsibilities competently and
satisfactorily. In some cases it might be wise to ask persons fulfilling trusted roles to pass a comprehensive
background check (in accordance with local privacy laws) and ensure that they periodically undergo
background checks.
All personnel performing duties with respect to the operation of CAs should receive training to perform their
duties. This training could be formal or informal, and is like the training for other IT systems. In some higher
security environments, it is beneficial to formalize the training and track completion prior to granting access.
Training should cover the following topics:
Disaster recovery
The CA key pair generation must create a verifiable audit trail demonstrating that the security requirements
for procedures were followed. The ceremony must be documented in sufficient detail to show appropriate
multi-party control and role separation were used. Depending on the established security policy, generation
of CA keys should be witnessed by an independent party and/or videotaped and all CA key generation
activities must be logged.
Develop a ceremony document that contains a list of the materials used, the trusted roles and
responsibilities, the ceremony roles list, and a detailed step-by-step script for HSM setup, CA deployment,
and CA configuration. The ceremony script must contain fields for signatures of operator and witness, and be
specific on produced ceremony artifacts. Below is an example of a ceremony script:
Confirm that the appropriate hardware resources are present and inspect
each for tampering:
2 Server Configurations
3 Pre-Generation Configurations
4 CA Installation
Connect to HSM
Begin CA installation
Copy artifacts to the transport media
5 Request CA Certificate
6 Install CA Certificate
7 Post-Issuance Configurations
8 Backing Up server
Conclusion
Defining a Certificate Policy/Certification Practice Statement, regardless of how formal you choose to be,
provides a baseline expectation of what relying parties can expect from your service. Creation of these
documents also act as a forcing function to ensure that all aspects of your PKI management have been given
some consideration. Enforcing the concept of trusted roles helps ensure those operating the PKI meet a
minimum standard of training and experience prior to being granted access to high value assets. Performing
key signing ceremonies provide assurance that proper steps were followed, which mitigates risks associated
with keys being created or managed insecurely.
For a complete list of the recommendations for creating PKI processes and documentation, along with what
level of business impact at which you should consider implementing them, refer to Appendix F: List of
Recommendations by Impact Level.
Microsoft Windows Server 2008 R2® and Microsoft Windows Server 2012®: Security Configuration Wizard
Use a distinct password for the local administrator account that is not used on other systems
Enable the Microsoft Windows® Firewall with Advanced Security and configure it to allow only
required traffic. Refer to the Network Isolation section for more segregation recommendations.
Disable services that are not required for the CA to function. SCM contains service recommendations
from Microsoft for the CA role.
Only install software that is necessary for the CA to perform its function
Accounts that are of particular interest to attackers are accounts with wide and/or deep access across an
environment. Often these are accounts that perform an important function, such as security scanning,
update management, backup, inventory, etc. and require administrative rights to operate. Where possible,
remove these accounts from CAs and consider how the function could be performed without requiring
administrative rights on the CA. Additionally, eliminate or limit the number of system/service accounts that
are permanent members of the local administrators group. Actions that are performed on a CA should be
traceable back to the person that performed the action.
Application Whitelisting
Use AppLocker or a third-party application whitelisting tool to configure services and applications that are
permitted to run on CAs. These permitted applications and services should be comprised of only what is
required for the computer to host AD CS plus any system security software such as antivirus software.
Whitelisting permitted applications on CAs adds an additional layer of security so that even if an
unauthorized application is installed, the application cannot run.
A CA is an excellent candidate for AppLocker because the list of software required to run on a CA should be
minimal and relatively static. Testing is vital to an AppLocker deployment. Prior to deployment, test a list of
rules in a test environment and then migrate the rules to a production server and run using Audit only
enforcement to profile the CA. Once the rule set is established, enforce the rules. For more information on
deploying AppLocker, refer to the AppLocker Overview.
Microsoft Windows Server 2012 R2® and Microsoft Windows 8.1® introduce a new feature in mstsc.exe
called “Restricted Admin Mode”. If mstsc.exe is started with the /restrictedAdmin parameter, the
credentials used to authenticate will not be sent to the remote computer, which limits the ability of attackers
to steal and reuse credentials. In addition to restricting access via Remote Desktop Protocol (RDP), control
access to the CA through other channels as well. If you use physical hardware to host the CA, there is a high
likelihood that the hardware contains a Remote Management Board (RMB) that can be used to access the
system. Account for access via the RMB and any other channels (Microsoft Windows PowerShell® Remoting,
DCOM, SMB, etc.) when designing a firewall policy. In high security deployments, consider disabling RMBs.
After defining the acceptable methods of access, implement the controls using GPOs to apply them
consistently. Consider using a dedicated Organizational Unit (OU) in Active Directory® to manage the
application of GPOs to PKI systems. Many of the recommendations provided throughout this whitepaper can
be applied through the use of GPOs.
For cases in which long and complex passwords have proven difficult to implement because of user
resistance, smart cards provide a mechanism by which users may implement relatively simple PINs or
passcodes without the credentials being susceptible to brute force or rainbow table attacks. Smart card PINs
are not stored in Active Directory® or in local SAM databases, although credential hashes may still be stored
in LSASS protected memory on computers on which smart cards have been used for authentication.
A common misconception when requiring smart cards for interactive access for a CA is that if there is a
problem with the PKI used for the smart card certificates, the CA will be inaccessible to resolve the problem
because it requires smart card logon. This is untrue because it is possible to continue to use the local
administrator account in the case of an emergency. Even if the local administrator account is disabled, the
system can still be booted to recovery mode to enable the account, or if GPOs can be edited, the account can
be enabled via GPO to perform the tasks required.
Offline CAs are often one of the most undervalued assets of an organization. If an attacker gains control of an
offline CA that subordinates to an enterprise CA in Active Directory®, this could lead to full compromise of
the directory by taking advantage of the inherited trust relationship. If an attacker gains control of an offline
CA that subordinates to a CA used to issue certificates for financial transactions, intellectual property, or
critical communication between partner organizations, this could jeopardize the business partnership or lead
to regulatory penalties. Consider the following recommendations when designing and managing offline
certification authorities.
Regardless if the CA is physical or virtual, when an offline CA is not in use, the systems and dependent
components should be shut down completely. This includes host computers for virtualized offline CAs and
HSMs.
Account Management
If you need built-in auditing capacity for tracking purposes, it may be necessary to create and assign separate
local accounts for administration. However, if accessing the CA is protected with entry auditing and
surveillance, extra accounts may not be necessary and the standard built-in administrator account can be
used. In either case, it is recommended that any activity performed on an offline CA can be attributed back to
the individual who performed the activity. If an HSM is not used, additional care is needed for administrative
accounts as discussed in the Protecting CA Keys section.
This section provides guidance for securely implementing offline or online CAs using virtualization
technology.
Decouple the CA from the Host Hardware – Use removable media to store the virtual machine hard
disk files, regardless of the host hardware. Doing so permits independence of any host hardware,
preventing problems if the hardware fails or needs to be replaced. Use a removable USB attached
hard drive to store the virtual machine hard disk files. Securely store the removable media. Access to
the CA hard disk files is equivalent to access to the CA.
Use a Secure Host Machine – The host hardware used to create the virtual machine and bring it
online for routine maintenance should be dedicated hardware used for this purpose. Physically
secure this hardware in the same manner as a physical Root CA. Use server hardware, or laptop
hardware. If you use server hardware, keep the hardware locked in a secure cage under the same
controls as other offline CAs. If you use laptop hardware, keep the laptop locked in a safe, handled
similarly to storage of backup data or other items discussed in the Artifact Storage and Chain of
Custody section. If dedicated hardware is not a feasible option, consider building a clean computer
Use an HSM – By using an HSM, even if a virtual disk image is compromised, the keys are not. By not
using an HSM, the CA keys are compromised if the virtual machine disk image ever leaves your
immediate control. If there is already a network HSM for the online CAs, it may be possible to utilize
it for offline infrastructure as long as you never connect the CA to any routable network. Many
network HSMs come with multiple network ports, so it is possible to connect the host computer to
the HSM using a crossover cable. More details on utilizing HSMs is explained in the Protecting CA
Keys and Critical Artifacts section below.
Securely Build the Virtual Machine – When creating the virtual machine for the offline CA, use the
same controls that are used for a physical offline CA. Do not build the Virtual Machine (VM) on
another computer connected to the network and then migrate it to a more secure computer. At no
time during the build or maintenance process should you expose an offline CA virtual machine to a
network attached host. Follow the same secure processes used to build a physical offline CA,
including multi person control and building in a secure environment.
Perform Regular Backups and Updates – When performing regular maintenance on the CA, you
should make a backup of the virtual hard disk files. Make multiple copies, ensure that they work, and
securely store them to offsite facilities. Store the backup copies with the same precautions and
controls as the primary copy. As part of the backup, include the virtualization software needed to
bring the CA online so that a support team has all the data needed to use the backup and recover the
CA. Ensure that the virtualization formats used (e.g. VHD/VHDX, etc.) are kept up to date to reduce
reliance on out-of-support software or configurations.
Verify the System Time – Prior to performing any operations with an offline CA image, verify that the
system clock is correct. Inaccurate time will cause certificates and CRLs to potentially be invalid and
cause service interruptions.
Disable Remote Management Capabilities on the Host – If the host computer has a Remote
Management (RMB) board, ensure that it is disconnected from the network.
Control Administrative Access to the Host Operating System – Users and processes that have
administrative access to the host operating system ultimately have access to the virtual machine
hard disk files, which can result in the equivalent of physical access to the virtual CAs. If an
administrator should not have access to a physical CA, they should not have access to the host
operating system on which the virtualized CA is running. When determining access controls, consider
all potential paths that might allow a user to gain access to the CA hard disk files and administrative
access to the host OS. Consider also the access to virtual machine management consoles, access to
Use Network Attached HSMs – By using an HSM, even if a disk image is compromised, the keys are
not. By not using an HSM, the CA keys are compromised if the virtual machine disk image ever gets
out of your control. When using network attached HSMs, consider deploying redundant HSM
hardware, because the HSM now becomes a single point of failure affecting multiple CAs relying on
its services.
Use CA Database Backups – Virtual machine snapshots can provide an instant recovery to a known
good state. Snapshots will restore the CA database to the state it was in when the snapshot was
taken, similar to a CA backup. If any certificates have been issued since, they will not be in the
database. If certificates have been revoked, they will no longer show as revoked and would be
removed from the CRL at the next publication. For virtualized CAs, continue to take regular CA
database backups so if a snapshot is used, you also have a clean backup of the CA database in the
case of corruption or unforeseen issues.
These are infrequent configuration tasks that you may only perform once or a few times over the life of a CA:
Installation of a new CA
Renewal of a CA certificate
Managing Active Directory® certificate containers (NTAuth, CAs, AIA, CDP, etc.)
Certificate Management
These are more frequent operational tasks that regularly occur over the life of a CA:
Creating and managing certificate templates (new templates, updated enrollment permissions, etc.)
Certificate lifecycle management (issuance, revocation, renewal)
Maintenance of the CA (software or security updates, backups, etc.)
Managing and verifying CRL and OCSP availability
By default, after installing a CA, ongoing operations require at least the occasional use of an account in the
domain administrators or enterprise administrators groups. In some organizations it may be desirable to
delegate the rights required to perform common PKI tasks to a separate group. It may also be desirable to
delegate the rights required to perform infrequent operations to a separate team or set of accounts. If an
organization operates a large number of CAs or the organizational structure is such that it makes sense to
delegate these rights, refer to Appendix C: Delegating Active Directory PKI Permissions for details on what
permissions must be delegated.
Role separation offers some benefits, but it also introduces some challenges that should be considered when
evaluating its usefulness for your environment. Separating roles allows for a stronger separation of
responsibilities for individuals or teams, and can provide a clear technical separation for systems that are
subject to compliance requirements that require separation of duties. However, implementing role
separation does require a sizable support staff. To ensure that there is adequate coverage for all critical roles,
an organization would require multiple individuals for each role, which is often not possible.
Give careful consideration to the operational impact enabling role separation may have before enabling it in
your environment. If you use role separation, ensure that its configuration is monitored for changes, as it can
be easily disabled by someone with administrative rights on the CA. Refer to the Monitoring Public Key
Infrastructure section for more information. For more details on role separation refer to the following
resources:
Protecting CA Backups
When performing a backup of a CA, there are three items necessary to fully recover:
2. CA registry information
3. CA database backup
Several options exist for backing up a CA. If you are using an HSM, consult the HSM vendor documentation
for details on what is required to back up and restore HSM protected keys. CA backup options include:
Perform a system state backup, which will include the CA database, registry settings, and CA key
information (including the private key if you are not using an HSM)
Manually back up the CA using the CA snap-in. This does not include the CA registry or any files
required to restore HSM protected keys
Use certutil.exe or Windows PowerShell® CA Backup and Restore Windows PowerShell cmdlets to
create a regularly scheduled backup script that backs up the database, registry settings, and required
private key files
A common issue Microsoft finds in many PKI assessments is that once a backup of a CA is taken, the same
level of protection is not always provided to the backup that exists on the CA. If you are not utilizing an HSM
and you are performing regular backups that include the private key, the private key and certificate are
stored in a PKCS#12 (PFX) file. If an attacker is able to gain access to the PKCS#12 file, they have the
opportunity to brute force the password on the file and gain access to the CA key. If the password can be
cracked, the attacker has compromised your PKI and can create certificates of their choosing. The same
applies when performing system state backups. If an attacker gains access to a system state backup, they can
restore it and gain access to the private key(s). When designing a backup strategy for the CA, consider the
following recommendations:
If an HSM is not used, perform a separate backup of the CA key and certificate to a PFX file and store
the file securely where it can be retrieved in the event a restore is required. Store the backup in a
tamper-evident bag and place it in a safe with limited access, where the access is monitored and
audited. When performing regularly scheduled backups, do not include the CA key as part of the
backup. Continue to take new backups as CA certificates are renewed or new keys are generated and
set a strong passphrase on the PFX file. To initiate a backup that includes only the CA database and
not the CA key, use certutil –backupdb rather than certutil –backup if initiating the backup from the
command line or a script. Beginning with Windows Server 2012 R2®, a backup can be performed with
the PowerShell cmdlet Backup-CARoleService. When used with the –DatabaseOnly argument, the
CA certificate will not be included in the backup.
Consider backing up the CA to another secure location that interfaces with backup systems rather
than having backup systems connect directly to the CA. Backup systems typically have the ability to
connect to large numbers of systems in the enterprise, and a compromise of the backup system
could then lead to a compromise of the PKI.
Note: In Microsoft Windows Server 2008® and Microsoft Windows Server 2008 R2®, private keys were not
included in the system state backup. A hotfix was released that addressed this issue and private keys are
included with the system state backup image if the hotfix is applied.
Network Isolation
CAs should only be accessible by the users and systems that require access to them. There are many
deployment scenarios for a CA and many front end systems that may require access to a CA. Supporting
some out-of-box scenarios such as auto enrollment of user or computer certificates requires broad access to
the CA from most, if not all, domain joined client computers and users on the internal network. Other
deployments, such as deploying with a RA such as Forefront Identity Manager Certificate Management, may
only require the RA system to interact directly with the CA.
When developing the security design for PKI, consider the following recommendations:
Isolate certificate systems away from other systems on the network. If a system does not have a
legitimate need to connect to a certificate system, do not allow the connection.
Implement security “zones” to isolate the certificate systems based on their criticality or relationship
to each other
Only allow the required inbound and outbound connections that are identified as necessary for the
CA and supporting systems to function
If you utilize network attached HSMs, restrict access to those devices to only the CAs or other
systems that utilize them
Restrict management access to originate from a limited set of administrative hosts. Refer to the
Securing Remote Management Tasks section for more information.
Remove Overly Broad Enroll or Autoenroll Permissions – Rather than determining the exact
population of users that require a specific certificate type and explicitly granting them enrollment
permissions, occasionally “Authenticated Users”, “Domain Users” or other broad groups are granted
enroll or autoenroll permissions. This can lead to accounts that have no need for a certificate to be
eligible to enroll. Avoid granting overly broad enrollment permissions for certificates. Instead,
carefully consider which accounts need permissions, and explicitly deny enrollment rights for users or
groups of users that should not be eligible for enrollment.
Remove Unused Templates from Certification Authorities – When a Certificate Template no longer
has a business need, remove it from any certification authorities that issued it. By default, several
templates are included as part of the installation of an enterprise CA. If those templates are not
required, they should be removed. Alternatively, on Microsoft Windows Server 2008® and newer you
should install the CA with no default templates by including LoadDefaultTemplates=0 in the
[certsrv_server] section of the CAPolicy.inf file used during setup of the CA.
Additionally, some high value templates that are issued relatively infrequently do not need to be
available on the CA all the time. Examples include Enrollment Agent, Key Recovery Agent, and EFS
Data Recovery Agent. Consider removing these templates from issuing CAs except during active use,
and monitor for attempts to add these templates to a CA. Refer to the Monitoring Changes to
Certificate Templates section for more information.
Secure Templates that Allow You to Specify the Subject in the Request – Certificate templates
provide for two main mechanisms for generating the subject name(s) in a certificate:
1. Supply in request – All subject information is provided by the requestor. If you use the default CA
policy module, no additional checks are done to confirm the mapping of the subject information
to a user account in Active Directory®. If a certificate template is configured to use “supply in
request” without additional approvals, the following dialog box displays:
2. Build from this Active Directory® information – The subject for the certificate is determined by
the CA by performing an Active Directory® lookup of the user performing the request. The
applicable attributes from the Active Directory® are used to populate the certificate.
o Implement certificate manager approval – Certificate manager approval will set any
incoming requests for the template into a pending state, where it must be approved by a
person (or system) that holds the “issue and manage certificates” role on the CA before it is
issued.
Add from known AD object attributes – The CA can add alternative names from a defined subset of
attributes when you choose to add the subject information from Active Directory®. The CA performs
this addition, and the data is not specified by the user. Manipulation would require an attacker to be
able to manipulate the values of attributes for a user in Active Directory®.
Add as an extension in the certificate request – If the template is configured for “supply in request”,
the extensions requested will be honored by the CA if supported. The alternative names are provided
by the requestor.
Add as an attribute that accompanies the certificate request – Requires the CA to allow user-
specified alternative names via the EDITF_ATTRIBUTESUBJECTALTNAME2 flag. If this flag is set on
the CA, any request (including when the subject is built from Active Directory®) can have user
defined values in the subject alternative name.
Allowing users to define arbitrary alternative names poses risk to the PKI if it is not implemented with proper
controls. Anytime you allow a user to define SANs, implement the following additional controls:
Requests that may contain user-defined alternative names should be set to “pending” when
submitted and reviewed by a Certificate Manager prior to issuance
Do not allow a single person to have the ability to both add SANs and approve the request
If EDITF_ATTRIBUTESUBJECTALTNAME2 is included, it is turned on. To disable the setting, run the following
command:
For more information on subject alternative names, refer to How to Request a Certificate With a Custom
Subject Alternative Name.
Conclusion
Implementing strong technical controls can mitigate many of the common attack vectors used to
compromise an ADCS PKI installation. This section has detailed some of the common misconfigurations that
can lead to compromise, including securing access to certificate templates, and template enrollment options
that lead to the issuance of unauthorized credentials. Limiting access to PKI systems through network
controls and treating PKI systems as high value assets that are not managed like common infrastructure helps
mitigate the risk of the PKI being compromised through supporting systems and overly broad access. Strong
key protection help mitigate the threat of a CA key being exported and used outside of authorized hardware
by an insider threat or an attacker.
For a complete list of the recommendations for technical controls, along with the level of business impact at
which you should consider implementing them for, refer to Appendix F: List of Recommendations by Impact
Level.
NIST Special Publication 800-57 Recommendation for Key Management Part 1 (Revision 3) and ENISA’s
Algorithms, Key Sizes and Parameters Report – 2013 Recommendations provide detailed recommendations
for algorithms, key lengths, and signature schemes. Both documents contain some key lengths comparison
for different algorithms and consider 128-bit security level to be the minimum requirement for new systems
being deployed. However, take into account the length of time data needs to be kept secure. This is where
CA certificate validity period plays its role. The validity period defines how long CA certificates will be trusted
because the key length for CA certificates relates to both the security level that needs to be provided and the
required duration of the key’s validity. With a longer validity period, plan for a higher security level of crypto
algorithms.
With these considerations in mind, the recommended subordinate CAs key length must be at least 2048 bits
for RSA and ECC-based subordinate CA keys must use one of the following curves: P-256, P-384, or P-521. For
The SHA-2 family of hash algorithms is currently the only recommended family of cryptographic hash
algorithms. Microsoft recently announced a new policy for CAs that are members of the Windows Root
Certificate Program that deprecates the use of the SHA1 algorithm in SSL and code signing certificates in
favor of SHA2. The recommendation to discontinue use of SHA-1 is also published as Security Advisory
2880823. The recommendation is to ensure that cryptographic keys have a limited lifetime to mitigate the
risk of future advances in the capabilities of cryptographic attacks.
To ensure the effective use of certificates, use the following secure certificate signature scheme and hash
algorithm combinations:
RSASSA-PKCS-v1.5 signature scheme as defined in PKCS #1 RSA Cryptography Standard v2.1 with
SHA-2 hash algorithms
RSASSA-PSS signature scheme as defined in PKCS #1 RSA Cryptography Standard v2.1 with SHA-2
hash algorithms (while the RSASSA-PSS signature scheme is considered more secure than the
RSASSA-PKCS-v1.5 signature scheme, it is not widely supported)
Most PKI deployments today use the RSA/SHA-1 algorithms rather than ECC/SHA-2 due to limited support for
elliptic curve cryptography (ECC) by replying parties. Fortunately, Microsoft Windows Vista® and, Microsoft
Windows Server 2008® and later versions support advanced cryptographic algorithms including Elliptical
Curve Cryptography (ECC) and Secure Hash Algorithm (SHA) version 2. It is important to perform adequate
testing to ensure compatibility with relying party applications. Note that with any choice of cryptographic
algorithms and key lengths you should pay significant attention to application compatibility and integration
testing as application capabilities may differ. Refer to Common Questions about SHA2 and Windows for
answers to common questions about support of SHA-2 on Microsoft Windows® operating systems.
As a general rule, the validity period of CA certificates should be at least twice as long as the maximum
validity of the certificates issued by the CA. For example, if a CA issues certificates that are valid for two
years, the validity period of the CA certificate should be at least four years. A CA certificate is usually renewed
in the middle of its lifetime so that it can keep issuing certificates during the full validity period. The
recommendation is to renew the CA certificate once while keeping the same key pair and to renew it again
while changing the key pair.
Several reports, such as ENISA Algorithms, Key Sizes and Parameters Report (2013 recommendations), NIST
Special Publication 800-57 Part 1 Rev. 3, or BSI Algorithms for Qualified Electronic Signatures provide
guidelines for choosing strengths of cryptographic algorithms based on the algorithm security lifetime. For a
comparison of the various proposed models, refer here to define the validity period based on your risk
assessment.
Be aware of applications that have long-term PKI use cases. For instance, data stored with its original
encryption or documents stored with their original digital signatures may require special processing because
all of the keys and certificates originally used will have expired or exceeded their initial period of usefulness,
as is the case with code signing. It is important to pay attention to persistence and availability of the
certificate revocation information with a goal to enable applications to verify original signature, usually with
help of time stamping. If you use such applications, ensure that those applications can use expired
certificates, or manage the storage of their data such that the original signatures and encryptions are not
used.
The key length of a CA key is the same or longer than the key lengths of the keys certified by the CA
The strength of the hash algorithm used by a CA to sign certificates is comparable to the strength of
the CA key. For example, a CA that has a P384 ECC key should use SHA-384 to sign certificates.
The strength of the hash algorithm used by a CA to sign certificates is at least as strong as the hash
algorithm used by its subordinate CAs. For example, if a CA uses SHA-256 to sign a subordinate CA
certificate, then that subordinate CA must not use SHA-384 to sign certificates it issues.
NIST Special Publication 800-57 “Recommendation for Key Management Part 1 (Revision 3)” provides
suggested crypto periods for key types and comparable strengths of crypto algorithms:
Bits of security Symmetric Key FFC (e.g., DSA, D-H) IFC (e.g., RSA) ECC (e.g., ECDSA)
Algorithms
While planning a PKI deployment, ensure that the CA hierarchy uses consistent asymmetric cryptographic
algorithms and key lengths when issuing certificates. When you decide to move to stronger algorithms,
consider building a parallel infrastructure built entirely with new algorithms to which you can migrate.
Key Usage
The intended scope of usage for a private key is specified through certificate extensions, including the Key
Usage and Extended Key Usage (EKU) extensions in the associated certificate. The cryptographic use of a
specific key is constrained by the Key Usage extension in X.509 certificates. All certificates should include key
usage as a critical extension. Note that you usually should not change key usage in the end-entity certificates,
and AD CS CA will take care of setting the right bits in the keyUsage extension.
RSA public keys to use for key transport keyEncipherment bit (2)
ECC public keys to use for key agreement keyAgreement bit (4)
Public keys in CA certificates must be used only for signing issued certificates and status information (for
example, CRLs). The following table summarizes key usages for CA certificates:
CA certificates Public key to use to verify other certificates keyCertSign bit (5)
Public keys that are bound into device, applications, and service certificates may be used for digital signature
(including authentication), key management, or both. The following table summarizes key usages for device
certificates:
Device certificates Public keys to use for digital signatures digitalSignature bit (0)
RSA public keys to use for key transport keyEncipherment bit (2)
ECC public keys to use for key agreement keyAgreement bit (4)
RSA keys to use both for digital signatures and digitalSignature and
key management keyEncipherment bits
ECC keys to use both for digital signatures and digitalSignature and
key management keyAgreement bits
EKU defines what a certificate will be used for and may contain multiple purposes. Defining the types of
certificates supported by the PKI by determining EKUs is a critical part of the solution design process. A
common misconfiguration is to leave unnecessary default templates installed that offer a wide variety of
EKUs. You should determine the required capabilities of a certificate before it is issued, and carefully plan
their EKUs.
Every PKI-enabled solution should have the type of certificate that matches its trust level and key usage
requirements. This could be accomplished by using its own type of certificate that has its own attributes,
enrollment process, and target audience. However, it is likely that some solutions can share a certificate for
different purposes if the solutions happen to have the same characteristics. For example, a certificate stored
on a smart card may be used for workstation logon, VPN access, or for authentication to restricted web sites.
It is important to evaluate whether to use single-purpose or multipurpose certificates. The following table
summarizes the benefits of both approaches.
Granular control of certificate usage. Certificates Greater usability. Users find multipurpose
can be individually revoked without affecting other certificates easy to handle because fewer of them
use cases. Certificate usage is limited, so risky exist.
scenarios (for example, code signing) are not
enabled unintentionally.
Limited key usage. Different keys are used for A smaller accumulated size. Multipurpose
different PKI-enabled services. certificates are advantageous when hardware
tokens have limited storage capabilities.
Multiple sources. Certificates can be issued through Less network overhead. Less demand is placed on
different CAs when different certificate policies, the infrastructure because a lower number of
application policies, or issuing policies apply. certificates are in use.
Archival and Recovery. Certificates that are good Less administrative overhead. The smaller number
for signing and encryption should not be archived. of enrolled certificates reduces the overall
Single purpose certificates allow encryption keys to management burden placed on the certificate
be archived while allowing signature keys to only managers.
exist where they were created.
The EKUs of each certificate type are typically defined as part of certificate profiles (expressed in the CPS).
For AD CS enterprise installations, the properties of each certificate type are configured in certificate
templates stored in Active Directory®. Microsoft Windows® operating systems come with built-in templates
Object Identifiers
EKUs are identified in a certificate by object identifiers (OIDs). An OID is a sequence of integers that uniquely
identifies an object, and OIDs are used in the X.509 v3 standard to represent policies, extensions, and
attributes in digital certificates. Preferably, the OIDs should be globally unique, especially if the PKI will be
used externally.
Quite often customers do not consider OIDs before the PKI deployment starts, but it is not complex to obtain
one. If you need to define your own EKU and your PKI will be used across multiple organizations, the EKU
needs to have a unique OID assigned either by the Internet Assigned Numbers Authority (IANA) or by a
national standards organization. However, if you do not foresee using the OIDs in conjunction with other
organizations, the option exists of using private OIDs within the Microsoft IANA-assigned tree. These OIDs are
based on the globally unique identifiers (GUIDs) of Active Directory® forests. Such an OID can be obtained by
running Microsoft Management Console (MMC) and using the Certificate Template snap-in. In the snap-in,
right-click Certificate Templates, and then select View Object Identifiers. The OIDs are in the
1.3.6.1.4.1.311.21.8.a.b.c.d.1 format, where a.b.c.d is a unique string of numbers based on the AD forest’s
GUID.
Critical Extensions
Marking an extension as critical is a powerful concept because it enforces common understanding of
important certificate fields during certificate chain validation. If a PKI-enabled application does not
understand the extension marked as critical, it should not process the certificate. This may affect third party
applications or browsers that will use issued certificates. Refer to How Certificates Work and How CA
Certificates Work for additional information. Unless you have a full understanding of how your certificates
will be used by relying parties, consider limiting the use of the critical flag in End Entity certificates.
CA Certificate Constraints
The goal of stating constraints in a CA certificate is to restrict the scope of the CA and limit the impact of a
CA’s security breach on other CAs in the certificate hierarchy. RFC 5280 defines multiple way to express
constraints: basic constraints, name constraints, policy constraints, and EKU. The use of these constraints for
qualified subordination is explained in Planning and Implementing Cross-Certification and Qualified
Subordination Using Windows Server 2003.
Unfortunately, support for most of these constraints varies from platform to platform, and it differs between
applications (depending on the chain building library used) and kernel-mode/user-mode. These limitations
leave only a limited number of practical options to restrict subordinate CA certificates: basic constraints and
EKU. By enforcing these CA certificate extensions for all the issuing CAs, you can protect the PKI from an
attacker that may use a single compromise of an Issuing CA signing key to issue another subordinate CA
certificate in the CA hierarchy and effectively work around controls established in the PKI.
The Root CA usually has no defined path length constraint (pathLenConstraint=none) that allows you to
extend the CA hierarchy in the future. However, if you have a clear understanding that your issuing CAs will
issue certificates only to End Entities, then you should limit issuing CAs by specifying the path length
constraint and set this constraint to zero. This prevents the Issuing CA from issuing any CA certificates and
will be enforced by PKI clients during certificate chain validation. Without this constraint an attacker may use
a single compromise of an Issuing CA signing key to issue another subordinate CA certificate in the CA
hierarchy and effectively work around controls established in the PKI.
It is not recommended to use [BasicConstraintsExtension] section in the CAPolicy.inf file to specify the path
length constraint for a subordinate CA in AD CS. To add this constraint to a subordinate CA certificate if the
parent CA has no PathLength constraint in its own certificate, set the CAPathLength registry value on the
parent CA. For example, to issue a subordinate CA certificate with a PathLength constraint of 0, use the
following command to configure the parent CA.
Setting this value causes the CA to behave as though its own certificate had a PathLength constraint of
whatever number you specify. Any subordinate CA certificate issued by the parent CA will have a PathLength
constraint set appropriately in its Basic Constraints extension. You must restart AD CS CA for this change to
take effect. Note that there is no easy way to undo this change and you may need to reissue subordinate CA
certificates. Nevertheless, with clear understanding of your CA hierarchy basic constraints together with
extended key usage constraints is the powerful mechanism to limit your issuing CAs.
Note that you may hit the limitations of software in validation of issued certificates, so in all cases you must
test your target scenarios to verify the design decisions.
For subordinate CA certificates, the Basic Constraints extension should be present and marked as
critical
The pathLenConstraint field should be set to the minimum value required to enable the business
scenario (i.e. 0 if that CA will issue certificates only to End Entities)
The EKU extension should be present and contain the minimum set of EKU object identifiers (OIDs) to
enable the business scenario. Furthermore, the anyExtendedKeyUsage OID (2.5.29.37.0) should not
be specified.
Conclusion
Using strong cryptography throughout your PKI helps mitigate threats introduced when a cryptographic
algorithm becomes weak and susceptible to failure, which can lead to a full loss of trust in your PKI. Utilizing
constraints on End Entity certificates and CA certificates helps to mitigate the risk of having a certificate used
for unintended use cases, which may allow access to resources or data that should not be allowed.
Constraints also help mitigate the threat of an attacker creating their own subordinate CA in your PKI
hierarchy after a compromise, allowing them to create certificates of their choosing.
For a complete list of the recommendations for planning certificate algorithms and usages, along with the
level of business impact at which you should consider implementing them, refer to Appendix F: List of
Recommendations by Impact Level.
Protecting CA Keys
When designing a new PKI, a key design decision is whether or not to use an HSM or create keys stored in
software. HSMs come in a number of form factors including rack-mounted appliances which can be attached
using a serial or network connection, as well as smaller PCI or USB-connected devices. HSMs have a number
of tamper-evident and self-destructing features. They are also available with multiple performance and
compliance options. However, purchasing HSMs for PKI can represent a significant capital investment. For all
CAs used in a production environment to secure corporate resources, a recommendation is to implement an
HSM as part of a secure PKI. Below are a number of the benefits gained when using an HSM:
HSMs provide the capability of enforcing additional controls whenever the CA key is used, such as
enforcing multi person control
Implementing HSMs ensures that the private key cannot be used without access to a properly
configured HSM. In the event of a compromise, the damage done can be limited. With a software-
based key, any number of copies of the key can exist and be used from any computer.
HSMs can provide tamper evidence or tamper resistance for physical attacks
Note: Marking a software-based key as “not exportable” is not considered a security feature and should not
be relied upon to prevent attackers from obtaining the private key.
In a default Active Directory® Certificate Services installation without an HSM present, the CA private key is
stored using the Data Protection API (DPAPI) which encrypts the key using the local computer account
credentials. Additionally, by default the CA private key is marked exportable. Therefore, any person
authenticating with local administrator privileges can access, back up, or export these keys using a number of
various methods including the Certificates MMC Snap-in, the backup function in the Certificate Services MMC
Snap-In, and using certutil.exe and use them in another location. Use hardware protected keys and avoid
using software-based keys for CAs unless the PKI is considered low assurance or the PKI is not used to protect
high value data or transactions (e.g. lab environment, proof of concept, etc.) or if using an HSM is not feasible
due to operational or fiscal constraints.
When determining how many tokens to create and how many to require for different tasks, it is important to
take into account the following:
The level of oversight required – For a sensitive root CA, it may be desirable to have multiple
organizations hold portions of the access tokens, so there is oversight from multiple teams prior to
any work being technically performed
Operational overhead – Generally speaking, the greater the level of protection given to a key the
greater the operational overhead will be to perform tasks on the CA
Backup and disaster recovery – Always create enough objects such that a quorum of objects is
available in the event of a disaster
Consider the following example and how it illustrates the recommendations above. A private key could be
stored on an HSM where, to access the key, three of six objects would be needed to administer the HSM, and
three of six objects would be required to activate the private key for use. In this example, where both the
operational set and administrative set would require three objects for access, the six objects could be divided
into two sets; a primary set and a backup set. After this division, the objects would be divided into three
distinct parts. These three parts could be distributed to representatives from different organizations where
their representatives would ensure the objects were individually inventoried, placed in tamper-evident
containers, and escrowed to separate locations, or handled in a way to ensure separation.
The figure above assumes there are three disjointed entities or organizations involved in this process.
Example organizations are:
PKI Administration – A team or organization ultimately responsible for maintenance and upkeep of
the PKI servers
Information Security – A team or organization responsible for securing data and assets without
having administration ownership
Internal Audit – A team responsible for ensuring security policies, procedures, guidelines and
standards are being enforced
By ensuring the involvement of organizations beyond PKI Administration, a level of checks and balances is
achieved. The cooperation and continued involvement of these organizations is crucial. Ideally, no one
person or organization controls these critical assets.
One way to regulate access to secured assets is to ensure two representatives are present and positively
identified prior to being granted access to their secured assets. For example, a combination of photo
identification, biometrics, or other means of identification can be required prior to allowing access to the
secure facility, or the location housing the offline CAs. An example of object mapping is shown in the figure
below, where there are three fictional organizations involved; PKI Administration (PKIAdmin), Information
Security (InfoSec), and Operations Security (OpsSec).
If a method in which passwords are written or printed is used, special care should be taken to ensure the
password parts are distinctly generated and not stored electronically.
Choosing a good tamper-evident container is not a trivial task. Ideally, the container has a strong seal, has a
good resistance to humidity, has a unique number stamped on the outside, and has an area to write details
for chain of custody. Since these objects may contain electronics, anti-static properties may be desirable.
Some manufacturers will offer samples to evaluate before making a purchase. Stores specializing in assisting
financial businesses or law enforcement have many options for tamper-evident containers as well.
While it may be a good idea to use a transparent container for asset-tagged artifacts for identification and
verification, ensure any artifacts with secrets such as password parts are safely concealed, either by using a
Artifact Storage
PKI artifacts are often required to be stored for long lengths of time. When storing artifacts, ensure that they
are in a climate-controlled environment such as an onsite datacenter vault or a safe-deposit box. Silica gel
packets can be used to eliminate any residual moisture if they are inserted with artifacts in anti-static bags or
storage containers.
When storing the artifacts in a vault, safe, or other type of storage cell, perform a hand-written check-in log
and inventory and retain the logs. When extracting the artifacts, the previous inventory needs to be verified,
and a check-out log written. These check-in and check-out logs should have fields for the following:
Check-out or check-in
Conclusion
Using an HSM to provide strong protection of CA keys or other high value keys is one of the strongest
controls you can implement to protect your PKI. HSMs can provide assurance that keys are only available for
use from authorized systems and help to mitigate the risk of an attacker or insider threat obtaining
unrestricted access to the keys. Protecting other PKI assets and auditing their use helps to ensure that keys
are not used in an unauthorized manner after they have been created in the HSM.
For a complete list of the recommendations for protecting CA keys and critical artifacts, along with the level
of business impact at which you should consider implementing them, refer to Appendix F: List of
Recommendations by Impact Level.
A security logging and monitoring plan for a traditional line of business application will typically include
watching specific logs for indicators of suspicious activity. While this is a vital part of PKI logging and
monitoring, there are more aspects to consider. If operating offline CAs, also monitor the physical access to
the offline CAs, and create a process for reviewing logical access to those systems. You must also monitor and
review physical access for all online systems, including RAs and CAs.
The events discussed in this section will assist you in creating a security monitoring plan for PKI. Monitoring
PKI for operational issues is not considered in this paper. The recommendations are strictly for determining
malicious or suspicious activity related to the PKI.
Monitoring Events
An event is defined as any activity recorded to provide a detailed history of actions that have taken place.
Some events may be tracked electronically within the system, while others may be tracked via manual paper-
based processes. Any event collected, electronic or otherwise, should contain the following information:
Type of event
Regardless of the technology being used to generate or collect alerts, it is vital to have a process in place that
engages the correct support teams if events indicate a security incident has occurred or will occur. Events
that generate a security alert should contain the following:
For electronically collected events, develop a plan for continued storage of collected event data and
retention of the events. Consider using tools such as Windows Event Forwarding® (WEF) to aggregate events
on a separate system for analysis and long term storage. For events recorded through manual processes,
establish processes for archiving and reviewing event logs for abnormalities at regular intervals.
Changes to critical groups that control access to the CA. This would include any custom groups
containing users with elevated rights in the PKI to manage CAs, RAs, or enroll for important
certificate types
Changes to accounts that have privileged access to the PKI. Monitor for changes to attributes on the
Account tab (cn, name, sAMAccountName, userPrincipalName, or userAccountControl). When using
additional software packages that act as a RA to a CA, include the service accounts used by these
systems in this list.
Below are some of the activities that should be monitored to help detect compromise of an AD CS based PKI:
General Events
CA-specific activity
Issuance of certificates that contain restricted usages (Enrollment Agent, Key Recovery Agent)
Usage of the CA private key outside of certsrv.exe (certutil.exe, custom executables or scripts)
Suspicious use of accounts belonging to registration authorities. For example, if a smart card
management system uses a specific service account to request certificates from the CA and that
account makes certificate requests from systems that are not part of the smart card management
system.
Entry and exit to the secure area where PKI hardware is stored or operated. This could include access
to the secure CA cage, access to the server room where the CAs are located, review of camera
footage, etc.
Access to any secure storage locations containing PKI backups or sensitive data. Examples include
access logs for a safe, access records to a document archive facility, etc.
For a complete description of Microsoft Windows® audit policies and subcategories, refer to Best Practices
for Securing Active Directory. To see the current audit policy for a system, type the following at the
Command Prompt:
While audit policy can be configured per computer using auditpol.exe, a preferable method for domain-
joined CAs is to apply a common audit policy as appropriate and configure it using group policy. To set audit
policy using group policies, configure the “Certification Services” subcategory under Computer
Configuration\Windows Settings\Security Settings\Advanced Audit Policy. Set the subcategory to be
enabled for Success and Failure. See the screenshot below.
The CA audit filter is a bitmask value stored in the registry of the CA. Refer to Appendix B: Certification
Authority Audit Filter for details on each individual value and which flags are required to trigger specific audit
events. As shown in the following screenshot taken from the Properties dialog box of the CA, there are seven
categories available for auditing:
Back up and restore the CA database – Controls logging of events triggered when the CA database is
issued backup or restore commands
Change CA configuration – Controls logging of events related to the changing of properties and
configuration of the CA through the CA snap-in. Example events logged are changing CRL validity
periods, changing policy or exit module configuration, or updating configured CDP/AIA extensions.
Issue and manage certificate requests – Controls logging of events related to the issuance of
certificates. This includes logging when a request is received, or set to pending, denied, and issued. In
high volume issuance environments this can generate a large number of alerts, but it is a
recommendation to enable it where possible because it provides a strong audit trail of all issuance
events.
Revoke certificates and publish CRLs – Controls auditing of events related to revocation and
publishing of CRLs.
Store and retrieve archived keys – Controls auditing of events related to the CA archiving keys or
recovering previously archived keys. This includes when a key is imported into the CA database and
archived.
Start and stop Active Directory Certificate Services – Controls creation of audit events whenever AD
CS is started and stopped. A similar event is also logged to the application log, although enabling of
this event writes an event to the security log. If enabled, a cryptographic hash of the CA database is
taken on startup and shutdown of the CA service. When the database becomes large, this may begin
to impact service availability, as the RPC interface for the CA is not available while the hash is being
computed. The start and stop times of the service may be very long depending on the size of the
database.
Advanced CA Monitoring
Although enabling auditing for AD CS provides a solid foundation for capturing events that occur within the
scope of the CA service, additional events can occur on the CA that may indicate a compromise or a potential
compromise. These additional events are useful to capture in addition to the CA audit events.
With an audit filter configured to capture this event, the only method that will trigger an alert is making the
change through the snap-in. To capture changes to all AD CS configuration settings stored locally on the CA,
configure the registry auditing specifically for the AD CS registry keys. Configuring registry auditing at a broad
level is not recommended because it can generate a very large number of alerts.
To enable registry auditing, configure the Microsoft Windows® auditing policy. This can be accomplished with
auditpol.exe or through local or group policy.
To set audit policy using group policies, configure the “Audit Registry” subcategory under Computer
Configuration\Windows Settings\Security Settings\Advanced Audit Policy. Set the subcategory to be
enabled for success and failure.
After enabling registry auditing, configure auditing for the Certification Services registry keys. To configure
auditing for the AD CS CA registry key:
4. Click Auditing.
5. Click Select a principal and select Authenticated Users. From the drop down menus, for Type select
All and for Applies To, select This key and subkeys.
6. Click Show advanced permissions and select the values shown below.
For specific registry values to watch, refer to Appendix A: Events to Monitor. For more information on
configuring registry auditing, refer to How to use Group Policy to audit registry keys in Windows Server 2003.
AD CS includes several audit events that allow monitoring of changes to certificate templates that are actively
being used by a CA. The following audit events are available:
Certificate Services loaded a template (Event ID 4898) – This event is triggered whenever a CA loads
a template for the first time. For example, if a CA is configured with three templates, at startup this
event will trigger for each template as it loads. If a fourth template is added while the CA is running,
an event will be triggered on the first attempt to enroll the template on the CA.
A Certificate Services template was updated (Event ID 4899) – This event is triggered when a
template loaded by the CA has an attribute updated and an enrollment is attempted for the
Certificate Services template security was updated (Event ID 4900) – This event is triggered when
security permissions on a Certificate Template loaded on a CA are changed, and an enrollment event
for the template occurs.
For the template change events to be recorded, configure the CA for auditing of CA events as described in
Configuring Windows Audit Policy and Configure Certification Authority Auditing. In addition, enable the CA
audit setting for “Change CA settings”, and enable a specific policy configuration. To set the policy
configuration to enable audit of template events, run the following command:
Changes to templates that add new EKUs (Code Signing, Enrollment Agent, Smart Card Logon, etc.)
Assignment of new templates that allow “supply in request” to build the subject
Conclusion
Implementing monitoring and alerting for PKI systems is a strong detective control, and can help limit the
extent of damage caused by an attack or identify an attack before it succeeds. Monitoring will help you
identify unauthorized changes to the environment that may allow certificates to be issued to unauthorized
users or contain unexpected usages.
For a complete list of the recommendations for monitoring PKI, along with the level of business impact at
which you should consider implementing them, refer to Appendix F: List of Recommendations by Impact
Level.
Other Attacks
This category includes other attacks such as Denial of Service (DoS) which may block the issuance of new
certificates and revocation lists, theft of an HSM without access token, or theft of partial set of HSM access
tokens which may make it easier for the attacker to obtain the CA’s private key.
There are two major compromise possibilities for full key compromise or access for a CA - an operating
system compromise or a cryptographic compromise. Both of these compromises are covered below.
Examples of physical attacks involve an attacker gaining access to a server by using the console due to:
An unlocked server
The use of storage media to inject an exploit or create a unique bootable operating system partition
to make changes to the primary operating system drive
Both offline and online CA server types are susceptible to physical attack, whether it is by an intruder, an
insider attack, or an unknowing person via a social engineering attack or infected file transfer device. If an
offline CA is kept offline, it is not susceptible to remote attacks. However, online CA servers as well as web
servers responsible for enrollment services or enrollment validation are susceptible.
Brute force attacks against credentials to gain access using Remote Desktop Services or other
remote management tools
For CA servers, regardless if the operating system compromise is physical or remote, the severity of the
compromise and the corresponding response depends on whether the private key integrity is known to be
good or if the key integrity is unknown or compromised.
Cryptographic Compromise
Another attack vector that can lead to full key access is the cryptography of the PKI. For each public key,
there is only one mathematically unique private key and the algorithm to perform encryption and decryption
is well known. Researchers or dedicated attackers can dedicate multiple servers and build testing algorithms
to try to derive the private key by brute force. If a weakness is found in an algorithm used by the CA, the
weakness could be further exploited to identify the private key or issue certificates that appear to come from
the CA.
Retire CA server
Renew CA Keys [For the entire chain/ use a larger key size / use an uncompromised algorithm]
Conclusion
While it is not possible to enumerate every potential avenue of compromise, having a generalized response
plan in mind prior to an event will accelerate the efforts for recovery and remediation. For a complete list of
the recommendations for compromise response, along with the level of business impact at which you should
consider implementing them, refer to Appendix F: List of Recommendations by Impact Level.
Appendix Description
Appendix B: Certification The CA audit filter is a bitmask value representing the seven
Authority Audit Filter different audit categories that can be enabled.
Appendix C: Delegating Active Provides instructions for delegating permissions for Enterprise
Directory PKI Permissions CA Installations and permissions for Managing certificate
templates.
The “Current Windows Event ID” column lists the current event ID as it is implemented in versions of
Microsoft Windows Server® that are currently in mainstream support. The “Potential Criticality” column
identifies whether the event should be considered low, medium or high criticality in detecting attacks. The
event summary contains a brief description of the event.
A potential criticality of high means that one occurrence of the event should be investigated. Potential
criticality of medium or low means that these events should only be investigated if they occur unexpectedly
in numbers that significantly exceed the expected baseline in a measured period of time, or the content of
the message meets a specific criteria. All organizations should test these recommendations in their
environments before creating alerts that require mandatory investigative responses. Every environment is
different, and some of the events ranked with a potential criticality of high may occur due to other harmless
events.
4874 Medium One or more certificate request Issue and If this functionality
attributes changed. Request ID: %1 manage is not used by the
Attributes: %2 certificate CA, it may indicate
requests tampering with a
request
4875 Low Certificate Services received a Start and stop This event is
request to shut down. Active triggered when
Directory® the certutil –
Certificate shutdown
Services command is issued
to the CA
database
4885 High The audit filter for Certificate Change CA May indicate an
Services changed. Filter: %1 security attacker disabling
settings monitoring in an
attempt to cover
their tracks prior
to certificate
activities.
4890 High The certificate manager settings for Change CA May indicate
Certificate Services changed. security tampering with
Enable: %1 %2 settings permissions with
what users are
able to enroll on
behalf of other
users, commonly
used to issue
smart card
certificates.
4896 High One or more rows have been deleted Issue and May indicate an
from the certificate database. Table manage attacker covering
ID: %1 Filter: %2 Rows Deleted: %3 certificate their tracks after
requests issuing certificates.
configuration
changes.
Microsoft-Windows-CertificationAuthority
code is %3. %4
45 Low The "%1" Exit Module "%2" method caused
an exception at address %4. The exception
code is %3.
46 Low The "%1" Exit Module "%2" method
returned an error. %5 The returned status
code is %3. %4
48 Low Revocation status for a certificate in the
chain for CA certificate %3 for %1 could not
be verified because a server is currently
unavailable. %2.
49 Low A certificate in the chain for CA certificate
%3 for %1 could not be verified because no
information is available describing how to
check the revocation status. %2.
51 Low A certificate in the chain for CA certificate
%3 for %1 has been revoked. %2.
52 Low Active Directory Certificate Services issued
a certificate for request %1 for %2.
Additional information: %3
53 Low Active Directory Certificate Services denied
request %1 because %2. The request was
for %3. Additional information: %4
54 Low Active Directory Certificate Services left
request %1 pending in the queue for %2.
Additional information: %3
55 Medium Active Directory Certificate Services Not available in Microsoft
unrevoked the certificate for request %1 Windows Server 2008®
for %2.
56 Low Active Directory Certificate Services denied
request %1. The request was for %2.
57 Low Active Directory Certificate Services denied
request %1. The request was for %2.
Additional information: %3
58 Low A certificate in the chain for CA certificate
%3 for %1 has expired. %2.
59 Low Active Directory Certificate Services did not
start: Could not connect to the Active
Directory for %1. %2.
60 High Active Directory Certificate Services refused
to process an extremely long request from
%1. This may indicate a denial-of-service
attack. If the request was rejected in error,
%3.%5%6
75 Low Active Directory Certificate Services could
not publish a Delta CRL for key %1 to the
following location on server %4: %2.
%3.%5%6
76 Low The "%1" Policy Module logged the
following information: %2
77 Low The "%1" Policy Module logged the
following warning: %2
78 Low The "%1" Policy Module logged the
following error: %2
79 Low Active Directory Certificate Services could
not publish a Certificate for request %1 to
the following location: %2. %3.%5%6
80 Low Active Directory Certificate Services could
not publish a Certificate for request %1 to
the following location on server %4: %2.
%3.%5%6
81 Low Active Directory Certificate Services key
archival is only supported on Advanced
Server. %1
82 Low Active Directory Certificate Services could
only verify %1 of %2 key recovery
certificates required to enable private key
archival. Requests to archive private keys
will not be accepted.
83 Low Active Directory Certificate Services
encountered an error loading key recovery
certificates. Requests to archive private
keys will not be accepted. %1
84 Low Active Directory Certificate Services will not
use key recovery certificate %1 because it
could not be verified for use as a Key
Recovery Agent. %2 %3
85 Low Active Directory Certificate Services ignored
key recovery certificate %1 because it could
not be loaded. %2 %3
86 Low Active Directory Certificate Services could
not use the provider specified in the
registry for encryption keys. %1
87 Low Active Directory Certificate Services could
not use the default provider for encryption
keys. %1
accepted.
99 Low Active Directory Certificate Services could
not create cross certificate %1 to certify its
own root certificates. %2. %3.
100 Low Active Directory Certificate Services did not
start: Could not load or verify the current
CA certificate. %1 %2.
101 Low Active Directory Certificate Services created
CA cross certificate %2 for %1.
102 Low Active Directory Certificate Services could
not create cross certificate %1 to certify its
own root certificates. The %2 extension is
inconsistent. %3. %4.
103 Low Active Directory Certificate Services added
the root certificate of certificate chain %1
to the downloaded Trusted Root
Certification Authorities Enterprise store on
the CA computer. This store will be
updated from the Certification Authorities
container in Active Directory the next time
Group Policy is applied. To verify that the
CA certificate is published correctly in
Active Directory, run the following
command: certutil -viewstore "%2" (you
must include the quotation marks when
you run this command). If the Root CA
certificate is not present, use the
Certificates console on the Root CA
computer to export the certificate to a file,
and then run the following command to
publish it to Active Directory: Certutil -
dspublish %certificatefilename% Root.
104 Low Active Directory Certificate Services
published certificate %1 to %2.
105 Low Active Directory Certificate Services deleted
invalid certificate %1 from %2.
106 Low Active Directory Certificate Services cannot
add certificate %1 to %2. %3. %4.
107 Low Active Directory Certificate Services cannot
delete invalid certificate %1 from %2. %3.
%4.
108 Low Active Directory Certificate Services could
not delete a Certificate for request %1 from
In the table below, “Event ID” is the current Microsoft Windows® event ID for versions of Microsoft
Windows® currently in mainstream support. “Text to Alert On” is the text to search for within the event body
when an alert is generated. “Potential Criticality” identifies whether the event should be considered of low,
medium or high criticality in detecting attacks. The event summary contains a brief description of the event.
64 Change CA configuration
The CA audit filter can be set through the CA snap-in GUI or via the command line. To set the audit filter via
the GUI:
To set the audit filter via the command line, run the following command from an elevated command prompt:
For example, certutil –setreg CA\AuditFilter 18 will set the audit filter to include events covered under
“Change CA security settings” and “Backup and restore the CA database.”
The instructions below do not address the permissions required to install other AD CS roles such as NDES. It
might not be possible to perform other AD CS-related tasks based on the permissions delegated through the
steps below.
Rights to create new objects underneath the Public Key Infrastructure container underneath the
Configuration partition. This includes creating new Certificate Template objects, adding objects to
the Certification Authorities node, the Enrollment Services node, the AIA node, and the CDP node.
Rights to add members to the Cert Publishers groups in each domain in the forest. The computer
account of the CA is added to the Cert Publishers group of its domain during the CA installation.
Note: If installation of the first CA in a forest is done using delegated permissions, it will be necessary to
install the default templates separately as an Enterprise Admin. This can be done prior to installing the CA by
running the command certutil –installdefaulttemplates.
4. Open Active Directory Sites and Services with an account in the Enterprise Admins group.
5. Click the View menu option and select Show Services Node.
6. Under the Services node, right-click Public Key Services, click Properties and click the Security tab.
8. Click Add... and search for the newly created management group and click OK.
9. Grant the new management group full control and click OK.
2. Under Builtin, right-click Pre-Windows 2000 Compatible Access and click Properties.
3. Click the Security tab. Click Add… and select the newly created management group. Grant the group
Read and Write access and click OK.
5. Click the Security tab. Click Add… and select the newly created management group. Grant the group
Read and Write access and click OK.
Policy Terms
Term Term Definition
Asset Owner The creator, generator, originator, or primary possessor of an Asset, or agent(s) to which
the Asset Owner has given consent to act as a fiduciary with regard to specific assets,
according to a documented agreement.
Certificate Policy (CP) A specialized form of administrative policy tuned to electronic transactions performed
during certificate management. A Certificate Policy addresses all aspects associated with
the generation, production, distribution, accounting, compromise recovery, and
administration of digital certificates. Indirectly, a certificate policy can also govern the
transactions conducted using a communications system protected by a certificate-based
security system. By controlling critical certificate extensions, such policies and associated
enforcement technology can support provision of the security services required by
particular applications.
Certificate-Related Information, such as a subscriber's postal address, that is not included in a certificate. May
Information be used by a CA managing certificates.
Certification Practice A statement of the practices that a CA employs in issuing, suspending, revoking, and
Statement (CPS) renewing certificates and providing access to them, in accordance with specific
requirements (i.e., requirements specified in this Certificate Policy, or requirements
specified in a contract for services).
Key Recovery Mechanisms and processes that allow authorized parties to retrieve the cryptographic key
used for data confidentiality.
Online Certificate An online protocol used to determine the status of a public key certificate.
Status Protocol
(OCSP)
Rekey (a certificate) To change the value of a cryptographic key that is being used in a cryptographic system
application; this normally entails issuing a new certificate on the new public key.
Renew (a certificate) The act or process of extending the validity of the data binding asserted by a public key
certificate by issuing a new certificate.
Revoke a certificate To prematurely end the operational period of a certificate effective at a specific date and
time.
Standard Operating A document that describes how to implement a configuration or execute a process that is
Procedure (SOP) considered mandatory for a specific PKI. SOPs serve as the documented record of a given
team's compliance with relevant Policy and/or requirement statements.
Standards Mandatory prerequisites for all PKIs. Standards are subordinate to Policy statements, and
are designed to provide more explicit definition of Policy intent.
Update (a Certificate) The act or process by which data items bound in an existing public key certificate,
especially authorizations granted to the subject, are changed by issuing a new certificate.
PKI Objects
Term Term Definition
Active Directory® Active Directory® Certificate Services (AD CS) is an Identity and Access Control security
Certificate Services technology that provides customizable services for creating and managing public key
certificates used in software security systems that employ public key technologies.
Authority Information Specifies where to find up-to-date certificates for the CA.
Access (AIA)
(Certificate) A database containing information and data relating to certificates as specified in a CP;
Repository may also be referred to as a directory.
(Certificate) Trust List The collection of trusted certificates used by Relying Parties to authenticate other
certificates.
Certificate Chain A chain of certificates consisting of the subscriber certificate, issuing CA certificate,
(Certification Path) intermediate CA certificate(s) and the root CA certificate.
Certificate Profile Detailed description of the structure, components, and the origin of the data in the
certificate
Certificate Revocation A list of certificates (or more specifically, a list of serial numbers for certificates) that have
Lists (CRLs) been revoked, and therefore, entities presenting those (revoked) certificates should no
longer be trusted
Certificate Status A trusted entity that provides online verification to a Relying Party of a subject
Service certificate's trustworthiness, and may also provide additional attribute information for
the subject certificate.
CRL Distribution Points The location where you can download the latest CRL.
(CDPs)
Encryption Certificate A certificate containing a public key that is used to encrypt electronic messages, files,
documents, or data transmissions, or to establish or exchange a session key for these
same purposes.
Hardware Security A hardware security module is a physical computing device that safeguards and manages
Module (HSM) digital keys for strong authentication and provides cryptographic operations processing.
Issuing Certification A subordinate CA that issues certificate to end user and computers (certificate subjects).
Authority
Object Identifier (OID) A globally unique value associated with an object to unambiguously identify it used in
Abstract Syntax Notation (ASN.1)
Registration Authority A trusted entity that establishes and vouches for the identity of a Subscriber to a CA. The
(RA) RA may be an integral part of a CA, or it may be independent of a CA, but it has a
relationship to the CA.
Root Certification The CA at the top of a PKI hierarchy that is explicitly trusted by all subscribers and relying
Authority parties whose public key serves as the most trusted datum (i.e., the beginning of trust
paths) for a security domain.
Self-signed Certificate A certificate that 1: uses its public key to verify its own signature; 2: the subject name is
identical to the issuer name.
Signature Certificate A public key certificate that contains a public key intended for verifying digital signatures
rather than encrypting data or performing any other cryptographic functions.
Subordinate A CA whose certificate signature key is certified by another CA, and whose activities are
Certification Authority constrained by that other CA.
Superior Certification A CA that has certified the certificate signature key of another CA, and who constrains
Authority the activities of that CA.
In their most basic form, digital certificates bind identities to cryptographic key pairs that are mathematically
related and can be used to provide confidentiality, integrity, and nonrepudiation for other systems and
processes. These key pairs are typically referred to as public and private keys. Public keys are often widely
distributed, while private keys are available only to the individual or system that owns them. A certificate
provides a means to tie an identity of a user or system to a specific key pair. By using these keys and
certificates, the following security functions can be performed:
Digital Signatures – A digital signature can provide assurance that a piece of data such as a
document, executable, or script came from a specific source and has not been tampered with since it
came from that source.
Authentication – PKI provides a strong method of authenticating users or systems. By asking a user
or system to perform a digital signature operation with their private key, you get assurance that the
entity presenting you with the certificate has possession of the matching private key, proving they
are who they are asserting to be.
Encryption – PKI provides the capability to encrypt data that can only be decrypted by someone in
possession of the private key. If you want to send someone encrypted data, you can obtain their
public key and encrypt the data with their public key. Since the public and private key are
mathematically related, they can use the related private key to decrypt the data.
Planning a CA Hierarchy
Recommendation Tactical or Impact
Strategic Level
Plan for upcoming PKI uses cases as part of the initial design Strategic Medium
Physical Security
Recommendation Tactical or Rating
Strategic
Leverage existing data center controls for physical security where Strategic Medium
possible
Track and audit requests for physical access to PKI assets Tactical High
Internal
Prevent tailgating to sensitive areas where PKI assets are stored Tactical High
Internal
Develop a Certificate Policy to govern the use of the PKI Strategic High External
Document issuance controls and certificate usage (informal Tactical High Internal
CP/CPS)
Utilize any existing policy structure to store and maintain PKI Tactical Medium
policy
Involve your policy team in the creation of PKI policy Strategic High Internal
Involve your legal department in policy creation if your PKI may Strategic High Internal
affect external customers or partners
Form a Policy Authority to provide governance for the PKI Strategic High Internal
Formalize the work performed by the Policy Authority with Tactical High Internal
auditable change control and meeting minutes
Meet regularly as a Policy Authority to review and update the PKI Tactical High Internal
policy
Establish formal PKI roles and responsibilities and assign specific Tactical High Internal
individuals to each roles
Provide role specific training for all individuals responsible for the Strategic Medium
PKI
Vet individuals who fill trusted roles with a comprehensive Strategic High Internal
background check (in accordance with local privacy law) or other
mechanism
Perform formal key ceremonies that follow a script and include a Tactical High Internal
witness
Use a distinct password for the local administrator account that is Tactical Medium
not used on other systems
Enable the Windows Firewall with Advanced Security and block all Tactical Medium
traffic that is not required
Disable services that are not required for the CA to function Tactical Medium
Only install software that is necessary for the CA to perform its Tactical Medium
function
Use alternate accounts separate from the standard accounts used Tactical Medium
on productivity workstations to manage the PKI
Remove Enterprise Admins and Domain Admins from local Tactical Medium
administrators group on CAs
Use secure administrative hosts or jump hosts to perform remote Strategic High
management tasks Internal
Require PKI administrators to use smart cards for all accounts that Strategic High
manage the PKI Internal
Keep offline CAs truly offline, allow only physical access to all Tactical Medium
components
Use only authorized, dedicated devices to transfer files to/from Tactical Medium
offline CAs
Update offline CAs with service packs, security updates specific to Tactical Medium
CA software, and updates related to system time (time zone
changes)
Ensure that any activity performed on an offline CA can be traced Strategic Medium
to an individual, either through individual accounts or additional
auditing and surveillance
When virtualizing offline CAs, decouple the guest files from the Tactical Medium
physical hardware so the hardware can be easily replaced
When virtualizing offline CAs, use a dedicated host machine that is Tactical Medium
secured in a locked rack or safe. If dedicated hardware cannot be
used, build a clean host OS each time the CA VMs need to be
brought online
When virtualizing offline CAs, securely build the VM on the Tactical Medium
dedicated hardware, do not build it on an online host and migrate
it to the dedicated hardware
Prior to performing any operations on an offline CA, verify the Tactical Medium
When virtualizing offline CAs, perform regular backups of hard disk Tactical Medium
files. Securely store the backups along with any required software
at a backup site
When virtualizing online CAs, limit access to the host to only those Tactical High
who should have access to the PKI Internal
When virtualizing online CAs, use network attached HSMs for key Tactical High
protection Internal
When virtualizing online CAs, continue to take regular CA backups Tactical Medium
with all data needed to restore the CA
If using software keys, protect all key backups (PKCS#12, PFX files) Tactical Medium
with the same level of protection provided to the CA
Do not include backups of the private key as part of the standard Tactical Medium
backup process. Backup the key(s) as needed and physically protect
them by storing in a safe, within a tamper-evident bag and audit all
access to the backup
Do not connect backup systems directly to the CA. Backup the CA Tactical High
to another location which is backed up regularly to eliminate the Internal
need for backup software on the CA
Isolate certificate systems from other systems on the network Strategic High
External
Only allow inbound and outbound connections that are necessary Tactical Medium
for the CA and supporting systems to function
Restrict access to network HSM devices to only the systems that Tactical High
utilize them Internal
Control “enroll” access to certificate templates and only provide Tactical Medium
the access to accounts that require the certificate
Use additional enrollment controls for templates that allow you to Tactical Medium
Use 2048 bit and above key length for RSA keys Strategic Medium
If using ECC for CA keys, use P-256, P-384 or P-521 curves Strategic Medium
Use RSA 4096 for CA certificates that expire more than 15 years in Strategic Medium
the future
Root CA certificate should not be valid for more than 25 years Strategic Medium
Issuing CA certificates should not be valid for more than 5 years Strategic Medium
Renew an issuing CA certificate once before replacing the key pair Strategic Medium
Match the strength of asymmetric key algorithms with the strength Strategic Medium
of the hash algorithm
Use the correct key usage for each certificate use case Strategic Medium
Determine the extended key usages for each PKI use case Strategic Medium
Constrain issuing CAs (use the path length constraint to ensure that Strategic Medium
CA can only issue end-entity certificates and limit application
policies)
Create enough HSM tokens to account for disaster recovery Strategic Medium
Monitor Active Directory® for changes groups that control access Tactical High
to CAs, membership in the “Cert Publishers” group, changes to Internal
privileged and VIP accounts, and unauthorized changes to
certificate templates
Record and review logs from network equipment that supports PKI Tactical High
Internal
Record and review physical access to PKI artifacts, such as access to Tactical High
safes Internal
Identify critical systems and processes that are dependent on PKI Strategic Medium
Copyright Information
The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication.
Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft
cannot guarantee the accuracy of any information presented after the date of publication.
This white paper is for informational purposes only. Microsoft makes no warranties, express or implied, in this document.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be
reproduced, stored in, or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except
as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents,
trademarks, copyrights, or other intellectual property.
Microsoft, Active Directory, BitLocker, Hyper-V, Internet Explorer, Windows Vista, Windows, and Windows Server are either registered trademarks or
trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are property of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No
association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred.