1. Resources
  2. Detection rules
  3. Password Guessing (Account Lockout)

Password Guessing (Account Lockout) detection rules

Repeated wrong passwords for one account end in a lockout once the domain's threshold is reached. Detected as the lockout event (4740) and as bursts of wrong-password failures (4771, 4776) for one account.

Platform
Active Directory
Severity
Low
Log source
Windows Security event log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
A user name in the domain, and network access to any service that validates domain credentials.
Impact
A correct guess gives the attacker the account and everything it can reach, and a wrong series locks the user out.
Response
Block the source of the failed attempts at the service it reached, and reset the password of any account that logged on successfully after the failures.
Mitigation
Set an account lockout threshold, and require multifactor authentication on every externally reachable service that accepts domain credentials.
Event IDs
4771462547764740

How the attack works

Password guessing is the oldest way into an account. The attacker tries likely passwords for a known user name against anything that checks domain credentials: a domain controller, a VPN, a mail or web front end. When the number of failed attempts reaches the account lockout threshold of the domain, the account is locked until the lockout duration has passed or an administrator unlocks it.

A domain controller records the moment of the lockout in event 4740, with the account that was locked and, as Caller Computer Name, the computer from which the failing attempts were received. It is one event at the end of a series. It says that the threshold was reached, not how the attempts were spread or what was tried. Careful attackers stay below the threshold on purpose, with few passwords per account over a long time or one password across many accounts (password spraying), and cause no lockout at all. A domain whose threshold is 0, the default, never locks an account and never writes the event.

Two further rules on this page count the failures themselves, one for Kerberos (event 4771 with status 0x18) and one for NTLM (event 4776 with status 0xC000006A). They fire when one account collects ten or more wrong-password failures from one source within ten minutes. They do not depend on the lockout threshold, so they also work in a domain that never locks an account, and the count and the time span are starting points to adjust. A third counting rule reads event 4625 with the code 0xC000006A, the logon failure written by the computer that received the logon, so it also covers member servers and names the source address. A fourth counting rule turns the grouping around and counts, per account, the distinct addresses that failed Kerberos pre-authentication with a wrong password, so that guessing spread over many sources is seen as well.

Most lockouts are not attacks. Devices and services that keep using an old password after a change, mapped drives, mobile mail clients and scheduled tasks account for the bulk of them. The event is therefore a low-severity signal. It is useful as a starting point and for accounts that matter, and it is not proof of an attack.

What an attacker needs

  • A user name in the domain, and network access to any service that validates domain credentials.
  • For the event to exist, an account lockout threshold above 0 in the policy that applies to the account.

Impact

A correct guess gives the attacker the account and everything it can reach. A wrong series locks the user out, and Microsoft points out that locking many accounts on purpose is a denial of service that needs no credentials. Guessing against privileged and service accounts aims directly at administrative access.

Detection rules

Repeated Kerberos Wrong-Password Failures for One Account From One Source

Counts event 4771 (Kerberos pre-authentication failed) with failure code 0x18, which Microsoft documents as a wrong password, per account and client address. Ten or more failures for one account from one source within 10 minutes are more than a mistyped password: either someone is guessing the password, or a device or service keeps presenting an old one. Unlike the lockout event (4740), the count also works in a domain whose lockout threshold is 0 and for the built-in Administrator account, which the lockout policy does not lock, and it names the client address. The count and the window are starting points to tune. Keep the count at or below the lockout threshold of the domain: once an account is locked, further requests fail with a different code (0x12 in event 4768) and are no longer counted. Requires failure auditing in the subcategory Audit Kerberos Authentication Service on domain controllers.

Fires when one combination of TargetUserName and IpAddress has at least 10 matching events within 10 minutes.

Threshold ruleLevelLowStatusExperimentalLog sourceWindows Security event log
title: Kerberos Pre-Authentication Failure With a Wrong Password (Guessing Base Event)
id: 04aeba50-6972-430c-8084-75db1ac490bf
name: kerberos_wrong_password_one_account
status: experimental
description: >-
  Base event of the threshold rule in this file. Event 4771 (Kerberos
  pre-authentication failed) with failure code 0x18, KDC_ERR_PREAUTH_FAILED,
  which Microsoft documents as a wrong password.
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4771
    Status: '0x18'
  condition: selection
level: low
---
title: Repeated Kerberos Wrong-Password Failures for One Account From One Source
id: 277e78ca-19ac-44b3-9150-6d034a56fe7d
status: experimental
description: >-
  Counts event 4771 (Kerberos pre-authentication failed) with failure code
  0x18, which Microsoft documents as a wrong password, per account and client
  address. Ten or more failures for one account from one source within 10
  minutes are more than a mistyped password: either someone is guessing the
  password, or a device or service keeps presenting an old one. Unlike the
  lockout event (4740), the count also works in a domain whose lockout
  threshold is 0 and for the built-in Administrator account, which the lockout
  policy does not lock, and it names the client address. The count and the
  window are starting points to tune. Keep the count at or below the lockout
  threshold of the domain: once an account is locked, further requests fail
  with a different code (0x12 in event 4768) and are no longer counted.
  Requires failure auditing in the subcategory Audit Kerberos Authentication
  Service on domain controllers.
references:
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4771
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/account-lockout-threshold
  - https://attack.mitre.org/techniques/T1110/001/
author: Forestall
date: 2026-11-15
tags:
  - attack.credential-access
  - attack.t1110.001
correlation:
  type: event_count
  rules:
    - kerberos_wrong_password_one_account
  group-by:
    - TargetUserName
    - IpAddress
  timespan: 10m
  condition:
    gte: 10
falsepositives:
  - Devices, services, scheduled tasks and mapped drives that keep presenting an old password after a password change. They retry at fixed intervals and are the most common cause. Fix the stored credential instead of excluding the account.
  - Computer accounts (names that end with a dollar sign) whose machine password is out of step with the domain. Treat them as a broken secure channel unless the source address does not belong to that computer.
  - Kerberos clients can retry a failed request by themselves, so one mistyped password can produce more than one event. The values of 10 failures and 10 minutes are starting points, not tested limits. Adjust them to your lockout threshold and to the retry behaviour you observe.
level: low

False positives

  • Devices, services, scheduled tasks and mapped drives that keep presenting an old password after a password change. They retry at fixed intervals and are the most common cause. Fix the stored credential instead of excluding the account.
  • Computer accounts (names that end with a dollar sign) whose machine password is out of step with the domain. Treat them as a broken secure channel unless the source address does not belong to that computer.
  • Kerberos clients can retry a failed request by themselves, so one mistyped password can produce more than one event. The values of 10 failures and 10 minutes are starting points, not tested limits. Adjust them to your lockout threshold and to the retry behaviour you observe.

One Account Failed Kerberos Pre-Authentication From Many Source Addresses

Counts, per account, the distinct client addresses from which a domain controller logged event 4771 with failure code 0x18 (wrong password). The other counting rules on this page group by account and source, so guessing that is spread over many addresses stays under them. One account that fails from 5 or more different addresses within 30 minutes is being tried from many places at once. The threshold and the window are starting points to tune. Requires failure auditing in the subcategory Audit Kerberos Authentication Service on domain controllers.

Fires when one TargetUserName has at least 5 different IpAddress values within 30 minutes.

Threshold ruleLevelMediumStatusExperimentalLog sourceWindows Security event log
title: Kerberos Pre-Authentication Failure With a Wrong Password (Distributed Guessing Base Event)
id: ea8dda38-eebc-4739-bae8-12c15f1ca0a8
name: kerberos_wrong_password_one_account_many_sources
status: experimental
description: >-
  Base event of the threshold rule in this file. Event 4771 (Kerberos
  pre-authentication failed) with failure code 0x18, which Microsoft documents
  as a wrong password.
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4771
    Status: '0x18'
  condition: selection
level: low
---
title: One Account Failed Kerberos Pre-Authentication From Many Source Addresses
id: 5e30db25-3b85-4ff2-82a9-bae8d5e64bef
status: experimental
description: >-
  Counts, per account, the distinct client addresses from which a domain
  controller logged event 4771 with failure code 0x18 (wrong password). The
  other counting rules on this page group by account and source, so guessing
  that is spread over many addresses stays under them. One account that fails
  from 5 or more different addresses within 30 minutes is being tried from
  many places at once. The threshold and the window are starting points to
  tune. Requires failure auditing in the subcategory Audit Kerberos
  Authentication Service on domain controllers.
references:
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4771
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-kerberos-authentication-service
  - https://attack.mitre.org/techniques/T1110/001/
author: Forestall
date: 2026-11-18
tags:
  - attack.credential-access
  - attack.t1110.001
correlation:
  type: value_count
  rules:
    - kerberos_wrong_password_one_account_many_sources
  group-by:
    - TargetUserName
  timespan: 30m
  condition:
    field: IpAddress
    gte: 5
falsepositives:
  - A user who changed the password while several devices, such as a laptop, a phone and a tablet, still use the old one, above all on networks that hand out new addresses often. Their failures come from the user's own devices at regular intervals.
  - Shared or service accounts used on many computers after a password change that was not rolled out everywhere.
  - The values of 5 addresses and 30 minutes are starting points, not tested limits. Measure how many addresses one account normally fails from and adjust both.
level: medium

False positives

  • A user who changed the password while several devices, such as a laptop, a phone and a tablet, still use the old one, above all on networks that hand out new addresses often. Their failures come from the user's own devices at regular intervals.
  • Shared or service accounts used on many computers after a password change that was not rolled out everywhere.
  • The values of 5 addresses and 30 minutes are starting points, not tested limits. Measure how many addresses one account normally fails from and adjust both.

Repeated Wrong-Password Logon Failures for One Account From One Source Address

Counts event 4625 (an account failed to log on) with the code 0xC000006A in Status or Sub Status, which Microsoft documents as a logon with a misspelled or bad password, per account and source network address. Ten or more failures for one account from one address within 10 minutes are more than a mistyped password: either someone is guessing the password, or a device or service keeps presenting an old one. Event 4625 is written by the computer on which the logon was attempted, so the rule also covers member servers that forward their Security log, and it names the source address and the logon type, which the NTLM event of the domain controller (4776) does not. The count and the window are starting points to tune, and the count should stay at or below the lockout threshold of the domain, because Microsoft documents a different status (0xC0000234) for a logon to a locked account. Requires failure auditing in the subcategory Audit Logon.

Fires when one combination of TargetUserName and IpAddress has at least 10 matching events within 10 minutes.

Threshold ruleLevelLowStatusExperimentalLog sourceWindows Security event log
title: Logon Failure With a Wrong Password (Guessing Base Event)
id: cfc9b213-5222-468a-8cdd-5c88938c7a19
name: logon_wrong_password_one_account
status: experimental
description: >-
  Base event of the threshold rule in this file. Event 4625 (an account failed
  to log on) with the code 0xC000006A in Status or Sub Status, which Microsoft
  documents as a user logon with a misspelled or bad password.
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4625
  selection_wrong_password:
    - Status: '0xc000006a'     # the event XML writes the code in lowercase
    - SubStatus: '0xc000006a'
  condition: selection and selection_wrong_password
level: low
---
title: Repeated Wrong-Password Logon Failures for One Account From One Source Address
id: d454fc1a-65e2-45f8-81d2-7964d9fbaa9b
status: experimental
description: >-
  Counts event 4625 (an account failed to log on) with the code 0xC000006A in
  Status or Sub Status, which Microsoft documents as a logon with a misspelled
  or bad password, per account and source network address. Ten or more
  failures for one account from one address within 10 minutes are more than a
  mistyped password: either someone is guessing the password, or a device or
  service keeps presenting an old one. Event 4625 is written by the computer
  on which the logon was attempted, so the rule also covers member servers
  that forward their Security log, and it names the source address and the
  logon type, which the NTLM event of the domain controller (4776) does not.
  The count and the window are starting points to tune, and the count should
  stay at or below the lockout threshold of the domain, because Microsoft
  documents a different status (0xC0000234) for a logon to a locked account.
  Requires failure auditing in the subcategory Audit Logon.
references:
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4625
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-logon
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/account-lockout-threshold
  - https://attack.mitre.org/techniques/T1110/001/
author: Forestall
date: 2026-11-16
tags:
  - attack.credential-access
  - attack.t1110.001
correlation:
  type: event_count
  rules:
    - logon_wrong_password_one_account
  group-by:
    - TargetUserName
    - IpAddress
  timespan: 10m
  condition:
    gte: 10
falsepositives:
  - Devices, services, scheduled tasks, mail clients and mapped drives that keep presenting an old password after a password change. They retry at fixed intervals and are the most common cause. Fix the stored credential instead of excluding the account.
  - Events without a usable source address. A server that performs the logon on behalf of remote users, such as a web or mail front end, can record no address or its own, so failures from different clients are counted together for the account. Read the log of that service to find the client addresses.
  - The values of 10 failures and 10 minutes are starting points, not tested limits. Adjust them to your lockout threshold and to the retry behaviour you observe.
level: low

False positives

  • Devices, services, scheduled tasks, mail clients and mapped drives that keep presenting an old password after a password change. They retry at fixed intervals and are the most common cause. Fix the stored credential instead of excluding the account.
  • Events without a usable source address. A server that performs the logon on behalf of remote users, such as a web or mail front end, can record no address or its own, so failures from different clients are counted together for the account. Read the log of that service to find the client addresses.
  • The values of 10 failures and 10 minutes are starting points, not tested limits. Adjust them to your lockout threshold and to the retry behaviour you observe.

Repeated NTLM Wrong-Password Failures for One Account From One Workstation

Counts event 4776 (the computer attempted to validate the credentials for an account) with error code 0xC000006A, which Microsoft documents as a logon with a misspelled or bad password, per account and source workstation name. Ten or more failures for one account from one workstation within 10 minutes are more than a mistyped password: either someone is guessing the password over NTLM, or a device or service keeps presenting an old one. The count also works in a domain whose lockout threshold is 0. The event holds the workstation name the client reported and no network address; read the logon failure events (4625) of the server that received the logons to find the address. The count and the window are starting points to tune, and the count should stay at or below the lockout threshold of the domain, because a locked account fails with a different error code (0xC0000234). Requires failure auditing in the subcategory Audit Credential Validation on domain controllers.

Fires when one combination of TargetUserName and Workstation has at least 10 matching events within 10 minutes.

Threshold ruleLevelLowStatusExperimentalLog sourceWindows Security event log
title: NTLM Credential Validation Failure With a Wrong Password (Guessing Base Event)
id: 91ceef6d-7740-4d0d-8499-414ccec17cad
name: ntlm_wrong_password_one_account
status: experimental
description: >-
  Base event of the threshold rule in this file. Event 4776 (the computer
  attempted to validate the credentials for an account) with error code
  0xC000006A, which Microsoft documents as an account logon with a misspelled
  or bad password.
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4776
    Status: '0xc000006a'  # the event XML writes the code in lowercase
  condition: selection
level: low
---
title: Repeated NTLM Wrong-Password Failures for One Account From One Workstation
id: f0cc612e-f257-449a-aff9-1622bce437e7
status: experimental
description: >-
  Counts event 4776 (the computer attempted to validate the credentials for an
  account) with error code 0xC000006A, which Microsoft documents as a logon
  with a misspelled or bad password, per account and source workstation name.
  Ten or more failures for one account from one workstation within 10 minutes
  are more than a mistyped password: either someone is guessing the password
  over NTLM, or a device or service keeps presenting an old one. The count
  also works in a domain whose lockout threshold is 0. The event holds the
  workstation name the client reported and no network address; read the logon
  failure events (4625) of the server that received the logons to find the
  address. The count and the window are starting points to tune, and the count
  should stay at or below the lockout threshold of the domain, because a
  locked account fails with a different error code (0xC0000234). Requires
  failure auditing in the subcategory Audit Credential Validation on domain
  controllers.
references:
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4776
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-credential-validation
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4625
  - https://attack.mitre.org/techniques/T1110/001/
author: Forestall
date: 2026-11-15
tags:
  - attack.credential-access
  - attack.t1110.001
correlation:
  type: event_count
  rules:
    - ntlm_wrong_password_one_account
  group-by:
    - TargetUserName
    - Workstation
  timespan: 10m
  condition:
    gte: 10
falsepositives:
  - Devices, services, scheduled tasks, mail clients and mapped drives that keep presenting an old password after a password change. They retry at fixed intervals and are the most common cause. Fix the stored credential instead of excluding the account.
  - Applications and appliances that authenticate with NTLM and retry on failure, such as printers, scanners and monitoring tools with a stored account. Identify them by Workstation.
  - The values of 10 failures and 10 minutes are starting points, not tested limits. Adjust them to your lockout threshold and to the retry behaviour you observe.
level: low

False positives

  • Devices, services, scheduled tasks, mail clients and mapped drives that keep presenting an old password after a password change. They retry at fixed intervals and are the most common cause. Fix the stored credential instead of excluding the account.
  • Applications and appliances that authenticate with NTLM and retry on failure, such as printers, scanners and monitoring tools with a stored account. Identify them by Workstation.
  • The values of 10 failures and 10 minutes are starting points, not tested limits. Adjust them to your lockout threshold and to the retry behaviour you observe.

User Account Locked Out

Detects event 4740 (a user account was locked out), which a domain controller writes when the failed logon attempts for an account reach the account lockout threshold. It is the single-event trace of password guessing against one account, and equally of a device or service that keeps using an old password. The event names the locked account and the computer the attempts came from (Caller Computer Name, stored in the TargetDomainName field of the event data). Guessing that stays below the threshold, and password spraying, cause no lockout and are not detected. The event is not written at all when the lockout threshold is 0, which is the default. Requires the audit subcategory Audit User Account Management.

LevelLowStatusExperimentalLog sourceWindows Security event log
title: User Account Locked Out
id: e11ce418-4207-4ddf-be1c-2ccee0674f96
status: experimental
description: >-
  Detects event 4740 (a user account was locked out), which a domain controller
  writes when the failed logon attempts for an account reach the account
  lockout threshold. It is the single-event trace of password guessing against
  one account, and equally of a device or service that keeps using an old
  password. The event names the locked account and the computer the attempts
  came from (Caller Computer Name, stored in the TargetDomainName field of the
  event data). Guessing that stays below the threshold, and password spraying,
  cause no lockout and are not detected. The event is not written at all when
  the lockout threshold is 0, which is the default. Requires the audit
  subcategory Audit User Account Management.
references:
  - https://attack.mitre.org/techniques/T1110/001/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4740
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/account-lockout-threshold
author: Forestall
date: 2026-11-14
tags:
  - attack.credential-access
  - attack.t1110.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4740
  condition: selection
falsepositives:
  - Users who mistype or forget a password, and devices, mapped drives, mail clients, services and scheduled tasks that keep presenting an old password after a change. These are the majority of lockouts. Use the rule as a starting point for privileged and service accounts, or count lockouts per source in your SIEM, instead of alerting on every event.
level: low

False positives

  • Users who mistype or forget a password, and devices, mapped drives, mail clients, services and scheduled tasks that keep presenting an old password after a change. These are the majority of lockouts. Use the rule as a starting point for privileged and service accounts, or count lockouts per source in your SIEM, instead of alerting on every event.

Triage

  • Read the Caller Computer Name. A domain workstation or server points to a stale credential on that machine. An unknown name, a mail or VPN front end, or an empty value needs a closer look.
  • Look at the failed logons for the account before the lockout (4625, 4771 and 4776 on domain controllers). Regular failures at fixed intervals point to a device with an old password, while bursts from an unusual source point to guessing.
  • Check whether other accounts were locked or had failures from the same source at the same time, which indicates guessing or spraying across accounts.
  • Give priority to privileged, service and executive accounts, and to accounts that should never be used interactively.
  • After the lockout ends, look for a successful logon to the same account from the same source. A success after a series of failures is the event that matters.

Response

Once the attack is confirmed:

  1. Block the source of the failed attempts at the service it reached, for example on the VPN, mail or web front end. If the Caller Computer Name is a domain machine and no stale credential on it explains the attempts, isolate that machine and examine it.
  2. If a successful logon followed the failures, treat the account as compromised. Reset its password, end its sessions and review what it accessed after that logon.
  3. Reset the passwords of the privileged and service accounts that were targeted, with or without a seen success. The lockout event shows that the threshold was reached, not everything that was tried.
  4. Unlock the affected accounts only after the source is blocked, so that the next round of attempts does not lock the users out again.
  5. Watch the targeted accounts and the source for new failed logons (4625, 4771 and 4776) and new lockouts over the following days, including attempts that stay below the threshold.

Mitigation

  • Set an account lockout threshold that stops guessing without making accidental lockouts routine. The Windows security baselines recommend 10 failed attempts. Apply stricter fine-grained password policies to privileged accounts.
  • Require multifactor authentication on every externally reachable service that accepts domain credentials, so that a guessed password is not enough.
  • Block weak and known-compromised passwords, and give service accounts long random passwords or replace them with group managed service accounts.
  • Limit which services that accept domain credentials are reachable from the internet, and retire protocols that cannot enforce modern controls.
  • Enable the audit subcategory Audit User Account Management on domain controllers, and collect failed logon events (4625, 4771 and 4776) to see the attempts that led to a lockout.

Frequently asked questions

Why did a password spraying attack produce no lockout events?

Spraying tries one password across many accounts, so no single account reaches the lockout threshold and no event 4740 is written. The counting rules on this page do not see it either, because they count failures for one account. Spraying shows as one source that fails for many accounts, which needs a count across accounts.

Why is event 4740 never written in our domain?

The event exists only where accounts can be locked. A lockout threshold of 0, which is the default, never locks an account and never writes the event. The audit subcategory Audit User Account Management must also be enabled on domain controllers. The rules on this page that count wrong-password failures (events 4771 and 4776) do not depend on the threshold and still work in such a domain.

Which field of the collected event holds the computer the failed attempts came from?

Event Viewer shows it as Caller Computer Name. In the event data it is stored in the TargetDomainName field, which is easy to mistake for a domain name. A domain workstation or server there points to a stale credential on that machine, while an unknown name, a mail or VPN front end, or an empty value needs a closer look.

Why should the failure count of the counting rules stay at or below the lockout threshold?

Once an account is locked, further attempts fail with a different code (0x12 in event 4768 for Kerberos, 0xC0000234 in event 4776 for NTLM) and are no longer counted. A count set above the lockout threshold of the domain can therefore never be reached. The count and the time span in those rules are starting points to adjust to your threshold and to the retry behaviour you observe.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.