# Brute-Force Attack

> Trying a password, then the next, and the next, until one works.

**Field:** Software Development  
**Category:** Security  
**Also known as:** Password Guessing, Password Brute Force, Login Brute Force

## Think of it like

Think of it like trying each key on a big ring until one fits.

## Definition

A brute-force attack guesses passwords over and over until one works. A program can try a huge number of guesses very fast. Short and common passwords fall first. Sites fight back by slowing down repeat tries, locking an account for a while, or asking for a second factor. Long passwords make guessing take far too long to be worth it.

## Example

A bot tries password1, qwerty and thousands more on Emma's account. The site slows it down after five misses, so it gets nowhere.

## Why it matters

Every login page will be tried this way. Without limits, a weak password is only a matter of time.

## Common mistake

Locking accounts for good after a few misses. Attackers then lock out real users on purpose, so slow tries down instead.

## Three principles

- **Guess and repeat.** Try password after password.
- **Slow it down.** Limit tries per minute.
- **Length wins.** Long passwords take too long to guess.

## Related terms

- [Authentication](https://learn.benibix.com/term/development/authentication)
- [Rate Limiting](https://learn.benibix.com/term/development/rate-limiting)
- [Multi-Factor Authentication (MFA)](https://learn.benibix.com/term/development/multi-factor-authentication)
- [Credential Stuffing](https://learn.benibix.com/term/development/credential-stuffing)
- [Password Hashing](https://learn.benibix.com/term/development/password-hashing)
- [Brute Force](https://learn.benibix.com/term/development/brute-force)

![Three panels. Brute force: guesses like 123456, password and qwerty are tried on one account until one works; stop it by limiting tries. Credential stuffing: a pair leaked from a games site, jack@example.com and sunset77, is tried on his shop account and works because he used it twice; stop it with a second factor. Session hijacking: Lucy logs in and gets a session cookie, a script steals it and the site sees Lucy with no password needed; stop it with HttpOnly cookies.](https://learn.benibix.com/diagrams/dev2-login-attacks.svg)

---

Source: https://learn.benibix.com/term/development/brute-force-attack
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
