<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Windows PKI blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/pki/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/pki/feed.xml</link>
    <description>News and information for public key infrastructure (PKI) and Active Directory Certificate Services (AD CS) professionals</description>
    <lastBuildDate>Thu, 13 Dec 2018 00:13:42 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Sample Code: End-to-End Certificate Transparency requests on ADCS CA</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/sample-code-end-to-end-certificate-transparency-requests-on-adcs-ca</link>
      <pubDate>Wed, 12 Dec 2018 22:42:54 GMT</pubDate>
      <dc:creator><![CDATA[Tochi E]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/?p=1785</guid>
      <description><![CDATA[Hello all, Tochi Ezebube here again from the Active Directory Certificate Services engineering...]]></description>
      <content:encoded><![CDATA[Hello all, Tochi Ezebube here again from the Active Directory Certificate Services engineering team.

&nbsp;

Sometime back, we released support for the precertificate flow of Certificate Transparency v1 (RFC 6962) in Windows Server 2016 (<a href="https://support.microsoft.com/en-us/help/4093260/introduction-of-ad-cs-certificate-transparency">https://support.microsoft.com/en-us/help/4093260/introduction-of-ad-cs-certificate-transparency</a>). For this to work end-to-end, the component submitting the request to the ADCS CA must submit the returned precertificate to a suitable set of Certificate Transparency Logs using the RFC 6962 protocol, aggregate the results as a SignedCertificateTimestampList, and return it to the ADCS CA for X.509 issuance.

&nbsp;

Since release, we’ve received a number of requests for sample code to speak the RFC 6962 protocol between the CA and the CT Logs. Here is an unofficial sample to get you started with precertificate submission. It is released as-is with the usual caveats.

&nbsp;

Sample code:  <a href="https://msdnshared.blob.core.windows.net/media/2018/12/ADCS-CT-E2E-Sample.zip">https://msdnshared.blob.core.windows.net/media/2018/12/ADCS-CT-E2E-Sample.zip</a>

Sample.sln code breakdown:
<ul>
 	<li>SampleLibrary.csproj: library containing a simple ILogClient and implementation, which speaks the RFC 6962 protocol for adding certificates &amp; precertificates, as well as preparing the SignedCertificateTimestampList object.</li>
 	<li>ConsoleApp.csproj: simple console app illustrating an ADCS CA CT enrollment end-to-end, utilizing SampleLibrary.csproj for Certificate Transparency interactions.</li>
</ul>
&nbsp;

To use:
<ol>
 	<li>Register your ADCS CA certificate's root with the CT Log to be used.</li>
 	<li>Enable the Certificate Transparency feature on your ADCS CA and restart the CA service as follows:
<ol>
 	<li>certutil.exe -setreg CA\CertificateTransparencyFlags 0x1</li>
 	<li>net stop certsvc</li>
 	<li>net start certsvc</li>
</ol>
</li>
 	<li>Open Sample.sln in Visual Studio.</li>
 	<li>Verify it builds.</li>
 	<li>Run ConsoleApp.exe passing in the ADCS CA config string and the CT Log URI, for example:
<ol>
 	<li>ConsoleApp.exe {ServerName}\{CAName} https://ct.googleapis.com/testtube</li>
</ol>
</li>
</ol>
&nbsp;

Happy coding…

&nbsp;

Tochi]]></content:encoded>
    </item>
    <item>
      <title>How will Certificate Transparency affect existing Active Directory Certificate Services environments?</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/how-will-certificate-transparency-affect-existing-active-directory-certificate-services-environments</link>
      <pubDate>Mon, 12 Mar 2018 21:51:58 GMT</pubDate>
      <dc:creator><![CDATA[WesH [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/?p=1775</guid>
      <description><![CDATA[Wes Hammond here from Premier Field Engineering.  It has been a while since I posted anything, but I...]]></description>
      <content:encoded><![CDATA[Wes Hammond here from Premier Field Engineering.  It has been a while since I posted anything, but I wanted to step back into the spotlight to talk a little bit about something a few customers have been asking about lately.  How will Certificate Transparency affect their Active Directory Certificate Services environments?  Well, here are your answers…

&nbsp;

Before we get started, here is a little bit of information about Certificate Transparency that is relevant to this article.  CT is being applied to certificate authorities that chain to a Public/Commercial Root Authority to detect fraudulent certificates used for HTTPS purposes.  Many public certificate authorities have already been reporting to the CT logging servers for some time now.  How it works is beyond the scope of this document and I would recommend you read the information located at the site linked to at the bottom of this article.

&nbsp;

<strong>CT in Browsers</strong>

Google is scheduled to enforce CT in Chrome browsers on April 30<sup>th </sup>2018 for certificates issued after April 1<sup>st</sup> 2018.

&nbsp;

<strong>CT in Private PKI (CA's that DO NOT chain to a public Root)</strong>

I am going to start with the most common scenario.  Most of you have a private PKI within your organization that does not chain up to a public root.  In this scenario, CT will not affect your CA's.  Chrome browser uses Windows native CAPI to determine trusted chains.  Windows can differentiate between commercial/public CA chains and internal/private chains.  Since Windows has this ability, CT will not affect Private/Internal PKI chains.

&nbsp;

<strong>CT in Certificate Chains that DO chain to public Root</strong>

"IF" your certificate authority chains up to a public root and you issue SSL/TLS/HTTPS certificates, CT may affect your PKI.  How it affects you is beyond the scope of this article, and I would recommend you consult your provider for more information.

&nbsp;

<strong>Other Certificate Purposes</strong>

As I mentioned earlier, CT is only relevant to certificates used for HTTPS.  All other certificate purposes such as smartcard logon, code signing, document signing, SMIME, any many others are not visible through Chrome browsers and thus are not affected, so rest easy :)

&nbsp;

For more information on Certificate Transparency see the official site on it here: <a href="https://www.certificate-transparency.org/">https://www.certificate-transparency.org/</a>

If you liked this blog please don't forget to rate it.]]></content:encoded>
    </item>
    <item>
      <title>[CrossPost ] HTTPS Inspection and your PKI</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/crosspost-https-inspection-and-your-pki</link>
      <pubDate>Fri, 24 Feb 2017 03:10:50 GMT</pubDate>
      <dc:creator><![CDATA[WesH [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/?p=1745</guid>
      <description><![CDATA[Hey Everyone,

A little while back I posted this article to my own personal blog and it is getting...]]></description>
      <content:encoded><![CDATA[Hey Everyone,

A little while back I posted this article to my own personal blog and it is getting some traction but it might get more here so I wanted to share it as these questions come up all the time.  I hope you enjoy it.

<a href="https://blogs.technet.microsoft.com/crypto/2016/01/27/https-inspection-and-your-pki-2/">https://blogs.technet.microsoft.com/crypto/2016/01/27/https-inspection-and-your-pki-2/</a>]]></content:encoded>
    </item>
    <item>
      <title>How to write an NDES policy module</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/how-to-write-an-ndes-policy-module</link>
      <pubDate>Wed, 30 Nov 2016 02:35:17 GMT</pubDate>
      <dc:creator><![CDATA[Tochi E]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/?p=1725</guid>
      <description><![CDATA[Hi there!

This is Tochi Ezebube with the Active Directory Certificate Services (ADCS) engineering...]]></description>
      <content:encoded><![CDATA[Hi there!

This is Tochi Ezebube with the Active Directory Certificate Services (ADCS) engineering team; I wanted to share some further details on how to write a custom policy module for the ADCS Network Device Enrollment Service (NDES) in Windows Server 2012 R2 and onwards.

Here it is: <a href="https://msdnshared.blob.core.windows.net/media/2017/07/How-to-write-an-NDES-policy-module.pdf">how-to-write-an-ndes-policy-module</a>.

And here's <a href="https://technet.microsoft.com/en-us/library/dn473016.aspx?f=255&amp;MSPPError=-2147217396">some general info on policy modules in NDES</a>.

Let me know if you have any questions!

Tochi]]></content:encoded>
    </item>
    <item>
      <title>[CrossPost] SHA1 Deprecation Policy</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/sha1-deprecation-policy</link>
      <pubDate>Mon, 19 Oct 2015 21:02:51 GMT</pubDate>
      <dc:creator><![CDATA[Amerk [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/2013/11/12/sha1-deprecation-policy/</guid>
      <description><![CDATA[Update: This page has been removed.  For the most up to date information on the Microsoft SHA1...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000">Update:</span> This page has been removed.  For the most up to date information on the Microsoft SHA1 deprecation policy please see the links posted below

<a href="https://blogs.technet.microsoft.com/msrc/2017/02/23/sha-1-collisions-research/"><span style="color: #0000ff;font-family: Calibri">https://blogs.technet.microsoft.com/msrc/2017/02/23/sha-1-collisions-research/</span></a>

<a href="https://blogs.windows.com/msedgedev/2016/11/18/countdown-to-sha-1-deprecation/#mmogekbBwHWMHGTL.97"><span style="color: #0000ff;font-family: Calibri">https://blogs.windows.com/msedgedev/2016/11/18/countdown-to-sha-1-deprecation/#mmogekbBwHWMHGTL.97</span></a>

<a href="https://social.technet.microsoft.com/wiki/contents/articles/32288.windows-enforcement-of-sha1-certificates.aspx"><span style="color: #0000ff;font-family: Calibri">https://social.technet.microsoft.com/wiki/contents/articles/32288.windows-enforcement-of-sha1-certificates.aspx</span></a>]]></content:encoded>
    </item>
    <item>
      <title>[CrossPost] Implementing SHA-2 in Active Directory Certificate Services</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/crosspost-implementing-sha-2-in-active-directory-certificate-services</link>
      <pubDate>Fri, 24 Jul 2015 06:54:00 GMT</pubDate>
      <dc:creator><![CDATA[WesH [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/2015/07/24/crosspost-implementing-sha-2-in-active-directory-certificate-services/</guid>
      <description><![CDATA[A fellow engineer at Microsoft, Roger Grimes, has published a great article on Implementing SHA-2 in...]]></description>
      <content:encoded><![CDATA[<p>A fellow engineer at Microsoft, Roger Grimes, has published a great article on Implementing SHA-2 in ADCS.&nbsp; You can read it at the link below:</p>
<p><a href="https://social.technet.microsoft.com/wiki/contents/articles/31296.implementing-sha-2-in-active-directory-certificate-services.aspx">https://social.technet.microsoft.com/wiki/contents/articles/31296.implementing-sha-2-in-active-directory-certificate-services.aspx</a></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Setting up NDES using a Group Managed Service Account (gMSA)</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/setting-up-ndes-using-a-group-managed-service-account-gmsa</link>
      <pubDate>Sun, 26 Apr 2015 23:24:00 GMT</pubDate>
      <dc:creator><![CDATA[Dagmar_Heidecker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/2015/04/26/setting-up-ndes-using-a-group-managed-service-account-gmsa/</guid>
      <description><![CDATA[Setting up NDES using a Group Managed Service Account (gMSA)
Hallo everybody, this is Andy and...]]></description>
      <content:encoded><![CDATA[<h1>Setting up NDES using a Group Managed Service Account (gMSA)</h1>
<p>Hallo everybody, this is Andy and Dagmar from Austrian Premier Field Engineering (PFE) describing how to implement NDES using a gMSA (instead of a normal domain user account).</p>
<p>When creating a lab on how to implement NDES (Network Device Enrollment Service) on Windows Server 2012 R2, we decided to go for gMSA to be more secure and to get rid of monolithic service accounts that could be misused. Unfortunately it turned out that it was not as straight forward as we expected and we decided to write down the steps and publish them.</p>
<p>Why all the effort? NDES works like a charm when installed with default settings&hellip; The answer is short and simple: Security. NDES acts as a registration authority for a CA thereby leveraging the Simple Certificate Enrollment Protocol (SCEP). Because of the way this protocol was designed, the CA has to fully trust the NDES regarding the verification of incoming certificate requests. The result of this design is that the NDES owns an extremely powerful type of certificate (Exchange Enrollment Agent (Offline request) by default) which allows NDES to request certificates with almost any subject from the CA. Therefore, putting as much effort as possible into securing NDES absolutely makes sense.</p>
<p>Be aware that the whole process of securing NDES should comprise a bunch of measures (e.g. enrolling the NDES certificates to a HSM) and that using a gMSA to run it, is only one of the recommended hardening steps. Please refer to this whitepaper focusing on NDES security: <span lang="EN-US" style="color:#1f497d;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;"><a href="https://www.microsoft.com/en-us/download/details.aspx?id=46406&amp;WT.mc_id=Blog_Intune_General_PCIT"><span style="color:#0000ff;">https://www.microsoft.com/en-us/download/details.aspx?id=46406&amp;WT.mc_id=Blog_Intune_General_PCIT</span></a></span></p>
<p><span style="font-family:Times New Roman;font-size:medium;"> </span></p>
<h2>&nbsp;</h2>
<h2>Group Managed Service Accounts</h2>
<p>(Standalone) Managed Service Accounts were introduced in Windows Server 2008 R2 and are managed domain accounts that provide automatic password management and simplified SPN management, including delegation of management to other administrators but limited to only one server. Group Managed Service accounts were introduced with Windows Server 2012 and provide the same functionality within the domain but also extend their availability to multiple servers.</p>
<p>From the security as well as from the manageability perspective, gMSA are the preferred way to configure services wherever it is supported to use them. For more details regarding gMSA, please refer to <a href="https://technet.microsoft.com/en-us/library/hh831782.aspx">https://technet.microsoft.com/en-us/library/hh831782.aspx</a></p>
<h2>&nbsp;</h2>
<h2>NDES Accounts</h2>
<p>When setting up NDES you have to decide in which security context the NDES application pool should run. From the NDES wiki (see <a href="https://social.technet.microsoft.com/wiki/contents/articles/9063.network-device-enrollment-service-ndes-in-active-directory-certificate-services-ad-cs.aspx#Permissions_Required_for_the_Network_Device_Enrollment_Service">https://social.technet.microsoft.com/wiki/contents/articles/9063.network-device-enrollment-service-ndes-in-active-directory-certificate-services-ad-cs.aspx#Permissions_Required_for_the_Network_Device_Enrollment_Service</a>for more details) we learn that the NDES app pool account needs to fulfill the following requirements:</p>
<ul>
<li>Must be a member of the local IIS_IUSRS group.</li>
<li>Must have request permission on the configured CA.</li>
<li>Must be a domain user account and have Read and Enroll permissions on the configured templates.</li>
<li>Must have SPN set in Active Directory.</li>
</ul>
<p>All these requirements can be fulfilled by a gMSA, we simply need to configure the SCEP app pool to run in the security context of the gMSA, perform some additional steps and that&rsquo;s it. But oooops, it wasn&rsquo;t so simple then&hellip;</p>
<h2>&nbsp;</h2>
<h2>Configuration Steps</h2>
<p>Many of the steps below are described in more detail in the NDES wiki. We are repeating them here in a summarized way in order to provide a complete guide of all steps required. Wherever gMSA specific steps are required, we describe them in detail.</p>
<p>Let&rsquo;s assume the following parameters for our lab environment:</p>
<ul>
<li>NDES service account: NDESgMSA</li>
<li>NDES server: ADCSWeb02.fabrikam.com</li>
<li>Certification authority: CA02</li>
<li>Web Server certificate (with proper subject and/or SANs set) enrolled to the NDES server</li>
</ul>
<h3>&nbsp;</h3>
<h3>Prerequisites</h3>
<ul>
<li>Forest prepared for gMSA usage (KDS Root Key created - <a href="https://technet.microsoft.com/en-us/library/jj128430.aspx">https://technet.microsoft.com/en-us/library/jj128430.aspx</a>)</li>
<li>NDES Administrator account (out of scope of this post, see NDES wiki for details)</li>
<li>NDES Device Administrator account (out of scope of this post, see NDES wiki for details)</li>
</ul>
<h3>&nbsp;</h3>
<h3>Create and configure gMSA</h3>
<p>1. Type the following command to create a new gMSA:</p>
<p><span style="font-family:Courier New;">New-ADServiceAccount -name NDESgMSA -DNSHostName NDESgMSA.fabrikam.com -PrincipalsAllowedToRetrieveManagedPassword ADCSWEB02$</span></p>
<p>2. Then configure the gMSA on the NDES host machine:<br />a. To load the AD PowerShell RSAT feature, type: <span style="font-family:Courier New;">Add-WindowsFeature RSAT-AD-PowerShell<br /></span>b. To install the gMSA on ADCSWEB02 type: <span style="font-family:Courier New;">Install-ADServiceAccount NDESgMSA<br /></span>c. To verify if the gMSA has been configured properly, type: <span style="font-family:Courier New;">Test-ADServiceAccount NDESgMSA</span></p>
<p><strong>Note</strong>: The answer has to be true, otherwise it does not make any sense to continue.</p>
<p>3. Next, add the NDESgMSA account to the <b>IIS_IUSRS</b>group on the NDES host machine.</p>
<h3>&nbsp;</h3>
<h3>Configure CA Security Settings and Templates</h3>
<p><strong>Note</strong>: we are assuming for easiness that you are going to use the default templates. We recommend using custom (version 2) templates in production as stated at <a href="https://social.technet.microsoft.com/wiki/contents/articles/9063.network-device-enrollment-service-ndes-in-active-directory-certificate-services-ad-cs.aspx#Setting_Up_New_Templates_for_the_Service_Certificates">https://social.technet.microsoft.com/wiki/contents/articles/9063.network-device-enrollment-service-ndes-in-active-directory-certificate-services-ad-cs.aspx#Setting_Up_New_Templates_for_the_Service_Certificates</a>.</p>
<p>1. Grant <b>Read</b> and <b>Enroll</b> permissions on <b>Exchange Enrollment Agent (Offline Request)</b> template to NDESAdmin.<br />2. Grant <b>Read</b> and <b>Enroll</b> permissions on <b>CEP Encryption </b>template to <b>NDESAdmin</b>.<br />3. Grant <b>Read</b> and <b>Enroll</b> permissions on <b>IPSec (Offline Request)</b> template to <b>NDESgMSA</b> and <b>DeviceAdmin</b>.<br />4. <strong>Publish</strong> all three templates on the Certification Authority.</p>
<h3>&nbsp;</h3>
<h3>Install NDES</h3>
<p>Unfortunately, the setup wizard does not provide support for running the NDES application pool in the security context of a gMSA. That&rsquo;s why we are processing the installation using more or less the default settings.</p>
<ol>
<li>On the NDES host machine, add the <b>Network Device Enrollment Service</b> as a role service for the Certification Authority role.</li>
<li>Once the installation has completed, click <b>Configure Active Directory Certificate Services</b> to continue with the configuration of NDEs.</li>
<li>On the <b>Credentials</b> screen, ensure that the NDES Admin account (which was created as part of the prerequisites) is selected.</li>
<li>On the <b>Role Service</b> page, select <b>Network Device Enrollment Service</b> and click <b>Next</b>.</li>
<li>On the <b>Specify the service account</b> page, select <b>Use the built-in application pool identity</b>. Click <b>Next</b>.</li>
<li>On the <b>Specify CA for Network Device Enrollment Service</b> page, click <b>Select</b>. On Select Certification Authority, select the CA you are going to use with this NDES installation and click <b>OK</b> &gt; <b>Next</b>.</li>
<li>On the <b>Type the requested information to enroll for an RA certificate</b> page, click <b>Next</b>.</li>
<li>On the <b>Configure CSPs for the RA</b> page, click <b>Next</b>.</li>
<li>Finally, click <b>Configure</b>.</li>
</ol>
<p>Alternatively, using the famous PowerShell:</p>
<p><span style="font-family:Courier New;">Add-WindowsFeature Adcs-Device-Enrollment -includeManagementTools</span></p>
<p><span style="font-family:Courier New;">Install-AdcsNetworkDeviceEnrollmentService -ApplicationPoolIdentity -CAConfig &quot;CA02.fabrikam.com\FabrikamIssuingCA&quot; -RAName &quot;Fabrikam NDES RA&quot; -RACountry &quot;DE&quot; -RACompany &quot;Fabrikam&quot; -SigningProviderName &quot;Microsoft Strong Cryptographic Provider&quot; -SigningKeyLength 2048 -EncryptionProviderName &quot;Microsoft Strong Cryptographic Provider&quot; -EncryptionKeyLength 2048</span></p>
<h3>&nbsp;</h3>
<h3>Post-Installation IIS Configuration</h3>
<ol>
<li>Open Internet <strong>Information Service (IIS) Manager</strong>.</li>
<li><strong>Configure a binding for https using the host name and Server Name Indication (SNI)</strong><br /><span style="font-size:xx-small;">Note: On Windows Server 2012, IIS supports Server Name Indication (SNI), which is a TLS extension to include a virtual domain as a part of SSL negotiation. What this effectively means is that the virtual domain name, or a hostname, can now be used to identify the network end point. This allows IIS to share IP addresses among SSL websites. However, it should be noted that if this feature is enabled, clients (in this case the mobile device itself or the MDM (Mobile Device Management Tool) not ready for SNI will not be able to contact NDES. Find more details about SNI at </span><a href="https://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-server-name-indication-sni-ssl-scalability"><span style="font-size:xx-small;">https://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-server-name-indication-sni-ssl-scalability</span></a></li>
<li><strong>Change SCEP application pool identity to the gMSA</strong><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/89/metablogapi/image_451059A5.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-89-metablogapi/image_5F00_451059A5.png"></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/SCEP2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/SCEP2.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/SCEP2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/SCEP2.png" border="0" /></a><br /><br />Note that the NDES application pool is named &ldquo;SCEP application pool&rdquo; in IIS.</li>
<li><strong>Change ISAPI Handler order:</strong><br /><span style="font-size:xx-small;">Note: The following steps are described in </span><a href="https://support.microsoft.com/en-us/kb/2800975"><span style="font-size:xx-small;">https://support.microsoft.com/en-us/kb/2800975</span></a><br />If you do not configure IIS in the way described by the knowledge base article mentioned above, your NDES installation will work upon first testing. But later you will find out that the device administrator role is unable to request a challenge password at the mscep_admin site (unless being added to the Enterprise Administrators group).
<p>a. Still in IIS MMC, select the <strong>Default Web Site.<br /></strong>b. Click <strong>View Applications </strong>on the <strong>Actions</strong> pane on the right side.<br />c. Double-click <strong>Handler Mappings</strong> on the middle pane.<br />d. On the Actions pane, click <strong>View Ordered List&hellip;<br /></strong>e<strong>. </strong>On the Details pane in the middle, select <strong>ExtensionlessUrlhandler-ISAPI-4.0_64bit</strong> and click <strong>Move</strong> <strong>Down</strong>. Click <strong>Yes</strong> to move it <span style="text-decoration:underline;">below the StatifFile item</span>.<br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/89/metablogapi/image_2273CD3D.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-89-metablogapi/image_5F00_2273CD3D.png"></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/SCEP3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/SCEP3.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/SCEP3.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/SCEP3.png" border="0" /></a><br /><br />f. Repeat steps a to f for the<strong> /Certsrv/mscep_admin</strong> application.<br />g. Restart IIS by typing <strong>iisreset</strong> on an elevated command prompt.</p>
</li>
<li>
<p>Configure permissions on private keys<br /><span style="font-size:xx-small;">Note: again, we assumed for easiness that you are going to use the default templates. If you followed our recommendations and prepared custom templates instead, you can skip this step.<br /></span>During the initial configuration of NDES, two certificates were requested in the security context of the NDES Admin (account used to install NDES role service) and permissions on the corresponding keys were configured for the built-in app pool identity. However, we need to configure permissions to the keys for the gMSA:<br /><br />a. Open local computer certificate store (<strong>certlm.msc</strong>) on the NDES machine<br />b. Right-click the <strong>CEP Encryption certificate</strong>, select <strong>All Tasks</strong> &gt; <strong>Manage Private Keys</strong><br />c. Add the NDESgMSA account and add the Read permission.<br />d. Repeat the steps a &ndash; c for the Exchange Enrollment Agent (Offline) certificate.<br />e. Restart IIS by typing <strong>iisreset</strong> on an elevated command prompt.</p>
<br />
<h2>Additional Comments</h2>
<p>Starting with Windows Server 2012 R2, NDES supports policy module integration which can provide additional security for the SCEP. This enhancement lets an organization or mobile device management solution address the issue described in CERT Vulnerability Note VU#971035 &ldquo;Simple Certificate Enrollment Protocol (SCEP) does not strongly authenticate certificate requests.&rdquo; See <a href="https://www.kb.cert.org/vuls/id/971035">https://www.kb.cert.org/vuls/id/971035</a>for more details on this vulnerability.</p>
<p>Find more details about the NDES Policy Module support at <a href="https://technet.microsoft.com/en-us/library/dn473016.aspx">https://technet.microsoft.com/en-us/library/dn473016.aspx</a></p>
<p></p>
<p class="CxSpFirst" style="list-style-type:disc;margin:0 0 .0001pt .5in;line-height:12pt;text-indent:-18pt;"><span style="color:#000000;"><span lang="EN-US" style="list-style-type:disc;line-height:12pt;"><span style="color:#000000;"><span style="font-family:Calibri;"><span style="text-decoration:underline;"><span style="font-size:11pt;"></span></span></span></span></span></span>&nbsp;</p>
<p class="CxSpLast" style="list-style-type:disc;margin:0 0 .0001pt .5in;line-height:12pt;text-indent:-18pt;"><span style="color:#000000;"><span lang="EN-US"></span></span>&nbsp;</p>
<p class="CxSpLast" style="list-style-type:disc;margin:0 0 .0001pt .5in;line-height:12pt;text-indent:-18pt;"><span style="color:#000000;"><span lang="EN-US"></span></span>&nbsp;</p>
</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Setting up TPM protected certificates using a Microsoft Certificate Authority - Part 3: Key Attestation</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-3-key-attestation</link>
      <pubDate>Mon, 08 Sep 2014 05:10:38 GMT</pubDate>
      <dc:creator><![CDATA[WesH [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/2014/09/08/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-3-key-attestation/</guid>
      <description><![CDATA[Hey Everyone, I am back with the last part of this 3 of this series on TPM protected...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Segoe UI Light;font-size:medium;">Hey Everyone, I am back with the last part of this 3 of this series on TPM protected certificates.&nbsp; The last topic for this series is on Key Attestation.&nbsp; Recently I have had a few people ask me about the Key Attestation tab in Windows Server 2012 R2.&nbsp; Another person informed me they tried to set it up, and it didn&rsquo;t work.&nbsp; That&rsquo;s not cool.&nbsp; I hadn&rsquo;t used the feature before so I decided to take a dive into it and maybe I could help y&rsquo;all out.&nbsp; Here is what I found.&nbsp; First, what is this for?&nbsp; Key Attestation is an assurance mechanism.&nbsp; It validates the private key in a certificate key pair are protected via a TPM.&nbsp; If you don&rsquo;t know what the big deal is about protecting keys via TPM please see part 1 and part 2 of this series.&nbsp; Depending on how the key is being protected, the CA can also insert Issuance Policy OID&rsquo;s into a certificate based on what attestation method was used.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">The 3 methods used for Key Attestation are:</span></p>
<p><strong><span style="font-size:medium;">User Credentials: (Low Assurance) Issuance Policy/Certificate Policy OID: 1.3.6.1.4.1.311.21.32</span></strong><span style="font-size:medium;"> &ndash; The user provides an EKPub to the enterprise CA.&nbsp; The enterprise CA performs no further validation.</span></p>
<p><strong><span style="font-size:medium;">Endorsement Certificate: (Medium Assurance) Issuance Policy/Certificate Policy OID 1.3.6.1.4.1.311.21.31</span></strong><span style="font-size:medium;"><span style="font-size:medium;">&nbsp;&ndash; </span></span><span style="font-size:medium;">The TPM has a manufacturer supplied certificate embedded.&nbsp; The Enterprise CA validates the EKCert chain.&nbsp; All CA&rsquo;s in the chain must be trusted.&nbsp; This method also means that ALL TPM&rsquo;s from the manufacturer&rsquo;s chain are trusted.</span></p>
<p><strong><span style="font-size:medium;">Endorsement Key: (High Assurance) Issuance Policy/Certificate Policy OID: 1.3.6.1.4.1.311.21.30</span></strong><span style="font-size:medium;"> &ndash; The Enterprise CA validates each EKPub provided against an administrator defined list of allowed EKPub.&nbsp; The list is contained in a directory that includes files named for each EKPub SHA-256 hash.</span></p>
<p><strong><span style="font-size:medium;">&nbsp;</span></strong></p>
<p><b>Assumptions</b></p>
<p>This article assumes the individual has a basic understanding of Microsoft PKI and its components.</p>
<p><strong><span style="font-size:medium;">&nbsp;</span></strong></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Microsoft Lab Configuration</span></h1>
<p><strong><span style="font-size:medium;">Requirements:</span></strong></p>
<ol>
<li><span style="font-family:Segoe UI Light;font-size:medium;">A domain controller running Windows Server 2003 or later</span></li>
<li><span style="font-family:Segoe UI Light;font-size:medium;">An enterprise certificate authority running Windows Server 2012 R2</span></li>
<li><span style="font-family:Segoe UI Light;font-size:medium;">A desktop or laptop with a enabled and configured TPM, running Windows 8.1</span></li>
<li><span style="font-family:Segoe UI Light;"><span style="font-size:medium;">You have completed the labs from <a href="/b/pki/archive/2014/06/05/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-1-microsoft-platform-crypto-provider.aspx"><span style="color:#0563c1;">part 1</span></a> of this series.&nbsp; (We will be leveraging certificate templates you created from part 1)</span></span></li>
</ol>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Configuring and Testing User Credential Attestation:</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">This option only requests the client send an EKPub to the Enterprise CA.&nbsp; There is no further validation other than the user&rsquo;s domain credentials (low assurance).</span></p>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Step 1: Certificate Template Configuration</span></h2>
<p><span style="font-family:Segoe UI Light;font-size:medium;">In this section we will modify the template we configured in </span><a href="/b/pki/archive/2014/06/05/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-1-microsoft-platform-crypto-provider.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">Part 1</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> of this 3 part series to perform key attestation and insert issuance policies.</span></p>
<ol>
<li>
<p>Open the Certificate Template Console (certtmpl.msc)</p>
</li>
<li>
<p>Modify the Workstation Authentication Template you created in Part 1 of this series</p>
</li>
<li>
<p>Verify the following:</p>
<ul>
<li>
<p>Compatibility Tab</p>
<ul>
<li>
<p>Certificate Authority: Windows Server 2012 R2</p>
</li>
<li>
<p>Certificate Recipient: Windows 8.1/Windows Server 2012 R2</p>
</li>
</ul>
</li>
<li>
<p>Cryptography Tab</p>
<ul>
<li>
<p>Provider Category: Key Storage Provider</p>
</li>
<li>
<p>Requests must be from one of the following providers: Check only Microsoft Platform Crypto Provider</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>New Settings:</p>
<ul>
<li>
<p>Request Handling</p>
<ul>
<li>
<p>Renew with the same key: cleared/unchecked</p>
</li>
</ul>
</li>
<li>
<p>Key Attestation Tab</p>
<ul>
<li>
<p>Key Attestation: Required</p>
</li>
</ul>
</li>
<li>
<p>Attestation Type</p>
<ul>
<li>
<p>User Credentials</p>
</li>
</ul>
</li>
<li>
<p>Issuance Policies for key attested certificates</p>
<ul>
<li>
<p>Include issuance polices for enforced attestation types</p>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<h2><span style="font-size:large;"><span style="color:#2e74b5;"><span style="font-family:Calibri Light;">Result: Certificates requested from the template should resemble the following<br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/7737.WS-UserAttest.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/7737.WS_2D00_UserAttest.JPG"><img width="454" height="569" style="width:324px;height:376px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/7737.WS-UserAttest.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/7737.WS_2D00_UserAttest.JPG" border="0" /></a><br /> </span></span></span></h2>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Configuring and Testing Endorsement Certificate Attestation:</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">This option makes use of the certificate some manufacturers burn into their TPM&rsquo;s.&nbsp; Notice I said some, not all manufacturers are doing this.&nbsp; The next fun thing about this one is, depending on the manufacturer you have to go chase them down to get copies of the public keys for all the CA&rsquo;s in their chain and import those certificates into special containers on your CA.&nbsp; The good thing about this is, after you do it all of the TPM enabled devices that chain to those certificates are trusted for attestation.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Let&rsquo;s get started on setting this up.</span></p>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Step 1: Who made my TPM and do I have an EKCert?</span></h2>
<p><br /><span style="font-family:Segoe UI Light;font-size:medium;"> From the Windows 8.1 device that has a TPM.</span></p>
<ol>
<li>Open PowerShell as an Admin.</li>
<li>Run the following cmdlet: Get-TPMEndorsementKeyInfoyou should get an output similar to that seen below.&nbsp; Sorry I had to block out a bunch of stuff but you should get the point.&nbsp; From here we can see the certificate information for the EKCert (if you have one)<br /><br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/4314.TPM.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/4314.TPM.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/4314.TPM.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/4314.TPM.jpg" border="0" /></a><br /><br /></li>
<li>Now the fun part.&nbsp; Visit the manufacturer&rsquo;s site and pray they publish these certificates there and you can find them.&nbsp; If not, you will have contact them and ask nicely.&nbsp; Mine was the latter.</li>
</ol>
<p></p>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Step 2: Importing the Manufacturer Certificates to be used with Attestation<br /> <br /> </span></h2>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Now that the manufacturer has given us the public keys we can go ahead and import them into special containers in the local machine store so they can be used for attestation purposes.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Some of this is from the TechNet Article: </span><a href="https://technet.microsoft.com/en-us/library/dn581921.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">TPM Key Attestation</span></a><span style="font-family:Segoe UI Light;font-size:medium;">.&nbsp; So a big thanks to the folks that wrote this.<br /> <br /> </span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">The following commands will create the EKCert containers for the manufacturer&rsquo;s certificates.</span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="779" valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;"># Create EKCert containers and import TPM manufacturer certificates</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;">cd cert:<br /> cd .\\LocalMachine</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;">new-item EKROOT</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;">new-item EKCA</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
</tbody>
</table>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">These commands will create the following certificate containers in the local machine store:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/1172.Certs.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/1172.Certs.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/1172.Certs.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/1172.Certs.jpg" border="0" /></a></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">After you create the containers you will need to import the manufacturer&rsquo;s certificates to the proper containers.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Now we can configure your certificate template for Endorsement Certificate attestation.</span></p>
<h2><strong><span style="color:#2e74b5;font-size:large;">Step 3: Certificate Template Configuration<br /> <br /> </span></strong></h2>
<ol>
<li>
<p>Open the Certificate Template Console (certtmpl.msc)</p>
</li>
<li>
<p>Modify the Workstation Authentication Template you created in Part 1 of this series</p>
</li>
<li>
<p>Verify the following:</p>
<ul>
<li>
<p>Compatibility Tab</p>
<ul>
<li>
<p>Certificate Authority: Windows Server 2012 R2</p>
</li>
<li>
<p>Certificate Recipient: Windows 8.1/Windows Server 2012 R2</p>
</li>
</ul>
</li>
<li>
<p>Request Handling</p>
<ul>
<li>
<p>Renew with the same key: cleared/unchecked</p>
</li>
</ul>
</li>
<li>
<p>Cryptography Tab</p>
<ul>
<li>
<p>Provider Category: Key Storage Provider</p>
</li>
<li>
<p>Requests must be from one of the following providers: Check only Microsoft Platform Crypto Provider</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>New Settings:</p>
<ul>
<li>
<p>Key Attestation Tab</p>
<ul>
<li>
<p>Key Attestation: Required</p>
</li>
</ul>
</li>
<li>
<p>Attestation Type</p>
<ul>
<li>
<p>Endorsement Certificate</p>
</li>
</ul>
</li>
<li>
<p>Issuance Policies for key attested certificates</p>
<ul>
<li>
<p>Include issuance polices for enforced attestation types</p>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Result: Certificates requested from the template should resemble the following<br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/3566.EKCert.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/3566.EKCert.JPG"><img width="455" height="569" style="width:324px;height:425px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/3566.EKCert.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/3566.EKCert.JPG" border="0" /></a><br /></span></h2>
<p></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Configuring and Testing Endorsement Key Attestation:</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">This process takes the most administrative effort and thus provides the highest level of assurance.&nbsp; With this method our goal is to populate a folder, either locally or network, with empty files.&nbsp; The names of the files are the sha256 hash of the TPM endorsement keys for&nbsp;the devices&nbsp;in your organization you want to perform attestation.</span></p>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Step 1: Identifying the TPM Hash</span></h2>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;"><span style="font-family:Segoe UI Light;">For this we are going to use a sample PowerShell script that I made using the one in the Technet article for a reference (with a few tweaks of course</span>J<span style="font-family:Segoe UI Light;">).</span></span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="779" valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;">#This line provides us with the TPM Public Endorsement Key info and also provides the hash in sha-256 form</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;">$tpmhash=Get-TpmEndorsementKeyInfo -HashAlgorithm sha256</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;"># We only want the hash value so here we pull just that value</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;">$tpmhashfile=$tpmhash.PublicKeyHash</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;">#Lastly we create an empty file with no extension whose name is the hash of the TPM EK public key.&nbsp; Mine writes to a file share where multiple CA&rsquo;s can read it.&nbsp; Notice I said <b>READ</b>.&nbsp; So the NTFS and file share permissions will need to be configured to allow the machine accounts of the CA&rsquo;s to <b>READ.</b></span></span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Segoe UI Light;font-size:medium;">New-Item -path \\Fab-LAB-DC01\TPMHash\$tpmhashfile -ItemType file</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
</tbody>
</table>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Step 2: Adding the EKPub Hash Folder to the Issuing CA</span></h2>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Now that we have an EKPub hash file in the folder we need to have the CA recognize this folder as a repository. Remember, the CA machine account needs to have read permissions on this folder so if it&rsquo;s local that&rsquo;s no big deal.&nbsp; But since mine is on a network share I needed to configure this on the NTFS and share permissions.</span></p>
<ol>
<li>
<p>We are going to run this command to add the folder as an Endorsement Key List Directory, there is currently no method to do this through the GUI<br /> <br /> certutil.exe -setreg CA\EndorsementKeyListDirectories +\\con-lab-dc01\EKPub$<br /> <br /> Alternatively you can run certutil.exe -setreg CA\EndorsementKeyListDirectories -\\con-lab-dc01\EKPub$ to remove a directory</p>
</li>
<li>
<p>Now we need to restart the CA services for the change to take effect.&nbsp; You can choose your favorite method I am going to use the command line.<br /> <br /> net stop certsvc &amp; net start certsvc</p>
</li>
</ol>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Step 3: Certificate Template Configuration</span></h2>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<ol>
<li>
<p>Open the Certificate Template Console (certtmpl.msc)</p>
</li>
<li>
<p>Modify the Workstation Authentication Template you created in Part 1 of this series</p>
</li>
<li>
<p>Verify the following:</p>
<ul>
<li>
<p>Compatibility Tab</p>
<ul>
<li>
<p>Certificate Authority: Windows Server 2012 R2</p>
</li>
<li>
<p>Certificate Recipient: Windows 8.1/Windows Server 2012 R2</p>
</li>
</ul>
</li>
<li>
<p>Cryptography Tab</p>
<ul>
<li>
<p>Provider Category: Key Storage Provider</p>
</li>
<li>
<p>Requests must be from one of the following providers: Check only Microsoft Platform Crypto Provider</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>New Settings:</p>
<ul>
<li>
<p>Request Handling</p>
<ul>
<li>
<p>Renew with the same key: cleared/unchecked</p>
</li>
</ul>
</li>
<li>
<p>Key Attestation Tab</p>
<ul>
<li>
<p>Key Attestation: Required</p>
</li>
</ul>
</li>
<li>
<p>Attestation Type</p>
<ul>
<li>
<p>Endorsement Key</p>
</li>
</ul>
</li>
<li>
<p>Issuance Policies for key attested certificates</p>
<ul>
<li>
<p>Include issuance polices for enforced attestation types</p>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<h2><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Result: Certificates requested from the template should resemble the following<br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/7230.EKPub.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/7230.EKPub.JPG"><img width="454" height="570" style="width:323px;height:460px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/7230.EKPub.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/7230.EKPub.JPG" border="0" /></a><br /></span></h2>
<p></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Technical Resources:</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Processing Rules for Key Attestation Based on a Trusted Endorsement Key<br /> </span><a href="https://msdn.microsoft.com/en-us/library/dn410471.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">https://msdn.microsoft.com/en-us/library/dn410471.aspx</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> </span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Get-TPMEndorsementKeyInfo<br /> </span><a href="https://technet.microsoft.com/en-us/library/dn449037.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">https://technet.microsoft.com/en-us/library/dn449037.aspx</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> </span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">TPM Key Attestation<br /> </span><a href="https://technet.microsoft.com/en-us/library/dn581921.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">https://technet.microsoft.com/en-us/library/dn581921.aspx</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> </span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">TPM System Fundamentals Testing Prerequisites<br /> </span><a href="https://msdn.microsoft.com/en-us/library/windows/hardware/dn247549.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">https://msdn.microsoft.com/en-us/library/windows/hardware/dn247549.aspx</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> </span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">TPM Attestation Test<br /> </span><a href="https://msdn.microsoft.com/en-us/library/windows/hardware/hh998296.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">https://msdn.microsoft.com/en-us/library/windows/hardware/hh998296.aspx</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> </span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Links to part 1 and 2 of this 3 part series are below:</span><a href="/b/pki/archive/2014/06/05/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-1-microsoft-platform-crypto-provider.aspx"></a></p>
<p><a href="/b/pki/archive/2014/06/05/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-1-microsoft-platform-crypto-provider.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">Part 1</span></a><span style="font-family:Segoe UI Light;font-size:medium;">: Microsoft Platform Crypto Provider<br /> </span><a href="/b/pki/archive/2014/07/15/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-2-virtual-smart-cards.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">Part 2</span></a><span style="font-family:Segoe UI Light;font-size:medium;">: Virtual Smart Cards</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Setting up TPM protected certificates using a Microsoft Certificate Authority - Part 2: Virtual Smart Cards</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-2-virtual-smart-cards</link>
      <pubDate>Tue, 15 Jul 2014 06:54:58 GMT</pubDate>
      <dc:creator><![CDATA[WesH [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/2014/07/15/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-2-virtual-smart-cards/</guid>
      <description><![CDATA[Hey Everyone, I am back with part 2 of this 3 part series on TPM protected certificates.&nbsp; The...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Segoe UI Light;font-size:medium;">Hey Everyone, I am back with part 2 of this 3 part series on TPM protected certificates.&nbsp; The topics covered in this are related to Virtual Smart Cards, their benefits, and lastly their limitations.&nbsp; I will also cover how to create a Virtual Smart Cards.&nbsp; Management of certificates contained on the virtual smart card are similar to those of a traditional smart card are not covered in this article.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Virtual Smart Cards function very similarly to conventional Smart Cards.&nbsp; The difference is the private key is protected by the TPM and not the smart card media.&nbsp; The Virtual smart card emulates a smart card and reader so the device presents itself to operating system and applications as a traditional smart card.&nbsp; As for the storage of the private key, this is handled similarly to that of a key protected by the Microsoft Platform Crypto Provider.&nbsp; The private key is encrypted and stored on the file system.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Virtual Smart Cards offer the following similarities with traditional Smart Cards.</span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;"><b>Non-Exportability:</b>&nbsp; Since the private key is encrypted by the TPM is cannot be used on any other device.</span></span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;"><b>Anti-Hammering:</b>&nbsp; The TPM will lockout if a pin is entered incorrectly too many times.&nbsp; This behavior is manufacturer specific.</span></span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;"><b>Key Isolation: </b>Private<b> </b>keys protected by the TPM are never exposed to the operating system or malware.&nbsp; All private key operations are handled within the TPM.</span></span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">For more information see the following related article:</span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;">TPM Fundamentals - <a href="https://technet.microsoft.com/en-us/library/jj889441.aspx"><span style="color:#0563c1;">https://technet.microsoft.com/en-us/library/jj889441.aspx</span></a></span></span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Lab Configuration</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Assumptions</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">This article assumes the individual has a basic understanding of Microsoft PKI and its components.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Prerequisites</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&bull;A domain controller running Windows Server 2003 or later*<br /> &bull;An enterprise certificate authority running Windows Server 2012 R2<br /> &bull;A desktop or laptop with a configured TPM, running Windows 8.1</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">*In order to process Smart Card logons.&nbsp; Domain Controllers must obtain a certificate based on the Domain Controller Authentication certificate template.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Virtual Smart Card Creation</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;">In this section we will create a virtual smart card on the Windows 8.1 laptop or laptop.&nbsp; Creating a virtual smartcard is not a difficult task however there are a few ways of doing it.&nbsp; The easiest method is using the command line utility <b>TPMVSCMGR.EXE.</b></span></span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">To create a virtual smartcard from the command line use the following command.&nbsp; Note: You must have admin rights on the host and the command line must be (run as admin).</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Tpmvscmgr.exe create /name &ldquo;TestVirtualSC&rdquo; /pin prompt /adminkey default /generate</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">You should be prompted to enter a pin, enter a pin of your choosing then re-enter it to confirm.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Before we go further let&rsquo;s take note of what this will actually do.</span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;"><b>Create: </b>This is pretty self-explanatory.&nbsp; We are creating a virtual smartcard here.</span></span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;"><b>/name: </b>This is the name that will be given to the device you will see in Device Manager (see below)</span></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/DeviceMgr.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/DeviceMgr.png"><img width="478" height="347" style="width:402px;height:281px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/DeviceMgr.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/DeviceMgr.png" border="0" /></a></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;"><b>/pin: </b>This is the pin that unlocks the virtual smart card.&nbsp; Similar to physical smartcard but protected by the TPM anti-hammering feature.</span></span></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;"><b>/adminkey: </b>the admin key that you are assigning to the virtual smart card.&nbsp; Admin keys are used for management purposes.</span></span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">After the virtual smartcard creation it can be treated just like a traditional smart card by using the &ldquo;Microsoft Base Smart Card Crypto Provider&rdquo; or &ldquo;Microsoft Smart Card Key Storage Provider&rdquo;.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Smart Card Logon Certificate Template</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">In this section we will create the certificate template to be used for smartcard logon.&nbsp; This template will be configured to leverage the &ldquo;Microsoft Smart Card Key Storage Provider&rdquo;.&nbsp; So unless a physical or Virtual Smart Card is present the user will not be able to enroll for this type of certificate.&nbsp; Before we get started I want to note a few things.</span></p>
<ol>
<li>
<p>Creating this template will require Enterprise Admin rights unless you have delegated access to the templates by using one of the steps defined in this article: <a href="https://technet.microsoft.com/en-us/library/cc725621(v=WS.10).aspx"><span style="color:#0563c1;">https://technet.microsoft.com/en-us/library/cc725621(v=WS.10).aspx</span></a></p>
</li>
<li>
<p>The template settings defined here <b>should not</b> be used in a production environment.&nbsp; Obtaining a certificate that can be used for smart card logon should not be easy.&nbsp; Processes should be put into place to ensure these types of certificates are procured in a secure manner (Issuance Policies), especially if they are to be used for non-repudiation.&nbsp; See the last section in this document &ldquo;Further Considerations&rdquo; for more info.</p>
</li>
</ol>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Now that this stuff is out of the way&hellip;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">From the Enterprise Certificate Authority.</span></p>
<ul>
<li>
<p>Open the Certificate Templates Console - certtmpl.msc,</p>
</li>
<li>
<p>Duplicate the Smartcard Logon certificate templates</p>
</li>
<li>
<p>On the Compatibility tab set the Certificate Authority to Windows Server 2012 and Certificate recipient to Windows 8.1/Windows Server 2012 R2<br /> <br /> *Note: Windows 8.1 and Windows Server 2012 R2 are only required for key attestation.&nbsp; We will reuse this template in part 3 for this purpose.&nbsp; If your CA and client are Windows 8 and Windows Server 2012 you can still complete this exercise.&nbsp; If this is the case simply choose Windows 8/Windows Server 2012 in the compatibility settings.</p>
</li>
<li><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span>Click on the General Tab and give the template a name.</li>
<li>
<p>Click on the Cryptography tab</p>
<ul>
<li>
<p>Change the Provider Category to Key Storage Provider</p>
</li>
<li>
<p>Select Requests must use one of the following providers:</p>
<ul>
<li>
<p>Check the box for Microsoft Smart Card Key Storage Provider.</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>Click Apply and OK.</p>
</li>
<li>
<p>Open the Certificate Authority MMC &ndash; certsrv.msc</p>
</li>
<li>
<p>Right click on the Certificate Templates container and select new, certificate template to issue.</p>
</li>
<li>
<p>Click on the certificate template you created and click OK.</p>
</li>
</ul>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Enrolling for a Smart Card Logon Certificate</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">After your Virtual Smart Card and Smart Card Logon Template has been created now we are ready to enroll for a certificate.</span></p>
<ul>
<li>
<p>Open CertMgr.msc</p>
</li>
<li>
<p>Right click on the Personal container -&gt; all tasks -&gt; Request New Certificate</p>
</li>
<li>
<p>Certificate Enrollment Wizard</p>
<ul>
<li>
<p>On the &ldquo;Before You Begin&rdquo; page click Next</p>
</li>
<li>
<p>On the Select &ldquo;Certificate Enrollment Policy&rdquo; page Active Directory Enrollment Policy is the default.&nbsp; Click Next</p>
</li>
<li>
<p>Choose the certificate template you created by filling the checkbox to its left and click Enroll</p>
</li>
<li>
<p>Click Finish</p>
</li>
</ul>
</li>
</ul>
<p><span style="font-family:Segoe UI Light;font-size:medium;">That&rsquo;s it.&nbsp; We now have a Virtual Smart Card and a certificate for Smart Card Logon.&nbsp; We are ready to use it to log in.</span></p>
<p><span style="font-family:Times New Roman;font-size:medium;"> </span><br clear="all" /> <span style="font-family:Times New Roman;font-size:medium;"> </span></p>
<p><span style="font-family:Segoe UI Light;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Logging In/User Experience</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;Before I get started on the next section.&nbsp; Sorry for the low res pictures :)</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Now what we have everything we need to log in.&nbsp; What will your users see?&nbsp; Users will see the familiar interface but there will be a new link below: Sign-in options</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_001.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_001.jpg"><img width="481" height="337" style="width:200px;height:182px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_001.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_001.jpg" border="0" /></a></span></p>
<p></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Clicking on Sign-in options reveals the following.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_005.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_005.jpg"><img width="481" height="390" style="width:267px;height:192px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_005.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_005.jpg" border="0" /></a></span></p>
<p><span style="font-size:medium;"><span style="font-family:Times New Roman;"></span><span style="font-family:Segoe UI Light;">&nbsp;</span></span><span style="font-family:Segoe UI Light;font-size:medium;">The first is the icon that looks like a key, this is the username/password option.&nbsp; Do I need to explain this any further?&nbsp; I hope not.</span></p>
<p><span style="font-size:medium;"><span style="font-family:Times New Roman;"></span><span style="font-family:Segoe UI Light;">&nbsp;</span></span></p>
<p><span style="font-size:medium;"><span style="font-family:Segoe UI Light;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_004.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_004.jpg"><img width="479" height="409" style="width:263px;height:232px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_004.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_004.jpg" border="0" /></a><br /></span></span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">This is the one we are interested in.&nbsp; The icon that looks like an IC or chip.&nbsp; Clicking on this changes the box above to state &ldquo;Security Device&rdquo; and the place you would typically put your password says PIN now.&nbsp; Hmmm&hellip;&hellip; where did I see that PIN before, oh yeah when we created the Virtual Smart Card.&nbsp; I hope you remember what you set it to.&nbsp; Enter the PIN you used when you created the Virtual Smart Card.&nbsp; Viola!&nbsp; Smart Card Logon.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Changing Virtual Smart Card PIN</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">In this last section I will show you how to change a PIN for a Virtual Smart Card.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">While logged in using the Virtual Smart Card press Ctrl+Alt+Del and select the option to &ldquo;Change a password&rdquo;.&nbsp; Enter the old PIN, the new PIN then confirm.&nbsp; That&rsquo;s it. </span></p>
<p><span style="font-size:medium;"><span style="font-family:Times New Roman;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_008.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_008.jpg"><img width="480" height="482" style="width:276px;height:301px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_008.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_008.jpg" border="0" /></a><br clear="all" /></span><span style="font-family:Segoe UI Light;"> </span></span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Further Considerations</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><b><span style="font-family:Segoe UI Light;font-size:medium;">Issuance Policy/Enrollment Requirements</span></b></p>
<p><span style="font-family:Segoe UI Light;"><span style="font-size:medium;">It is important to give consideration as to why you are implementing Virtual Smart Cards.&nbsp; Most organizations choose to issue Smart Cards or Virtual Smart Cards to strengthen security.&nbsp; Smart card logon achieves this by requiring the user to have their physical smart card and the associated PIN in order to logon.&nbsp; Virtual Smart Cards are very similar.&nbsp; The user must have the TPM enabled device, and know the PIN.&nbsp; </span></span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Additional considerations should be given for enrollment for a virtual smart card.&nbsp; Much as that of traditional Smart Cards a username and password should not be the only factor to obtain one.&nbsp; Your organization may determine that someone needs to enroll in person and/or provide positive ID, fill out forms or other requirements.</span></p>
<p><b><span style="font-family:Segoe UI Light;font-size:medium;">Shared Devices/Computers</span></b></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">It is possible to have more than one Virtual Smart Card on a device.&nbsp; If you do have a requirement to have more than one the interface presents similar to what you see here:</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">User 1: Bob</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_009.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_009.jpg"><img width="480" height="450" style="width:249px;height:233px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_009.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_009.jpg" border="0" /></a></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">User 2: Wes</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_010.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_010.jpg"><img width="479" height="442" style="width:260px;height:281px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/WP_20140708_010.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/WP_5F00_20140708_5F00_010.jpg" border="0" /></a></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">I hope you all enjoyed this post on Virtual Smart Cards and I hope it assists you in your evaluation of this security related feature.&nbsp; Again, this is part 2 of a 3 part series regarding protecting certificate private keys using Trusted Platform Modules.&nbsp; I&rsquo;ll be back really soon with part 3, Key Attestation in Windows Server 2012 R2 and Windows 8.1.</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;font-family:Segoe UI Light;">Technical Resources:</span></h1>
<p><span style="font-family:Segoe UI Light;font-size:medium;">Understanding and Evaluating Virtual Smart Cards - </span><a href="https://technet.microsoft.com/en-us/library/dn578507.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">https://technet.microsoft.com/en-us/library/dn578507.aspx</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> </span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;">TPM Platform Crypto-Provider Toolkit - </span><a href="https://research.microsoft.com/en-us/downloads/74c45746-24ad-4cb7-ba4b-0c6df2f92d5d/default.aspx"><span style="color:#0563c1;font-family:Segoe UI Light;font-size:medium;">https://research.microsoft.com/en-us/downloads/74c45746-24ad-4cb7-ba4b-0c6df2f92d5d/default.aspx</span></a><span style="font-family:Segoe UI Light;font-size:medium;"> </span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Setting up TPM protected certificates using a Microsoft Certificate Authority - Part 1: Microsoft Platform Crypto Provider</title>
      <link>https://docs.microsoft.com/archive/blogs/pki/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-1-microsoft-platform-crypto-provider</link>
      <pubDate>Thu, 05 Jun 2014 13:28:00 GMT</pubDate>
      <dc:creator><![CDATA[WesH [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/pki/2014/06/05/setting-up-tpm-protected-certificates-using-a-microsoft-certificate-authority-part-1-microsoft-platform-crypto-provider/</guid>
      <description><![CDATA[Hey Everyone, This is Wes Hammond with Premier Field Engineering back to share what I have learned...]]></description>
      <content:encoded><![CDATA[<p align="LEFT" dir="LTR">Hey Everyone, This is Wes Hammond with Premier Field Engineering back to share what I have learned about protecting digital certificates using the Trusted Platform module in Windows desktops, laptops and servers. This is part one of a three part series that will include the Microsoft Platform Crypto Provider, Virtual Smart Cards, and lastly the Key Attestation feature included in Windows Server 2012 R2 and Windows 8.1. So getting on to part 1: Microsoft Platform Crypto Provider. Let&#39;s start off with, why should I use this? The answer is, using a Trusted Platform Module to protect private keys provides higher security assurances. It accomplishes this with the following:</p>
<p><b>&nbsp;</b></p>
<p align="LEFT" dir="LTR"><b>Non-Exportability:</b> The certificate template will only allow the Microsoft Platform Crypto Provider to be selected if the &quot;Allow private key to be exported&quot; option is not checked in the request handling tab. Thus, private keys protected by the TPM are not exportable.</p>
<p><b>Anti-Hammering:</b> When used in conjunction with passwords or PINs a TPM will lock out if a pin or password is entered incorrectly too many times.</p>
<p><b>Key Isolation: </b>Private<b> </b>keys protected by the TPM are never exposed to the operating system or malware. All private key operations are handled within the TPM.</p>
<p>For more information see the following related article:</p>
<p><span style="font-size:small;"><span style="font-family:Segoe UI Light;"><span style="font-family:Segoe UI Light;">TPM Fundamentals - </span></span><a href="https://technet.microsoft.com/en-us/library/jj889441.aspx"><span style="font-family:Segoe UI Light;"><span style="font-family:Segoe UI Light;">https://technet.microsoft.com/en-us/library/jj889441.aspx</span></span></a><span style="font-family:Segoe UI Light;"><span style="font-family:Segoe UI Light;"> </span></span></span></p>
<p></p>
<p><strong>Assumptions</strong></p>
<p>This article assumes the individual has a basic understanding of Microsoft PKI and its components.</p>
<p align="LEFT" dir="LTR"><span style="font-size:medium;">&nbsp;</span></p>
<p align="LEFT" dir="LTR"><span style="font-size:medium;">Microsoft CA configuration:</span></p>
<p align="LEFT" dir="LTR"><strong>Requirements:</strong></p>
<p>*Note: The Microsoft Platform Crypto Provider only requires Windows 8 and Windows Server 2012. However Windows 8.1 and Windows Server 2012 R2 are required for key attestation which will be covered in part 3 of this series. So for the sake of this exercise I will be leveraging Windows 8.1 and Windows Server 2012 R2 for the client and CA server operating systems</p>
<ul>
<li>A domain controller running Windows Server 2003 or later</li>
<li>An enterprise certificate authority running Windows Server 2012 R2</li>
<li>A desktop or laptop with a TPM, running Windows 8.1</li>
</ul>
<p></p>
<p align="LEFT" dir="LTR"><span style="font-size:medium;">Certificate Template Configuration:</span></p>
<ul>
<li>Open the Certificate Templates Console - certtmpl.msc</li>
<li>Duplicate the certificate template of your choice. For this exercise we will use the Workstation Authentication template.</li>
<li>On the Compatibility tab set the Certificate Authority to Windows Server 2012 R2 and Certificate recipient to Windows 8.1/Windows Server 2012 R2. <br /> <br /> *Note: Windows 8.1 and Windows Server 2012 R2 are only required for key attestation. We will reuse this template in part 3 for this purpose. If your CA and client are Windows 8 and Windows Server 2012 you can still complete this exercise. If this is the case simply choose Windows 8/Windows Server 2012 in the compatibility settings.</li>
<li>Click on the General Tab and give the template a name.</li>
<li>Click on the Cryptography tab</li>
<li>Change the Provider Category to Key Storage Provider</li>
<li>Select Requests must use one of the following providers:</li>
<li>Check the box for Microsoft Platform Crypto Provider. *Note: If this provider is not listed check the request handling tab and make sure the&quot; Allow private key to be exported&quot; option is <span style="text-decoration:underline;">not checked.</span></li>
<li>This step is optional: Click on the Request Handling tab</li>
<li>Check the option to Renew with the same key *Note: This option ensures the renewed certificate maintains the same assurance levels as that of the original request.</li>
<li>Click Apply and OK.</li>
<li>Open the Certificate Authority MMC - cert</li>
<li>Right click on the Certificate Templates container and select new, certificate template to issue.</li>
<li>Click on the certificate template you created and click OK.</li>
</ul>
<p></p>
<p align="LEFT" dir="LTR"><span style="font-size:medium;">Issue End Entity Certificate</span></p>
<p></p>
<p align="LEFT" dir="LTR">These next steps require a domain account with local administrator rights.</p>
<ul>
<li>Log onto the desktop or laptop Windows 8.1</li>
<li>Open the local computer certificate store - certlm.msc</li>
<li>Right click the Personal container and select All Tasks, Request New Certificate</li>
<li>Click Next on the Before You Begin screen</li>
<li>Click Next on the Select Certificate Enrollment Policy screen</li>
<li>Check the box for your new certificate template and click Enroll</li>
<li>Select Finish</li>
</ul>
<p align="LEFT" dir="LTR">To verify the certificate use the following command</p>
<p align="LEFT" dir="LTR">Certutil -csp &quot;Microsoft Platform Crypto Provider&quot; -key</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/Cmd-TPM.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/Cmd_2D00_TPM.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/53/86/Cmd-TPM.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-53-86/Cmd_2D00_TPM.png" border="0" /></a></p>
<p align="LEFT" dir="LTR"></p>
<p align="LEFT" dir="LTR"><span style="font-size:medium;">Related Links</span></p>
<p align="LEFT" dir="LTR"><span style="font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Segoe UI Light;font-size:medium;"><span style="font-family:Segoe UI Light;font-size:medium;"><b>TPM Platform Crypto-Provider Toolkit</b><br /> </span></span><a href="https://research.microsoft.com/en-us/downloads/74c45746-24ad-4cb7-ba4b-0c6df2f92d5d/default.aspx"><span style="font-family:Segoe UI Light;font-size:medium;"><span style="font-family:Segoe UI Light;font-size:medium;">https://research.microsoft.com/en-us/downloads/74c45746-24ad-4cb7-ba4b-0c6df2f92d5d/default.aspx</span></span></a></p>
<p></p>
<p></p>]]></content:encoded>
    </item>
  </channel>
</rss>