{"id":559,"date":"2014-11-21T23:26:00","date_gmt":"2014-11-22T04:26:00","guid":{"rendered":"http:\/\/adsecurity.org\/?p=559"},"modified":"2016-02-19T15:40:26","modified_gmt":"2016-02-19T20:40:26","slug":"microsoft-kb2871997-back-porting-windows-8-1win2012r2-enhanced-security-pass-the-hash-mitigation-to-windows-7-windows-8-windows-2008r2","status":"publish","type":"post","link":"https:\/\/adsecurity.org\/?p=559","title":{"rendered":"Microsoft KB2871997: Back-Porting Windows 8.1\/Win2012R2 Enhanced Security &#038; Pass The Hash Mitigation to Windows 7, Windows 8, &#038; Windows 2008R2"},"content":{"rendered":"<p>In June 2014, Microsoft released KB2871997 which takes many of the enhanced security protection mechanisms built into Windows 8.1 &amp; Windows Server 2012 R2 and &#8220;back-ports&#8221; them to Windows 7, Windows 8, Windows Server 2008R2, and Windows Server 2012.<\/p>\n<p>The enhanced security features reduce the credential data stored in memory and supports modern authentication (Kerberos AES). There are two primary logon types, interactive and network.<\/p>\n<p>An <strong>Interactive<\/strong> <strong>logon<\/strong> occurs when a user enters their logon credentials at the logon prompt, typically when sitting in front of a computer (or when connecting to Terminal Services or Remote Desktop Protocol, RDP, services). This logon type results in the user&#8217;s credential being stored in memory, often in various forms: Kerberos tickets, NTLM hash, LM Hash (if the password is less than 15 characters long), and even the clear-text password is stored. Mimikatz is a tool that can extract credentials in LSASS protected memory as well as the local Windows Security Accounts Manager (SAM). Read the <a href=\"https:\/\/adsecurity.org\/?page_id=1821\">ADSecurity.org Unofficial Guide to Mimikatz &amp; Command Reference<\/a> for more information on Mimikatz capability, usage, detection, and mitigation.<\/p>\n<p>The second type is a <strong>Network<\/strong> <strong>logon<\/strong> where the user&#8217;s credentials are transparently passed to the service on the destination system in order to gain access; note that the user does not have to explicitly enter credentials, they are &#8220;passed&#8221; to the target service and verified (typically using Kerberos or NTLM). With this logon type, the user&#8217;s credentials are not sent to the system hosting the service; therefore, the credentials are not stored on the destination system. This means any service receiving network logons leverages &#8220;pass the hash&#8221; for single sign on (SSO).<\/p>\n<p><em>Note: This post uses WDigest and Digest authentication interchangeably. Also, this patch doesn&#8217;t stop Pass-the-Hash, it does help harden Windows against standard attack methods such as clear-text password dumping, RDP credential theft, and lateral movement using local Administrator accounts.<br \/>\n<\/em><\/p>\n<p>Update: KB2871997 includes the client components of Restricted Admin Mode Remote Desktop Client (mstsc \/RestrictedAdmin). There was a patch released at the end of 2014 that includes the server components of Restricted Admin Mode for earlier versions of Windows.<\/p>\n<p>These protections include:<br \/>\n<!--more--><\/p>\n<ul>\n<li><strong>&#8220;Protected Users&#8221; Group Support<\/strong> (forces Kerberos authentication enforcing AES encryption)\n<ul>\n<li>The Protected Users group is created when the Domain Functional Level is set to Windows Server 2012 R2.<\/li>\n<li>Accounts in the Protected Users group may only authenticate using the Kerberos protocol, denying NTLM, Digest, and CredSSP.<\/li>\n<li>Kerberos refuses DES and RC4 encrpytion types for pre-authentication &#8211; the domain must be configured to support AES or higher.<\/li>\n<li>A Protected User&#8217;s account cannot be delegated with Kerberos constrained or unconstrained delegation.<\/li>\n<li>Protected Users work well with &#8220;<a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/dn486813.aspx\">Authentication Policies and Silos<\/a>&#8220;.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Restricted Admin RDP Mode Remote Desktop <em>Client <\/em>support\u00a0(mstsc \/RestrictedAdmin)<br \/>\n<\/strong><\/p>\n<ul>\n<li>Restricted Admin RDP mode is enhanced security to protect administrator credentials &#8211; this mode is not available for users (&#8220;Remote Desktop Users&#8221;).<\/li>\n<li>As noted above before this update, RDP logon was an interactive logon, where only after the user provided the user name and password did he\/she gain access. Logging on to a RDP host in this manner places the user credentials in memory on the RDP host where they may be stolen if the host is compromised.<\/li>\n<li>This update enables RDP to support network logon where the user&#8217;s existing logon token may be passed for authentication for RDP access. Using this logon type ensures that the user&#8217;s credentials do not exist on the RDP server.<\/li>\n<li>This effectively provides the option to send credentials to the system you are connecting to via RDP (credentials are stored in memory on RDP host) or a &#8220;token&#8221; is sent to the RDP host keeping the credentials off the RDP host.<\/li>\n<li>Note: Restricted Admin connections impersonate the computer account for remote connections, so the connected admin may only access shares to which the computer has access.<\/li>\n<li>Microsoft recommends Restricted Admin be leveraged in scenarios where help desk users RDP to a workstation to resolve an issue, ensuring the elevated credentials of the help desk are not placed on the workstation (this requires the workstation to be Windows 8.1 or higher).<\/li>\n<li>This update does not back-port Restricted Admin RDP <strong>server<\/strong> mode to operating systems prior to Windows 8.1 and Windows Server 2012 R2.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Pass The Hash Enhanced Protection<\/strong>\n<ul>\n<li><strong>Removal of Credentials at Logoff<\/strong>\n<ul>\n<li>Windows caches user credentials (clear-text password, NTLM password hash, Kerberos TGT\/Session key) in memory (the LSASS process) when the user logs on. At logoff, these credentials should be cleared from memory, but this didn&#8217;t always occur. This update ensures credentials are cleared after log-off.<\/li>\n<\/ul>\n<\/li>\n<li><strong>New well-known SIDs<\/strong>\n<ul>\n<li>LOCAL_ACCOUNT (S-1-5-113) &#8211; any local account<\/li>\n<li>LOCAL_ACCOUNT_AND_MEMBER_OF_ADMINISTRATORS_GROUP (S-1-5-114) &#8211; any local account that is a member of the administrators group.<\/li>\n<li>Configuring the new well-known SIDs in a Group Policy with the settings \u201cDeny access to this computer from the network\u201d and \u201cDeny log on through Remote Desktop Services\u201d prevents local accounts from connecting over the network.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Clear-text credentials removed from LSASS<\/strong>\n<ul>\n<li>Disabled by default for compatibility reasons. Clear-text passwords are stored in memory (LSASS) to primarily support WDigest authentication.<\/li>\n<li><a href=\"http:\/\/support.microsoft.com\/kb\/2871997\">Enable this feature to prevent clear-text credentials from being stored in memory (LSASS). <\/a><\/li>\n<li>Enable this feature by setting the Registry key \u201cUseLogonCredential\u201d to &#8220;0&#8221; (dword) located in:<br \/>\nHKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\WDigest &#8220;UseLogonCredential&#8221;<br \/>\nOn Windows 8.1\/Windows 2012 R2, this value is set to 0 (Digest disabled). The patch sets the value to 1 on earlier versions of Windows for backwards compatibility (Digest enabled).<br \/>\n<a href=\"https:\/\/adsecurity.org\/wp-content\/uploads\/2015\/09\/WDIGEST-RegistryKey-UseLogonCredential-1.jpg\" rel=\"attachment wp-att-2344\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2344\" src=\"https:\/\/adsecurity.org\/wp-content\/uploads\/2015\/09\/WDIGEST-RegistryKey-UseLogonCredential-1.jpg\" alt=\"WDIGEST-RegistryKey-UseLogonCredential-1\" width=\"373\" height=\"182\" srcset=\"https:\/\/adsecurity.org\/wp-content\/uploads\/2015\/09\/WDIGEST-RegistryKey-UseLogonCredential-1.jpg 959w, https:\/\/adsecurity.org\/wp-content\/uploads\/2015\/09\/WDIGEST-RegistryKey-UseLogonCredential-1-300x147.jpg 300w, https:\/\/adsecurity.org\/wp-content\/uploads\/2015\/09\/WDIGEST-RegistryKey-UseLogonCredential-1-768x376.jpg 768w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/a><\/li>\n<li>The NT Hash and Kerberos keys are still stored in memory (LSASS).<\/li>\n<li>Check event logs on the Domain Controllers (Event ID 4776) and on all servers (Event ID 4624) to determine if WDigest is still in use. Look for &#8220;Authentication Package: WDigest&#8221;.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>References:<\/strong><\/span><\/p>\n<ul>\n<li><a href=\"http:\/\/blogs.technet.com\/b\/srd\/archive\/2014\/06\/05\/an-overview-of-kb2871997.aspx\">An overview of KB2871997<\/a> (Joe Bialok&#8217;s post to the Microsoft Security Research and Defense Blog)<\/li>\n<li><a href=\"http:\/\/support.microsoft.com\/kb\/2871997\">Microsoft Security Advisory: Update to improve credentials protection and management: May 13, 2014<\/a><\/li>\n<li><a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=42722\">Security Update for Windows 7 for x64-based Systems (KB2871997) &#8211; disables clear-text passwords in LSASS for WDigest support <\/a><\/li>\n<li><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/cc980032.aspx\">2.4.2.4 Well-Known SID Structures<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In June 2014, Microsoft released KB2871997 which takes many of the enhanced security protection mechanisms built into Windows 8.1 &amp; Windows Server 2012 R2 and &#8220;back-ports&#8221; them to Windows 7, Windows 8, Windows Server 2008R2, and Windows Server 2012. The enhanced security features reduce the credential data stored in memory and supports modern authentication (Kerberos &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/adsecurity.org\/?p=559\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,2],"tags":[312,313,310,305,81,311,353,71,616,309,44,306,308,733,117,219,307,46,54],"class_list":["post-559","post","type-post","status-publish","format-standard","hentry","category-microsoft-security","category-technical-reference","tag-clear-textcredentials","tag-digestauthentication","tag-interactivelogon","tag-kb2871997","tag-kerberos","tag-local_account","tag-local_account_and_member_of_administrators_group","tag-lsass","tag-mstsc-restrictedadmin","tag-networklogon","tag-passthehash","tag-protectedusers","tag-restrictedadminrdp","tag-uselogoncredential","tag-windows7","tag-windows8","tag-windows8-1","tag-windowsserver2008r2","tag-windowsserver2012r2","item-wrap"],"_links":{"self":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=559"}],"version-history":[{"count":23,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":2651,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions\/2651"}],"wp:attachment":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}