Skip navigation

Password Palpitations — The Ongoing Threat of LM Hashing

This post was contributed by John Moore (@RabidSecurity)

How do we protect sensitive information from prying eyes on our computers and networks? The simple answer is to deploy controls to monitor and restrict the transfer or viewing of sensitive data on those shared resources.

One commonly deployed control used to accomplish restricted access to our devices is password authentication.

Based on a sequence of concatenated (linked) keystrokes, passwords have traditionally consisted of knowledge-based challenges used to confirm or negate the identity of the user, as well as assign privileges based on trusts created during this process.

However, what would you say if you knew the mechanism that protects your password can be severely weakened depending on what hashing algorithm is used to protect your passwords? What if the algorithm that was used to protect your passwords was similar to using your old combination lock from gym class, and to make matters worse, someone etched the last value of the combination on the back of the lock! You would probably feel some angst about trusting the safety of your belongings, other than some smelly gym shorts, to such a weak protection mechanism.

Unfortunately, this analogy is strongly reminiscent of how passwords are protected if LM Hashing is enabled and used to protect your sensitive data. In fact, if you have any computers running Windows XP in your network or at home, it’s highly likely that your password complexity has been greatly reduced from a hashed password- that which is highly susceptible to a brute force attack. A brute force attack is the concept of trying every combination of keys possible for a password of a particular length.

In order to mitigate this threat and protect oneself from this attack, one should first ask the question, what is LM Hashing and how does one protect their password from using it? LM Hashing is a legacy Microsoft password storage mechanism used to ensure backward compatibility while storing passwords with the following restrictions:

  • Passwords can have a maximum length of 14 characters.
  • Passwords are converted to uppercase.
  • Passwords will span two blocks of seven bytes of memory.

To help explain the issue, we should explain some basic facts about how passwords work.

The first fact to note is that passwords are not reversible. This means that we cannot step backward through the original process used to protect a password in order to arrive at the original clear (plain) text value. Thus, there is no rewind button on the remote control for password hashing.

Therefore, in practice, the only way to crack a password is to guess or brute force the plain text password, hash it with the same algorithm, and then compare the result to the saved hash value of the original password to see if it matches. If the answer is yes, we have the password; if the answer is no, then we try again by repeating the process with a different password.

The next concern of using LM Hashing to protect a password is that LM Hashing converts all password values to all uppercase letters, which reduces the number of possible combinations needed to guess or brute force the password. Example: “Secrets4me” contains uppercase and lowercase letters and numbers, but LM hashing would change this password to “SECRETS4ME,” which only uses uppercase letters and numbers. This reduces the total number of possibilities that need to be included when attempting to brute force the password.

Lastly, there is an even more severe flaw with LM Hashing; it stores passwords longer than 7 characters in a second separate block in memory. This means our password of “SECRETS4ME” is actually stored as two separate passwords linked together. This LM hashing password would actually look like “SECRETS”+“4ME” when stored. Therefore, cracking this password would be equivalent to breaking a 7-character password in addition to a 3-character password which happens to be much easier mathematically than the work and time needed to recover a 10-character password.

How can we fix this problem? There are many ways we can safeguard our information and networks from this vulnerability. First, consider retiring any and all computers running unsupported versions of Windows. This means any Windows XP and older OS should be upgraded or removed from the network. If you must keep Windows XP in your environment due to upgrade costs or the need to maintain legacy support requirements, then it may make sense to think about disabling LM Hashing through Group Policy. You can click here for directions on how to turn off LM hashing through local GPO settings, or by the registry if necessary.

Lastly, think about using a multi-factor or one-time password solution to rotate passwords and store authentication data in secondary locations without relying on LM hashing.

When it comes to protecting your passwords, please remember that an ounce of protection is worth a pound of cure when it comes to securing your computers and data. Take a moment to assess your password security and harden your network if necessary to avoid making your digital assets an easy target for the bad guys.