This was a paper I wrote for a college course. It's just a basic introduction to password guessing. This document is also displayed on Dr. Fred Cohen's all.net site: (http://all.net/CID/Attack/papers/PasswordGuessing2.html).
Passwords, passphrases and security codes are used in virtually every interaction between users and information systems, . Unfortunately, with such a central role in security, easily guessed passwords are often the weakest link. They grant attackers access to system resources; and bring them significantly closer to being able to access other accounts, nearby machines, and perhaps even administrative privileges, . The purpose of this research is to introduce the concept and methodology, follow it by some real-life examples, and scare organizations into implementing stronger password policies.
Passwords are sequences of symbols usually associated with a user name. The combination provides a mechanism for identification and authentication of a particular user. If all was right with the world, they would be more or less unique and grant privileges only to the account's owner (or other intended user). Alas, the world is not all right. Attackers have several venues of guessing passwords and overcoming this obstacle.
Fairly low on the difficulty scale, we have attacks against default passwords. These are established by the vendor and built into many applications and operating systems, allowing attackers an almost effortless point of entry. The vulnerability exists because overworked, uninformed, or lazy administrators fail to change them; and crackers maintain large databases. Exploits of this nature are easy to implement and either succeed or fail within a matter of seconds (or probably longer if the target device must be identified first). For an example database of default passwords see   and .
A dictionary-based attack usually consists of parsing a word file, encrypting or hashing that word (according to a particular algorithm), and comparing the result to the encrypted or hashed password from the victim machine. If the comparison matches, we have the original password. Of course, this could be far more difficult if we do not know the correct algorithm or do not have access to the encrypted system file. We can also use this attack to login to network services. By examining the server's response (i.e. the text string "Password Incorrect" or "Successful Login") to each argument we send, we can determine which accounts are vulnerable to dictionary-based attacks. Duration and probability of success vary depending on a system's processing efficiency and quality of the dictionary file, though attacks with small dictionaries often have success rates near 20%, .
We also have hybrid attacks, which append, prepend, or insert numerical (0-9) and special (!@#$%*, etc.) characters to dictionary terms. Passwords guessed at this level might be something like "129good45guess" or "pa55w0rd." Finally, the most complex and time consuming method is implementing brute force. With this attack we can expect every possible keystroke character in every possible sequence to be tried until the correct combination (and order) is chosen. It is not abnormal for a brute force attack against an NT (MD4) Hash, MD5 Hash, or algorithm of similar strength to last for weeks, months, or even years. Mathematically, an 8-symbol passwords chosen uniformly and at random from an alphabet of 100 symbols would require 5 quadrillion guesses, .
Though the terminology of each mode may differ (i.e. brute-force in L0phtcrack is equivalent to incremental mode in John the Ripper), the concepts remain the same. Advanced programs also allow user-specified character sets and customized functions for generating password guesses. Furthermore, if an attacker is educated in a user's interests, hobbies, family names, and other personal information, they may build on the dictionary file with such terms.
How Vulnerabilities Originate
We've already discussed the impact that default passwords have on a system's security. Additionally, on almost all machines, the users themselves choose the passwords. This places the burden of security on end users who either do not know, or, sometimes do not care about sound security practices, . Possible reasons include ignorance, carelessness, and inconvenience. As a general rule, passwords that are simple to remember, are, likewise, easy to guess. We can also expect many users to use the same password for more than one account on possibly more than one system (what could be more convenient than only having to remember one password?).
A system's cryptographic protocol also plays a roll in security (or lack thereof). For instance, Unix machines might rely on crypt, a one-way hashing algorithm based on a modified DES algorithm, to transform passwords into ciphertext, . Since crypt, algorithms such as MD5 were found to provide a more secure and attack-resistant representation of passwords; yet many systems have not upgraded.
Likewise, Windows machines are troubled by something similar. By default, several versions of Windows store two representations of each password on the local disk, . One of these representations (the LM hash) is simply for backward compatibility with older, less sophistcated machines. The LM passwords are extremely weak compared to the stronger representation (the NT hash) and they can be guessed by force in a very short amount of time, .
Specific Tools and Exploits
Summary, Conclusions, and Further Work
The SANS Institute ranked weak or nonexistent passwords the third (Windows) and fourth (Unix) most critical Internet security vulnerabilities, . If ever an ounce of prevention was worth a pound of cure - this is it. From a technical point of view, defending against password attacks is very simple: declare and enforce policies with complexity and length requirements, minimum and maximum password ages, and strong cryptography. For a full list of recommendations see . Keep in mind that passwords can also be acquired via scavenging (dumpster diving), social engineering, coercion, and even the simplest form of password guessing - the educated guess.