<p>Complexity, uniqueness, and periodic change have long been the top best practices for passwords, but new recommendations have led to changes around password policies.</p><p>Passwords were supposed to fix authentication. Instead, they have become a source of significant problems. Users continue to choose weak or simple-to-guess &nbsp;passwords and reuse the same passwords on multiple services. They also tend to question restrictions: &quot;Which of these rules are reasonable? Which are most effective? Why do we have all these requirements?&quot;&nbsp;</p><p>Password policies continue to evolve even if user attitudes have not. Experts suggest placing more emphasis on checking passwords against known weak password lists and focusing less on password expiration policies.&nbsp;Here are the current best practices in use:</p><ul><li>Set complexity requirements, such as meeting a character minimum, and use certain character types (mixed case, numerals, and special characters).</li><li>Prevent users from choosing previously used passwords.</li><li>Require passwords to be changed periodically and perhaps frequently.</li><li>Check passwords against lists of most-common or especially weak passwords.<p>Password standards</p><p>The National Institute of Standards and Technology (NIST) addressed the question of password policies by issuing&nbsp;<a target="_blank" href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-63b.pdf">NIST Special Publication 800-63B (Digital Identity Guidelines &ndash; Authentication and Lifecycle Management)</a>. Section 5.1.1 &ldquo;Memorized Secrets&rdquo; has much to say about passwords and how they should be managed and stored. The requirements are actually pretty lenient: User-supplied passwords must be at least eight alphanumeric characters; passwords randomly generated by systems must be at least six characters and may be entirely numeric.</p><p>NIST has been updating its standards and the most significant new requirement: The system&nbsp;<em>must</em>&nbsp;check prospective passwords against &ldquo;a list that contains values known to be commonly used, expected, or compromised.&rdquo; Types of passwords that might be disallowed based on such checks include:</p></li><li>Passwords obtained from previous breaches</li><li>Dictionary words</li><li>Repetitive or sequential characters (e.g., aaaaaa or 1234abcd)</li><li>Context-specific words, such as the name of the service, the username, and derivatives thereof</li><li><p>To confuse the issue, NIST&#39;s recommendations&nbsp;are not specifically required; there is no organization whose role is to enforce these policies, and NIST&#39;s guidelines explicitly recommend against complexity requirements.</p><p>The rest of the NIST recommendations are smart measures based on common sense and real-world experience. For example:</p></li><li>The system should allow paste functionality on password entry, to facilitate the use of password managers.</li><li>Passwords&nbsp;should not be stored; the system should store a salted hash&mdash;the addition of random data in a one-way password hash&mdash;of the password.</li><li>The key derivation function to generate the salted hash should include a &ldquo;cost factor&rdquo;&mdash;something that takes time to attack, reducing the chances of a successful brute force attack.</li><li>Finally, as I&rsquo;ve long argued for, the system should permit the user to display the password as it is being entered, rather than just asterisks or dots. Usually this option is invoked by clicking an eyeball icon.</li><li><p>Windows password policies</p><p>Because the Windows domain password is the main password for users in so many enterprises, the default Windows policies are, at least, the starting point for most organizations. For many, there is no obvious reason to go any further than&nbsp;<a target="_blank" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-policy">the defaults</a>.</p><p>The Windows default settings are not necessarily the same as those in the Windows Security Baselines, which are groups of policy settings &ldquo;based on feedback from Microsoft security engineering teams, product groups, partners, and customers.&rdquo; The&nbsp;baselines are included in&nbsp;<a target="_blank" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-compliance-toolkit-10">the Microsoft Security Compliance Toolkit</a>, which also includes policy-related tools for administrators. The Security Baselines serve as another very common setting, by virtue of being a Microsoft-endorsed configuration.</p><p>The most interesting settings, at least recently, are the&nbsp;<a target="_blank" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/minimum-password-age">minimum</a>&nbsp;and&nbsp;<a target="_blank" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/maximum-password-age">maximum</a>&nbsp;password age. The minimum age is the number of days&nbsp;<em>before users are allowed to change a password</em>. The maximum is the number of days&nbsp;<em>after which users must change their password</em>. The default minimum is one day, both for Windows and the security baselines; the maximum defaults to 42 days for Windows and, until recently, 60 days in the security baselines. These settings are enabled in almost all default configurations.</p><p>The default levels are changing</p><p>But in May 2019,&nbsp;<a target="_blank" href="https://blogs.technet.microsoft.com/secguide/2019/05/23/security-baseline-final-for-windows-10-v1903-and-windows-server-v1903/">Microsoft announced changes in the Security Baselines for Windows 10 and Windows Server build 1903</a>: The minimum and maximum password ages will no longer be set in the baselines and therefore will not be enforced.</p><p>Microsoft cites research (see &quot;<a target="_blank" href="https://cormac.herley.org/docs/WhatsaSysadminToDo.pdf">An Administrator&rsquo;s Guide to Internet Password Research</a>&quot; and &quot;The Security of Modern Password Expiration&quot;) to claim that password expiration policies are no longer considered to have great value. Other measures, such as checking lists of banned passwords, are more effective. As they note, Windows Group Policies don&rsquo;t provide for checking such lists, so neither can the Security Baselines, which is a good example of why you should not rely only on the baselines. Microsoft offers some of the more advanced capabilities in&nbsp;<a target="_blank" href="https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/Azure-AD-Password-Protection-and-Smart-Lockout-are-now-in-Public/ba-p/245423">Azure AD Password Protection</a>.</p><p>Password complexity: The ground rules</p><p>What is the&nbsp;<a target="_blank" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements">default Windows password complexity policy</a>?</p></li><li>The password may not contain the account name or variations on the account name.</li><li>It must contain characters from three of the following five groups (quoted from the Microsoft document):<ol><li>Uppercase letters of European languages (A through Z, with diacritical marks, Greek and Cyrillic characters)</li><li>Lowercase letters of European languages (A through Z, sharp S, with diacritical marks, Greek and Cyrillic characters)</li><li>Base 10 digits (0 through 9); non-alphanumeric characters (special characters): (~!@#$%^&amp;*_-+=`|\(){}[]:;&quot;&#39;&lt;&gt;,.?/)</li><li>Currency symbols such as the euro or British pound are not counted as special characters for this policy setting.</li><li>Any Unicode character that is categorized as an alphabetic character but is not uppercase or lowercase. This includes Unicode characters from Asian languages.</li></ol></li><li><p>Everyone who has had to deal with&nbsp;these policies, which are enabled in the Security Baselines, knows what a pain they can be. As the Microsoft document says, enabling the policies &quot;may cause some additional help desk calls for locked-out accounts because users might not be used to having passwords that contain characters other than those found in the alphabet. However, this policy setting is liberal enough that all users should be able to abide by the requirements with a minor learning curve.&quot;</p><p>The&nbsp;<a target="_blank" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/minimum-password-length">default password length requirement</a>&nbsp;is seven characters, but elsewhere Microsoft recommends eight characters, as do the NIST requirements. In the Security Baselines, the minimum password length is 14 characters.</p><p>The NIST policies specifically reject (though they do not ban) complexity requirements. Microsoft has not removed the default imposition of these requirements from Windows or the Security Baselines, but it may be a change you want to make yourself.</p><p>If you want finer control of password filtering but&nbsp;<a href="https://www.hpe.com/us/en/insights/articles/5-ways-to-see-whats-going-on-in-your-windows-server-system-right-now-1812.html">want to stick with Active Directory</a>, you can replace&nbsp;<a target="_blank" href="https://docs.microsoft.com/en-us/windows/desktop/secmgmt/password-filters">Microsoft&rsquo;s standard Passfilt.dll</a>&nbsp;with a commercial one or write one yourself,&nbsp;<a target="_blank" href="https://engineeringblog.yelp.com/2018/04/ad-password-blacklisting.html">as Yelp did, based on an open source implementation</a>. Examples of commercial replacements are those from&nbsp;<a target="_blank" href="https://nfrontsecurity.com/products/nfront-password-filter/">nFront Security</a>,&nbsp;<a target="_blank" href="https://www.manageengine.com/products/self-service-password/password-policy-enforcer.html">ManageEngine</a>, and&nbsp;<a target="_blank" href="https://anixis.com/products/ppe/faq.htm">Anixis</a>. Using one of these replacements, you can implement current best practices within your otherwise standard Active Directory infrastructure.</p><p><a target="_blank" href="https://github.com/danielmiessler/SecLists/tree/master/Passwords/Common-Credentials">SecLists keeps a collection of many large common password lists</a>.</p><p>Beyond banned passwords</p><p>Banned password lists are useful, but another way may be better.&nbsp;<a target="_blank" href="https://haveibeenpwned.com/">Have I Been Pwned</a>&nbsp;is a site that keeps records of major user ID and password breaches and allows you to check whether any of your logins have been compromised.</p><p>The site was built and is maintained by Troy Hunt,&nbsp;<a target="_blank" href="https://rd.microsoft.com/en-us/">a Microsoft regional director</a>&nbsp;and well-known security expert. It has data on 369 breached sites and 7,860,402,548 breached accounts. The site also has&nbsp;<a target="_blank" href="https://haveibeenpwned.com/API/v2#PwnedPasswords">an API</a>&nbsp;that allows you to check whether a particular account has been breached or just if a particular password exists in the breach database.</p><p>Hunt thinks that, once a list is as large as his, it is &quot;exceptionally unlikely to have anything outside that collection which is both terrible and actively used.&rdquo; The answer is to check against&nbsp;<a target="_blank" href="https://haveibeenpwned.com/Passwords">the separate Pwned Passwords database</a>, which contains 551 million passwords that have been in one or more of the breaches, using its API. Hunt says he would set a minimum of six characters and then block anything that shows up in Pwned Passwords. One more tip from Hunt: &ldquo;I&rsquo;d block every variation of the company name; nobody on the Acme Corp. website can use AcmeCorp, AcmeCorp1, AcmeC0rp, etc.&rdquo;</p><p>If you want to use the Pwned Passwords API, you can build on one of the many projects already doing so. Typically, they create an environment-native interface to the API, such as with the many PHP libraries, Python and Perl scripts, WordPress plugins, and Java clients, as well as an IFTTT recipe.</p><p>In addition to many weak passwords, Pwned Passwords has a large number of passwords that would satisfy any set of complexity rules, so it might seem to be overkill. But compared with the range of possible passwords, 551 million isn&rsquo;t as big a number as it seems. Nearly all of my own passwords are randomly generated by my password manager, but I tested several passwords I made up on my own in recent years, and none appear in the Pwned Passwords database. So maybe relying on Hunt&rsquo;s API and a minimum length and blocking organization name variants is the easiest route to strong protection.</p><p>I wrote a program to check the contents of one of the SecLists lists of &ldquo;common credentials&rdquo; against the Pwned Passwords database. All but 3,663 of 262,000 passwords tested were in Pwned Passwords, and more than half of those that weren&rsquo;t had fewer than eight characters. Perhaps this means that Hunt is right that checking banned password lists is largely redundant, though if you&rsquo;re going to check one or the other, it&rsquo;s easy enough to check both.</p><p>But all of this is about usernames and passwords, a technology that we should all hope will someday be deprecated. At the same time you make sure your passwords are strong, move forward with&nbsp;<a href="https://www.hpe.com/us/en/insights/articles/with-webauthn-web-authentication-is-finally-getting-smart-1808.html">multifactor authentication</a>&nbsp;and&nbsp;<a href="https://www.hpe.com/us/en/insights/articles/biometric-authentication-from-speeding-travel-to-providing-id-for-the-marginalized-1903.html">biometrics</a>&nbsp;that bypass the inherent problems with passwords.</p><p>Password policy best practices: Lessons for leaders</p></li><li>Stay up to date with recommendations for creating and maintaining secure passwords.</li><li>Minimize opportunities for user password failures.</li><li>Make use of public databases of password failures and account breache</li></ul>