Password Cracking: Hash Cracking with Hashcat and John the Ripper
Password cracking is finding the password that produces a given hash. Why a hash can be cracked, a table of dictionary and rule based methods, Hashcat and John the Ripper, defense with Argon2 bcrypt and salt, and FAQs.
Quick answer: Password cracking is the task of finding the password that produces a given hash, the irreversible mathematical digest of a password. Systems do not store passwords in plain text; they store the hash. In a breach, it is usually these hashes that leak. An attacker, or an authorized penetration tester, uses tools like Hashcat and John the Ripper to hash candidate passwords one by one and compare them with the leaked hash. Cracking speed depends on three things: the hash algorithm, the password's complexity and the attacker's hardware. So security aims not to "reverse" the hash but to make cracking practically impossible: a slow algorithm, salting and a strong password.
Password cracking is a shared topic of digital forensics and penetration testing. It is used to open an encrypted disk in a law enforcement case, or to prove whether captured hashes are truly weak in a penetration test. This article takes an authorized, defensive view of how cracking works and how an organization protects itself. The goal is not an attack recipe but understanding and closing the risk.
What a hash is and why it can be cracked
A hash function turns a text into a fixed length, irreversible value. Being irreversible means you cannot go directly from hash to password. But there is a door: the same password always produces the same hash. So an attacker can guess a password, hash it and see if it matches. That is cracking, not solving the math but finding the right guess.
So the speed of the hash algorithm is critical. A fast algorithm allows billions of guesses per second. A slow, deliberately costly algorithm slows the attacker down. Our hash verification article covered the integrity side of hashing; here we look at the security side.
Cracking methods
| Method | How it works | When effective |
|---|---|---|
| Dictionary attack | Tries known password lists | Common, weak passwords |
| Brute force | Tries all combinations | Short passwords |
| Rule based | Transforms the dictionary (@ for a) | Very effective on human passwords |
| Mask attack | Tries by a known pattern | When password structure is known |
| Rainbow table | Precomputed hash table | When there is no salt |
The most effective method is usually the rule based dictionary attack, because people choose predictable passwords. Passwords like "Pass123!" or "London2026" are found with a small transformation of a dictionary.
Tools: Hashcat and John the Ripper
- Hashcat. Uses GPU power and supports many hash types. Thanks to GPU parallelism it can make billions of attempts per second. This explains why hashes with weak, fast algorithms are cracked quickly.
- John the Ripper. A versatile, multi format classic tool, known for automatic mode selection and a rich rule engine. In forensics it is common for file, archive and disk encryption hashes.
Both tools are standard for authorized penetration testing and forensic examination. Showing that captured password hashes are truly crackable in a penetration test means the finding is validated with a working proof.
Defense: how to make your password uncrackable
On the organization side, the goal is to make cracking economically impossible.
- A slow algorithm designed for passwords. MD5 and SHA1 are not suitable for storing passwords; they are too fast. Argon2, bcrypt and scrypt are deliberately slow and make cracking millions of times more expensive.
- Salt. A random, unique value is added to each password. This makes rainbow tables useless and stops two identical passwords producing the same hash.
- Pepper. An extra secret stored outside the database makes cracking harder even if hashes leak.
- Strong password policy. Length matters most. A long passphrase is far stronger than a short, complex password.
- Multi step verification. Even if the password is cracked, a second factor protects the account. See our 2FA and passkey article.
How long does cracking take
There is no fixed time; it ranges from seconds to centuries by algorithm and password. The general rule: fast algorithm plus short password equals cracked instantly; slow algorithm plus a long passphrase equals practically impossible. So saying "my password is complex" is not enough; how the system stores the password matters at least as much.
Frequently asked questions
Can a hash be reversed? No, not directly. Cracking is guessing the right password and producing the same hash. That is why weak passwords are cracked and strong ones practically cannot be.
Why is storing passwords with MD5 bad? MD5 is very fast and, used without salt, allows billions of attempts per second. For passwords, use Argon2, bcrypt or scrypt.
Does salting make a password uncrackable? Salt stops rainbow tables and bulk cracking but does not fully stop cracking one by one. Salt plus a slow algorithm plus a strong password are needed together.
Is password cracking legal? Only with explicit authorization, on your own system or within a written consent penetration test and forensic examination. Unauthorized access is a crime.
Sources
- OWASP, Password Storage Cheat Sheet: https://cheatsheetseries.owasp.org
- NIST SP 800 63B, Digital Identity Guidelines: https://pages.nist.gov/800-63-3
- Hashcat official site: https://hashcat.net
- Openwall John the Ripper: https://www.openwall.com/john
To assess your password storage policy and any capturable hashes with an authorized penetration test, contact DSET. From our Ankara Hacettepe Teknokent laboratory we provide penetration testing and digital forensics.
Kimliğinizi doğrulayın
Yetkilendirilmiş erişim alanı. Tüm giriş denemeleri kayıt altına alınır.