Skip to content

Brute-force attack

In plain terms

Trying passwords one by one until one hits. On a live site, this gets blocked after a few tries — the real danger is elsewhere: a stolen password file, where the attacker tries without limit and with no one watching.

Definition

A brute-force attack is the systematic trial of passwords until the right one is found, either directly against a service or offline against a stolen database of password hashes.

How it works

Against a live service, this attack works poorly: the account locks after a few failures, and network latency limits the number of attempts. That's why it has largely given way to techniques that don't need to guess. It becomes formidable again in one specific case: when a database has been stolen. The service doesn't store passwords but their hashes, one-way calculations that can't be reversed — but that can be recomputed, by trying candidates until the same hash comes out. The attacker then works on their own machine, with no limit on attempts and no one watching. Password strength becomes decisive again, and for the first time length really matters: it's length, more than special characters, that puts the calculation out of reach.

Why it works

A short, complex password looks strong, when length is what actually protects it. And a database breach happens far from you: nothing alerts you until the service tells you.

What this attack relies on

Understanding these levers is worth more than memorizing a hundred pages: it is what lets you recognize a scam no one has described yet.

Warning signs

  • A notification from a service announcing a breach of its credentials database
  • A series of failed login attempts on your account, flagged by the service
  • A temporary account lockout you didn't cause
  • An old, short, reused password on a service that had a breach

Example

Fictional example — no real organization or address

Email received from an online storage service where you have an account.

We have detected unauthorized access to part of our account database. Passwords were stored there in encrypted form. As a precaution, we invite you to change your password and that of any account where you use it.

What gives it away

  • The breach happened at the service, not on your device.
  • A short password can be recovered from its hash.
  • The risk extends to every account sharing that password.
More fictional examples: Website

How to verify

Against a service, the login history and failed-attempt alerts are enough. Against a stolen database, there's nothing to check on your end: you learn about it from the service's notification. The right question isn't "was I attacked" but "is this password still used anywhere," since that's what decides what to do next.

The questions to ask, in order

  1. Is a service announcing a breach of its account database?

    If yes: Change that password right away, through the service's website or app.

  2. Do you use that password anywhere else?

    If yes: Change it everywhere, starting with your email.

  3. Are failed logins or an unexplained lockout showing up on your account?

    If yes: Change the password and turn on two-factor authentication.

What to do

Favor length: a phrase of several unrelated words beats a short word stuffed with symbols, because length is what makes the number of combinations to recompute explode. A password manager lets you have long and unique passwords without memorizing anything, and two-factor authentication makes the password alone insufficient.

If it already happened

After a service announces a breach, change the password there and everywhere it was reused, without waiting to learn whether it was actually cracked — the gap between the breach and its exploitation is exactly the window you have. Enable two-factor authentication and check recent logins.

So it doesn't happen again

  • Favor length: a phrase of several unrelated words.
  • One unique password per service, stored in a password manager.
  • Two-factor authentication on your important accounts.

The steps that defeat this attack

Test yourself

An email reports several failed sign-in attempts on your account, with a link to “secure” access.

Start the simulation: Brute-force attack

Frequently asked questions

My password is twelve characters — is that enough?
Length is the right lever, and twelve characters from a real phrase beat eight twisted ones. But no length protects a password that's reused: in that case it doesn't need to be computed at all, it's already known elsewhere.
Why do we hear about passwords being "cracked" if sites don't store them?
Because they store a hash, which can't be reversed but can be matched by trying candidates until one produces the same value. A short or common password is found this way; a long one isn't, for lack of time.

Official sources

This article is part of the Credentials and accounts family. Last updated: 2026-09-02.

Published under the responsibility of Mountaga Diallo · methodology.