Passwords are a hacker's best friend. They can be guessed, intercepted, stolen, and reused to gain access to services or systems. They are often the keys to sensitive data, yet far too often they're unsuited for the task at hand. People often select weak passwords, like the name of their pet, favorite sports team, or significant dates that can be easily guessed.
People who design systems can also make poor decisions. What if it was more intuitive for people to generate stronger passwords? Beyond this, there is also the issue of storing passwords as hashes so that authentication can take place.
In this chapter, we take a look at password hashes, what they are, and how to crack them in order to obtain the plaintext passwords that they're supposed to protect. Throughout this book, you have seen ways that you might reach a system's
/etc/shadow file. We have also examined how to extract hashes from a Windows system and from other types of databases. Now let's try to crack the passwords from these files.
Hashing is the process of taking input of arbitrary size, such as a string of text, a password, or a file, and producing output of a fixed size—for example, a number, often displayed as hexadecimal or base64. Hashing has different applications in computing. It is used in data structures (such as a blockchain, the underlying structure of cryptocurrencies) to check the integrity of communications and to store passwords. Naturally, it is this last application ...
Get Hands on Hacking now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.