Microsoft Store
 

Password cracking


 

Password cracking is the process of recovering secret passwords from data that has been stored in or transmitted by a computer system, typically, by repeatedly verifying guesses for the password. The purpose of password cracking might be to help a user recover a forgotten password (though installing an entirely new password is less of a security risk), to gain unauthorized access to a system, or as a preventive measure by the system administrator to check for easily crackable passwords.

Principal attack methods

Weak encryption

If a system uses a cryptographically weak function to hash or encrypt passwords, exploiting that weakness can recover even 'well-chosen' passwords. Decryption need not be a quick operation, and can be conducted while not connected to the target system. Any 'cracking' technique of this kind is considered successful if it can decrypt the password in fewer operations than would be required by a brute force attack (see below). The fewer operations required, the "weaker" the encryption is considered to be (for equivalently well chosen passwords). However, it must be kept in mind that ciphers used for password protection should have been analyzed for weaknesses extremely thoroughly by cryptographic experts before adoption as a protective measure. Hence this method is unlikely to work if such an examination has been done correctly.

Related Topics:
Cryptographically - Brute force attack - Cipher

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Progress in cryptography has made available functions which are believed to actually be "one way" hashes, such as MD5 or SHA-1. These are thought to be impossible to invert in practice. When quality implementations of good cryptographic hash functions are correctly used for authentication, password cracking through decryption can be considered infeasible.

Related Topics:
One way - Hashes - MD5 - SHA-1

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Guessing

Not surprisingly, many users choose weak passwords, usually one related to themselves in some way. It may be:

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

  • blank
  • the word 'password'
  • the user's name or login name
  • the name of their significiant other or another relative
  • their birthplace or date of birth
  • a pet's name
  • automobile licence plate number
  • and so on, or
  • a simple modification of one of the preceding, such as suffixing a digit or reversing the order of the letters.
  • Some users even neglect to change the default password that came with their account on the computer system. And some administrators neglect to change default account passwords provided by the operating system vendor or hardware supplier. A famous example is the use of FieldService as a user name with Guest as the password. If not changed at system configuration time, anyone familiar with such systems will have 'cracked' an important password, and such service accounts often have higher access privileges than a normal user account.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    The determined cracker can easily develop a computer program that accepts personal information about the user being attacked and generates common variations for passwords suggested by that information.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Dictionary attack

A dictionary attack also exploits the tendency of people to choose weak passwords, and is related to the previous attack. Password cracking programs usually come equipped with "dictionaries", or word lists, with thousands or even millions of entries of several kinds, including:

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

  • words in various languages
  • names of people
  • places
  • commonly used passwords
  • The cracking program encrypts each word in the dictionary, and simple modifications of each word, and checks whether any match an encrypted password. This is feasible because the attack can be automated and, on inexpensive modern computers, several thousand possibilities can be tried per second.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Guessing, combined with dictionary attacks, have been repeatedly and consistently demonstrated for several decades to be sufficient to crack perhaps as many as 50% of all account passwords on production systems.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Brute force attack

A last resort is to try every possible password up to some size, known as a brute force attack. As the number of possible passwords increases rapidly as the length of the password increases, this method is unlikely to be successful unless the password is relatively small. But how small is too small? A common current recommendation is 8 or more randomly chosen characters combining letters, numbers, and special (punctuation, etc) characters. Systems which limit passwords to numeric characters only, or upper case only, or, generally, which exclude possible password character choices make such attacks easier. Using longer passwords in such cases (if possible on a particular system) can compensate for a limited allowable character set.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Generic brute-force search techniques can be used to speed up the computation. But the real threat may be likely to be from smart brute-force techniques that exploit knowledge about how people tend to choose passwords. NIST SP 800-63 (2) provides further discussion of password quality, and suggests, for example, that an 8 character user-chosen password may provide somewhere between 18 and 30 bits of entropy, depending on how it is chosen. Note: This number is far less than what is generally considered to be safe for an encryption key.

Related Topics:
Brute-force search - NIST

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Too small thus depends on an attacker's ingenuity and resources (e.g., available time, computing power, etc.), the latter of which will increase as computers get faster. Most commonly used hashes can be implemented using specialized hardware, allowing faster attacks. Large numbers of computers can be harnessed in parallel, each trying a separate portion of the search space. Unused overnight and weekend time on office computers can also be used for this purpose.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The distinction between guessing, dictionary and brute force attacks is not strict. They are all similar in that the attacker goes through a list of candiate passwords one by one, which list may be explicity enumerated or implicitly defined, may or may not incorporate knowledge about the victim, and may or may not be linguistically derived. Each of the three, particularly 'dictionary attack', is frequently used as an umbrella term to denote all the three attacks and the spectrum of attacks encompassed by them.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Precomputation

In its most basic form, precomputation involves hashing each word in the dictionary (or any search space of candidate passwords) and storing the <plaintext, ciphertext> pairs in a way that enables lookup on the ciphertext field. This way, when a new encrypted password or is obtained, password recovery is instantaneous. Precomputation can be very useful for a dictionary attack if salt is not used properly (see below), and the dramatic decrease in the cost of mass storage has made it practical for fairly large dictionaries.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

There exist advanced precomputation methods that are even more effective. By applying a time-memory tradeoff, a middle ground can be reached - a search space of size N can be turned into an encrypted database of size O(N2/3) in which searching for an encrypted password takes time O(N2/3). The theory has recently been refined into a practical technique, and the online implementation at http://passcracking.com/ achieves impressive results on 8 character alphanumeric MD5 hashes. Another example http://lasecwww.epfl.ch/~oechslin/projects/ophcrack cracks alphanumeric Windows LAN Manager passwords in a few seconds. This is much faster than brute force attacks on the obsolete LAN Manager, which uses a particularly weak method of hashing the password. Current Windows systems still compute and store a LAN Manager hash by default for backwards compatibility. http://support.microsoft.com/default.aspx?scid=KB;EN-US;q299656&)

Related Topics:
Time-memory tradeoff - O - Windows - LAN Manager

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

A technique similar to precomputation, known generically as memoization, can be used to crack multiple passwords at the cost of cracking just one. Since encrypting a word takes much longer than comparing it with a stored word, a lot of effort is saved by encrypting each word only once and comparing it with each of the encrypted passwords using an efficient list search algorithm. The two approaches may of course be combined: the time-space tradeoff attack can be modified to crack multiple passwords simultaneously in a shorter time than cracking them one after the other.

Related Topics:
Memoization - List search

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Salting

The benefits of precomputation and memoization can be nullified by the simple and canonical expedient of randomizing the hashing process. This is known as salting. When the user sets a password, a short string called the salt is suffixed to the password before encrypting it; the salt is stored along with the encrypted password so that it can be used during verification. Since the salt is different for each user, the attacker can no longer use a single encrypted version of each candidate password. If the salt is long enough, the attacker must repeat the encryption of every guess for each user, and this can only be done after obtaining the encrypted password record for that user.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Early Unix password vulnerability

Early Unix implementations used a 12-bit salt, which allowed for 4096 possibilities, and limited passwords to 8 characters. While 12 bits was good enough for most purposes in the 1970s (although some expressed doubts even then), by 2005 disk storage has become cheap enough that an attacker can precompute encryptions of millions of common passwords, including all 4096 possible salt variations for each password, and store the precomputed values on a single portable hard drive. An attacker with a larger budget can build a disk farm with all 6 character passwords and the most common 7 and 8 character passwords stored in encrypted form, for all 4096 possible salts. And when several thousand passwords are being cracked at once, memoization still offers some benefit. Since there is little downside to using a longer (say 32-, 64- or 128-bit) salt, and they render any precomputation or memoization hopeless, modern implementations choose to do so.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

~ ~ ~ ~ ~ ~ ~ ~ ~ ~