Password Cracking - Computerphile

ComputerphileComputerphile
Education3 min read21 min video
Jul 13, 2016|3,524,907 views|71,171|4,628
Save to Pod

Key Moments

TL;DR

Passwords are weak; powerful GPUs can crack them quickly using dictionary attacks.

Key Insights

1

Most people use weak passwords that are easily crackable.

2

Password cracking leverages powerful hardware like GPUs to rapidly test password hypotheses.

3

Brute-force attacks test all possible combinations, while dictionary attacks use wordlists and rules, proving more effective.

4

Older hashing algorithms like MD5 are insecure and should not be used.

5

Modern password security relies on strong hashing algorithms (e.g., bcrypt, scrypt, Argon2) with salting and stretching.

6

Using real-world password leak data (like the RockYou list) significantly improves cracking success rates.

THE PROBLEM OF WEAK PASSWORDS

The video immediately establishes that the majority of the public uses weak passwords, posing a significant security risk. This is exacerbated when large databases, like those from LinkedIn, are breached, leading to the exposure of hashed passwords. Hackers can then use these cracked passwords to access other accounts, demonstrating the widespread implications of poor password security for individuals and their sensitive data across various online services.

HOW PASSWORD HASHING WORKS

Instead of storing passwords in plain text, systems use one-way pseudo-random functions (hashing) to convert them into unintelligible strings. When a user logs in, their entered password is re-hashed, and the output is compared to the stored hash. This ensures the system doesn't need to know the actual password. However, if these hashes are leaked, attackers can attempt to reverse the process by hashing known words and comparing them to the leaked hashes to find matches.

THE POWER OF GPU-ACCELERATED CRACKING

The demonstration highlights the use of 'Beast,' a server equipped with multiple high-performance graphics cards (GPUs), to showcase the speed of password cracking. With four Titan X GPUs, the system can perform billions of hashes per second. This parallel processing capability of GPUs drastically accelerates the brute-force and dictionary attack methods, making it possible to crack many passwords within minutes or hours, far surpassing the capabilities of standard CPUs.

TYPES OF PASSWORD ATTACKS

The video explains two primary attack methods: brute-force and dictionary attacks. Brute-force systematically tries every possible combination of characters, letters, and numbers, which becomes increasingly time-consuming with longer passwords. Dictionary attacks, on the other hand, use lists of common words, leaked passwords, and apply rules (like substitutions or appending numbers) to generate likely password candidates, proving much more efficient for typical user password habits.

THE INADEQUACY OF OLD HASHING METHODS

The discussion emphasizes that older hashing algorithms like MD5 are fundamentally insecure and should never be used for password storage. MD5 produces a 128-bit hash that can be cracked at an astonishing rate of billions per second. Even if older systems are slow to update, using outdated hashing methods leaves user data highly vulnerable. This underscores the need for developers to migrate to stronger, more modern hashing algorithms.

ENHANCING HASHING FOR SECURITY

To counter cracking attempts, modern password security relies on more robust hashing algorithms such as SHA-512, often combined with techniques like salting and key stretching (iterations). Salting adds unique random data to each password before hashing, making pre-computed rainbow tables ineffective. Iterations, or 'stretching,' means the hashing process is repeated many times, significantly increasing the computational effort required to crack a password, even with powerful hardware.

THE IMPACT OF REAL-WORLD DATA

The effectiveness of dictionary attacks is dramatically increased when using lists derived from actual password leaks, such as the well-known 'RockYou' list. This dataset contains millions of real passwords used by people, providing attackers with highly relevant wordlists. When combined with rule-based manipulations, these real-world passwords allow attackers to crack a much larger percentage of compromised hashes compared to generic wordlists.

IMPLICATIONS FOR PASSWORD CHOICES

The demonstration reveals that many passwords, even those seemingly complex like 'nik_2106_1989' or 'Lawrence_0901,' are crackable because they incorporate personal information or common patterns. The sheer volume and variety in leaked password databases mean that moderately complex passwords can be defeated. This reinforces the advice to create unique, long, and random passwords, ideally managed by a password manager, to stay ahead of evolving cracking techniques.

Password Security Best Practices

Practical takeaways from this episode

Do This

Use strong, unique passwords for each account.
Avoid common words, simple patterns, or personal information.
Use modern hashing algorithms like SHA-512 with iterations.
Assume older hashing algorithms like MD5 and SHA-1 are insecure.
Be aware that short passwords (six characters or less) are highly vulnerable.
Consider using password managers to generate and store complex passwords.

Avoid This

Do not reuse passwords across multiple accounts.
Do not store passwords in plain text.
Do not rely on older, weaker hashing algorithms like MD5 or SHA-1.
Do not underestimate the effectiveness of dictionary attacks combined with rules.
Do not think that using swear words makes a password secure; it can make it weaker if those words are in common dictionaries.
Do not use passwords that are easily guessable based on common patterns or leaked data like the RockYou list.

Password Hashing Speeds and Vulnerabilities

Data extracted from this episode

AlgorithmHash Output SizeSpeed (Billions of Hashes/Sec)Security Status
MD5128-bit40Not Secure - Do Not Use
SHA-1160-bitNot Specified (Vulnerable)Not Secure - Do Not Use
SHA-512 (Iterated)512-bitThousands to Millions (significantly slower)Recommended for better security

Password Cracking Attack Performance Comparison

Data extracted from this episode

Attack TypeTypical SpeedEffectiveness AgainstNotes
Brute Force (lowercase, 7 chars)Very Fast (seconds for combinations)Short, simple passwordsExponentially slower as length/character set increases
Brute Force (6 chars, 2 digits)Very Fast (within seconds)Short passwords with common number suffixesComplexity grows rapidly with length and character types
Dictionary Attack (Basic)Moderately FastCommonly used words and phrasesLimited by dictionary size
Dictionary Attack (with rules)Moderately FastCommon words with substitutions (e.g., l->1, e->3), case togglingMore effective than basic dictionary attacks
Dictionary Attack (RockYou list)Slightly Slower (due to size/manipulation)Real-world passwords from leaked databasesHighly effective due to size and variety of leaked passwords

Common Questions

Weak passwords can be easily cracked, leading to unauthorized access to your accounts. This can result in identity theft, financial loss, and compromise of sensitive personal information, especially if accounts are linked.

Topics

Mentioned in this video

More from Computerphile

View all 82 summaries

Found this useful? Build your knowledge library

Get AI-powered summaries of any YouTube video, podcast, or article in seconds. Save them to your personal pods and access them anytime.

Try Summify free