Brute Force and Algorithm Types

What Are Some Real-Life Examples of Brute Force Attacks?

Real-life brute force attacks include guessing weak passwords and PIN codes, cracking stolen password hashes, and trying every key, plus how defenses slow them.

On this page
  1. Guessing weak passwords and PINs
  2. Cracking stolen password hashes
  3. Guessing one-time codes
  4. Trying every key
  5. Brute force that isn’t an attack
  6. How defenses make brute force impractical

Guessing weak passwords and PINs

The most familiar example is an online guessing attack. An attacker repeatedly tries passwords or PINs on a login page until one works. Weak choices make this easy. A 4-digit PIN has only 10,000 possibilities, so with no limit on attempts it can be guessed in a short time.

A dictionary attack is a narrower form of the same idea. Instead of trying every combination, it starts with a list of likely words and common passwords. It is still brute force in the broad sense, because it is trying candidates until one matches.

Credential stuffing is related but works differently. It reuses real username and password pairs that were leaked from other websites, on the bet that people reuse passwords. It doesn’t try every combination, so it is usually discussed as a separate kind of attack.

Cracking stolen password hashes

Many systems don’t store passwords directly. They store a hash, which is a scrambled version of each password. If an attacker steals that database, they can hash candidate passwords and compare the results with the stored hashes. This can be done offline, away from the login page, so the usual limits on failed attempts don’t apply.

This is why good systems use password hashing functions such as bcrypt or Argon2. These are designed to be deliberately slow, so each guess costs more time and computing power. A slow hash doesn’t make a weak password safe, but it makes large-scale guessing much more expensive.

Guessing one-time codes

Many services send a one-time code by text message or in an authenticator app. These codes are often 6 digits, which gives 1,000,000 possibilities. An attacker who can try codes without limits could work through them in time. For this reason, services usually expire codes quickly and cap how many wrong codes can be entered.

Trying every key

Breaking encryption by trying every possible key is brute force in its purest form. The length of the key decides whether this is practical.

In 1998, a machine built by the Electronic Frontier Foundation broke a 56-bit DES key by brute force in a matter of days. That key length is now considered far too short. A 128-bit key has 2^128 possible values, about 3.4 × 10^38. Searching that space by brute force is not a practical attack on a well-chosen modern key. The real risks are usually weak key choices, poor implementations and stolen keys, rather than a direct search.

Brute force that isn’t an attack

Brute force is not always malicious. Bitcoin mining works by repeatedly hashing block data with different numbers until the result meets a required target. That search is a brute force method, used to add blocks to the blockchain rather than to break anything.

How defenses make brute force impractical

Several measures work together:

  • Rate limiting slows or blocks repeated failed attempts from the same source.
  • Lockouts and delays stop guessing against one account for a while. They have a cost, though: an attacker can deliberately lock out real users.
  • Multi-factor authentication means a guessed password alone is not enough to get in.
  • Long, random passwords and a password manager make guessing far harder.
  • Slow password hashing makes stolen hashes expensive to test.

No single measure is enough on its own. Together, they turn a method that works on weak targets into one that is impractical against well-protected ones.

The complete guide to brute force and algorithm types

Brute Force Algorithm Examples
Read the guide

Keep exploring

Guides from other topics

All topics →