sodcalculator

10 Tech How-To

Password Cracking: Common Methods Explained

Tag 10-21474 · Updated · Standard formula, shown below

Time (seconds) 1,000.00 s
Time (hours)
0.2778 h
Result
Time (days)
0.01157 d
Result
Max attempts
1000000
You entered
You enter
Max attempts, Guesses per second, Character set size
You get
Time (seconds), Time (hours), Time (days)
Rounding
2 dp

Password cracking is the process of recovering passwords from data that has been stored or transmitted in a computer system. It is used both by attackers to gain unauthorized access and by security professionals to test system strength. This article explains the main techniques used, how they work, and what you can do to protect yourself.

Formula

The calculator above estimates how long a brute-force attack would take. The formula is:

Time = Number of attempts ÷ Guesses per second

Where:

  • Number of attempts – how many passwords the attacker tries (for a full search, this equals the total number of possible passwords).
  • Guesses per second – the speed at which the attacker can test passwords (depends on hardware and the hashing algorithm).
  • Time – the result, shown in seconds, hours, and days.

To estimate the total possible passwords for a given length and character set, use: Total = (character set size) ^ (password length). For example, an 8-character password using 95 printable ASCII characters has 95^8 ≈ 6.6 × 10^15 possibilities.

Worked Example

Using the default values from the calculator:

  • Max attempts = 1,000,000
  • Guesses per second = 1,000
  • Character set size = 95 (not directly used in the time calculation)

Time = 1,000,000 ÷ 1,000 = 1,000 seconds ≈ 0.28 hours ≈ 0.0116 days.

The calculator shows 1000.00 seconds, 0.28 hours, and 0.01 days. This means a million guesses at a thousand per second would take about 16.7 minutes.

What Is Password Cracking?

Password cracking is the act of recovering a password from data that has been stored or transmitted in a system. Attackers do this to gain unauthorized access to accounts, while security professionals do it to test how weak a system’s passwords are. The term is also used for the process of guessing a password through repeated attempts. It is not a single technique but a category that includes several methods, each with different speed, cost, and success rates.

Common Methods of Password Cracking

Here are the most widely used techniques, from simplest to most complex:

  • Brute-force attack – tries every possible combination of characters until the correct one is found. It is guaranteed to work eventually but can take an impractical amount of time for long passwords.
  • Dictionary attack – tries a list of common words, names, and phrases. It is fast but only works if the password is in the list.
  • Hybrid attack – combines dictionary words with variations like adding numbers or symbols (e.g., “password123” or “Password!”).
  • Rainbow table attack – uses precomputed tables of hashes to reverse a hash quickly. It is effective against unsalted hashes but fails when salts are used.
  • Phishing and social engineering – tricks the user into revealing their password, often through fake login pages or deceptive emails. This is not technically “cracking” but is a common way passwords are compromised.
  • Keylogging – uses malware to record keystrokes on the victim’s device. This captures the password as it is typed.
  • Credential stuffing – uses passwords leaked from one site to try on other sites. It works because many people reuse passwords.

How Attackers Get Password Hashes

Most systems do not store passwords in plain text. Instead, they store a hash – a fixed-length string produced by a one-way function. To crack a password, an attacker first needs the hash. Common ways hashes are obtained include:

  • Data breaches that leak database dumps.
  • Malware that extracts hashes from the system memory or files.
  • Intercepting network traffic if the connection is not encrypted.

Once the attacker has a hash, they can run cracking tools that compare hashes of guessed passwords against the stolen hash. If they match, the password is revealed.

How to Choose a Strong Password

Choosing a password that resists cracking is straightforward if you follow a few principles:

  • Use a long passphrase (at least 12–16 characters) rather than a single word.
  • Mix uppercase and lowercase letters, numbers, and symbols.
  • Avoid common words, names, dates, and keyboard patterns like “qwerty” or “123456”.
  • Do not reuse passwords across different sites.
  • Use a password manager to generate and store unique passwords for each account.

The length of the password matters more than the complexity. A 16-character passphrase with spaces and mixed case is far harder to crack than an 8-character password with symbols.

Common Problems and Misconceptions

One common misconception is that changing passwords frequently makes them more secure. In reality, frequent changes often lead to weaker passwords because users append numbers or symbols in predictable ways. Another misconception is that a complex password like “P@ssw0rd!” is strong – it is actually in many dictionary lists. Also, people often believe that a long random string is always better than a passphrase, but a passphrase of four random words is easier to remember and harder to crack than a short random string.

Another problem is that many users rely on security questions, which are often easy to guess or find online. Using a password manager and enabling two-factor authentication (2FA) adds a layer of protection even if a password is cracked.

Safety and Prevention

To protect against password cracking, both individuals and organizations should take these steps:

  • Use strong, unique passwords for every account.
  • Enable two-factor authentication wherever possible.
  • Use a reputable password manager.
  • Keep software and devices updated to prevent malware that could log keystrokes.
  • Be cautious of phishing emails and fake websites.
  • For organizations, implement account lockout after a few failed attempts and use rate limiting.

It is also important to understand that no password is uncrackable – given enough time and computing power, any password can be broken. The goal is to make the time required so long that it is not worth the attacker’s effort.

Frequently Asked Questions

How long does it take to crack a password?

It depends on the password length, character set, and the attacker’s hardware. A short numeric password can be cracked in seconds, while a 16-character random password could take centuries with current technology. Use the calculator above to estimate for your own scenario.

What is the difference between a hash and encryption?

Encryption is reversible – you can decrypt the data with a key. Hashing is one-way – you cannot reverse it to get the original input. That is why hashes are used for password storage: even if the database is leaked, the attacker only gets hashes, not plaintext passwords.

Is password cracking illegal?

It depends on intent and jurisdiction. Cracking passwords on systems you own or have permission to test is legal. Attempting to access someone else’s account without authorization is illegal in most countries and can lead to criminal charges.

Can a password manager be hacked?

Password managers are designed to be secure, but no software is perfect. They use strong encryption and require a master password. If your master password is weak or your device is compromised, the manager’s data could be at risk. Using a strong master password and enabling 2FA on the manager helps.

What is a salt in password hashing?

A salt is a random string added to the password before hashing. It ensures that identical passwords produce different hashes, which defeats rainbow table attacks and makes cracking slower because each password must be cracked individually.

Related

Formula used
in attempts | Max attempts | - | 1000000 | 1 | 1000000000
in speed | Guesses per second | - | 1000 | 1 | 1000000000000
in charset | Character set size | - | 95 | 1 | 1000
out time_s | Time (seconds) | s | attempts / speed | 2
out time_h | Time (hours) | h | attempts / speed / 3600 | 2
out time_d | Time (days) | d | attempts / speed / 86400 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More in this bed

The whole Tech How-To bed →