What is a brute-force attack? Trying passwords until one works.

Bonbay Updated 4 min read

The forms the attack takes.

TypeWhat the attacker doesWhat stops it
Classic brute forceTries every combination on one accountLockout after failed attempts, long password
Dictionary attackTries the most common passwords and their variantsPasswords that are not on known lists
Password sprayingTries a few common passwords on hundreds of accounts, slowly, to avoid lockoutsTwo-factor authentication, login monitoring
Credential stuffingReuses credentials stolen from other sitesA unique password for each service, two-factor authentication
Offline crackingTries billions of combinations on a stolen password databaseStorage with slow hashing, long passwords

Spraying stays below lockout thresholds: a few attempts per account, spread out over time, trigger nothing. In early 2024, Microsoft said a group linked to Russian intelligence had got into an old test account without two-factor authentication this way, before reaching its senior leadership’s mailboxes.

Where attackers try.

  • Online email: Microsoft 365, Google Workspace, and access via legacy protocols that ask only for a password.
  • Remote desktop exposed to the internet, tried constantly by automated tools.
  • The VPN and remote access portals.
  • Websites: the WordPress login page, an online shop’s back office.
  • SSH on exposed servers.

A server put online receives its first login attempts very quickly, then continuously. The question is not whether it will be tried, but whether the attempt can succeed.

The countermeasures.

  1. Two-factor authentication on everything reachable from the internet: email, VPN, admin accounts. A discovered password is no longer enough.
  2. Long, unique passwords, kept in a password manager. The CNIL sets out benchmarks in its 2022 recommendation: at least 12 characters mixing upper case, lower case, numbers and special characters, or a passphrase of at least 7 words, when the password is the only means of authentication.
  3. A temporary lockout after several failed attempts, and rejection of passwords found in known leak lists.
  4. Close what doesn’t need to be open: no exposed remote desktop, key-only SSH, admin pages restricted to specific addresses.
  5. Disable legacy login protocols that bypass two-factor authentication.

Spotting an attack in progress.

Sign-in logs tell the story of the attack: a series of failures on one account, scattered failures across many accounts from the same addresses, then, on the day it succeeds, a sign-in from an unusual country or device. These are the signals that a SIEM correlates and a SOC monitors.

If an attacker has got into an account, change its password, end its active sessions, check its mailbox forwarding rules and follow the hacked email account page.

On the website side.

Website login pages are tried constantly. Limit attempts with a plugin or at server level, never use admin as a username, turn on two-factor authentication for administrator accounts and keep the site up to date. A site with a brute-forced account is then used to spread spam or malware: the hacked website page tells you what to do.

If your site manages customer accounts, store their passwords with slow hashing: a stolen database then holds out much longer. The difference between hashing and encryption is explained on the encryption page.

Bonbay. Updated 15 November 2026.

Your questions.

How long does it take to guess a password?

It depends on its length, its make-up and how it is stored. Against a login page that limits attempts, a password that is not on common lists holds out for a long time. Against a stolen, poorly protected password database, the attacker tries billions of combinations per second offline using graphics cards: a short password falls quickly, even one packed with symbols.

What is credential stuffing?

It is the automated reuse of username and password pairs stolen from one site to try to log in to other services. It works because many people use the same password everywhere. A different password for each service, held in a password manager, makes it useless.

Should an account be locked after several failed attempts?

Yes, in moderation. A temporary lockout after a few failed attempts slows the attacker down without inconveniencing for long a user who made a mistake, whereas a permanent lockout would let anyone lock your accounts at will. Microsoft Entra ID already applies smart lockout, which distinguishes attempts from unfamiliar locations.

How do you know if your accounts are being targeted?

The sign-in logs show it: a series of failures on one account, or a single failure on dozens of accounts from the same address. You can read them in Entra ID for Microsoft 365, and in the admin console for Google Workspace. The Have I Been Pwned website also tells you whether an email address appears in a known breach.

Is a complex password enough?

Length matters more than special characters: a passphrase of several words holds up better than a short word stuffed with symbols. Yet even a good password can be stolen through phishing or spyware. That is why two-factor authentication remains the most important safeguard for accounts accessible from the internet.

Further reading.

Le sujet plus largeCyber glossaryThis glossary explains the cybersecurity terms business leaders come across most often, grouped into three families: threats, such as ransomware and phishing; protections, such as two-factor authentication and firewalls; and monitoring services, such as SOC, SIEM and MDR.On the same subjectSOCThe team that monitors alerts, investigates and responds, in-house or outsourced.On the same subjectMDRAn external team monitors your workstations and acts: the service built around EDR.On the same subjectSOARThe software that runs the response to an alert on its own, under an analyst's supervision.On the same subjectDefence in depthStack independent protections so that a single failure is never enough.On the same subjectSIEMThe tool that collects logs, links them and produces the alerts the SOC reads.On the same subjectZero trustChecking every access against identity, device and context, step by step.On the same subjectTwo-factor authenticationA second proof on top of the password: methods, MFA fatigue, accounts to protect.On the same subjectEncryptionMake your data unreadable without the key, and keep the key safe.On the same subjectHacked e-mail accountWhen a business email account is hacked, Bonbay Cyber first regains control of it: password changed from a clean device, sessions closed, two-factor authentication enabled.On the same subjectThe basic measuresTen practical measures for an SME, with their indicative cost and timescale.Bonbay Académie · With another serviceCours d'intelligence artificielleLes cours et le glossaire de Bonbay Académie pour comprendre l'IA avant de s'en servir.Bonbay IA · With another serviceComprendre l'intelligence artificielleLe guide et le lexique de Bonbay IA : définitions, types d'IA, limites.Bonbay, le groupe · With another serviceRançongiciel : vos sauvegardes tiendraient-elles ?Les questions à se poser sur ses sauvegardes, par le groupe Bonbay.