1. Resources
  2. Detection sources
  3. Event ID 4625

Event ID 4625: An account failed to log on

Written on the computer where a logon attempt failed, with the reason in Status and Sub Status, the logon type and the source address. The event behind password guessing, spraying and account enumeration detection on servers.

Log source
Windows Security log
Detection value
Supporting
Volume
Medium
Last updated
Audit subcategory
Audit Logon (Logon/Logoff, Failure)
Logged on
All Windows computers
Event versions
0
Detects
2 attacks (2 rules)
MITRE ATT&CK
2 techniques in 1 tactic
Threat groups
14 groups that MITRE ATT&CK records using these techniques
Fields the rules read
TargetUserNameStatusSubStatusIpAddress

When it is written

Windows writes 4625 on the computer where a logon was attempted, each time the attempt fails: the workstation for a failed sign-in at its keyboard, the server for a failed network or Remote Desktop logon to it. Microsoft lists it on domain controllers, member servers and workstations. Status and Sub Status give the reason as NTSTATUS codes, Failure Reason gives it in words, and the event also records the logon type, the source address and the authentication package. A successful logon is event 4624.

Microsoft lists the event under two subcategories: Audit Logon, and Audit Account Lockout for a logon refused because the account is already locked out. Turn on failure auditing in both to see every failure; the wrong-password failures the rules count belong to Audit Logon. For a domain account, the domain controller that checked the password also logs the failure, as 4771 (Kerberos) or 4776 (NTLM), but only the computer that was reached writes 4625 with the logon type.

How to turn it on

Advanced audit policy subcategory Audit Logon, Failure. Set it in a Group Policy object linked to the computers that write the event:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Logon/Logoff > Audit Logon
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccess and FailureMicrosoft's general and stronger baselines both recommend Success and Failure auditing. Successes show which account logged on, when, with which logon type and from which computer; failures show the failed attempts and why they failed.
Member serversSuccess and FailureMicrosoft's general and stronger baselines both recommend Success and Failure auditing. Successes show which account logged on, when, with which logon type and from which computer; failures show the failed attempts and why they failed.
WorkstationsSuccess and FailureMicrosoft's general and stronger baselines both recommend Success and Failure auditing. Successes show which account logged on, when, with which logon type and from which computer; failures show the failed attempts and why they failed.
Check the current setting
auditpol /get /subcategory:"Logon"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Logon" /failure:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9215-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.

Run the commands in an elevated prompt on a computer that writes the event. Subcategory settings take effect only when the security option Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is enabled (the default), and a Group Policy object that sets advanced audit policy replaces local changes at its next refresh. Microsoft's advanced audit policy reference

Fields

In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.

FieldWhat it holdsSince
Security IDSubjectUserSidSubjectAccount on this computer that requested the logon, for example the local system (S-1-5-18) when Winlogon handles a sign-in, as in Microsoft's example. Can be the NULL SID S-1-0-0 with no name. Event Viewer resolves SIDs to names.v0
Account NameSubjectUserNameSubjectName of that account; the computer account (ending with $) for the local system, a dash for the NULL SID.v0
Account DomainSubjectDomainNameSubjectDomain or computer name of the subject, as a NetBIOS or DNS name; NT AUTHORITY for some well-known principals.v0
Logon IDSubjectLogonIdSubjectLogon ID of the subject's session, in hexadecimal (0x3e7 for the local system).v0
Logon TypeLogonTypeSubjectKind of logon that was attempted, as a number: 2 interactive, 3 network, 4 batch, 5 service, 7 unlock, 8 network cleartext, 9 new credentials, 10 Remote Desktop, 11 cached interactive.v0
Security IDTargetUserSidAccount For Which Logon FailedSID of the account named in the attempt. Often the NULL SID S-1-0-0, as in Microsoft's example, so identify the account by its name.v0
Account NameTargetUserNameAccount For Which Logon FailedRead by 2 rulesAccount name as it was typed or sent. Names that do not exist appear here too (Sub Status 0xC0000064). Computer accounts end with $.v0
Account DomainTargetDomainNameAccount For Which Logon FailedDomain or computer name given with the account, as a NetBIOS or DNS name; for a local account, the computer name.v0
Failure ReasonFailureReasonFailure InformationThe reason in words, stored as a code that Event Viewer translates, for example %%2313 (Unknown user name or bad password) or %%2307 (Account locked out).v0
StatusFailure InformationRead by 2 rulesReason the logon failed, as an NTSTATUS code in hexadecimal, written in lowercase in the XML (for example 0xc000006d).v0
Sub StatusSubStatusFailure InformationRead by 2 rulesFurther detail on the failure, as an NTSTATUS code; 0x0 when Status says it all. When Status is a generic code such as 0xC000006D or 0xC000006E, read the precise reason here.v0
Caller Process IDProcessIdProcess InformationProcess that attempted the logon (Caller Process ID), in hexadecimal; 0x0 when there is none.v0
Caller Process NameProcessNameProcess InformationFull path of that process (Caller Process Name), such as C:\Windows\System32\winlogon.exe in Microsoft's example; a dash when there is none. Microsoft suggests alerting on processes outside the system folders.v0
Workstation NameWorkstationNameNetwork InformationComputer the attempt came from, as reported by the client. Can be empty, and the client chooses it, so do not treat it as proof of origin.v0
Source Network AddressIpAddressNetwork InformationRead by 2 rulesAddress the attempt came from (Source Network Address): IPv4, IPv6 or ::ffff:IPv4; ::1 or 127.0.0.1 for this computer; a dash when unknown. The spraying and guessing rules group by it.v0
Source PortIpPortNetwork InformationSource port of the remote connection; 0 for interactive logons.v0
Logon ProcessLogonProcessNameDetailed Authentication InformationTrusted logon process that handled the attempt, for example User32 for a sign-in at the keyboard (Microsoft's example) or NtLmSsp for an NTLM network logon.v0
Authentication PackageAuthenticationPackageNameDetailed Authentication InformationPackage used for the attempt: NTLM, Kerberos or Negotiate, which picks Kerberos unless it cannot be used.v0
Transited ServicesTransmittedServicesDetailed Authentication InformationServices the attempt passed through (Transited Services), for an S4U logon. Kerberos only; a dash otherwise.v0
Package Name (NTLM only)LmPackageNameDetailed Authentication InformationNTLM sub-protocol (NTLM V1, NTLM V2 or LM) when the package is NTLM; a dash otherwise.v0
Key LengthKeyLengthDetailed Authentication InformationLength of the NTLM session key in bits; 0 for Kerberos and when no session key was requested.v0

Values to know

Status

ValueMeaningSignal
0xC000006DSTATUS_LOGON_FAILURE, bad user name or authentication informationThe generic code. Read Sub Status for the precise reason, such as a wrong password or an unknown user name.Failure
0xC000006ESTATUS_ACCOUNT_RESTRICTIONThe name and password are valid but an account restriction stopped the logon. Microsoft's authentication package documentation points to Sub Status for the detail.Failure
0xC0000234STATUS_ACCOUNT_LOCKED_OUTThe account was already locked out. Logged under Audit Account Lockout. Repeated lockouts of one account can be guessing; the counting rules stop seeing an account once it is locked.Failure
0xC000015BSTATUS_LOGON_TYPE_NOT_GRANTEDThe account has not been granted the logon type it asked for (for example interactive or network) on this computer.Worth knowing
0xC0000413Authentication firewallThe computer is protected by an authentication firewall and the account is not allowed to authenticate to it.Worth knowing
0xC000005ESTATUS_NO_LOGON_SERVERSNo domain controller was available to check the logon. Microsoft calls it an infrastructure issue rather than a security one.Noise
0xC0000192STATUS_NETLOGON_NOT_STARTEDThe Netlogon service was not running. Also an availability issue.Noise

Sub Status SubStatus

ValueMeaningSignal
0xC000006ASTATUS_WRONG_PASSWORDA wrong password for an existing account. Many for one account from one address is guessing; one address failing for many accounts is a spray. The rules look for it in Status or Sub Status.Attack signal
0xC0000064STATUS_NO_SUCH_USERThe account does not exist. Microsoft notes that several in a row can be a user enumeration attack.Attack signal
0xC0000072STATUS_ACCOUNT_DISABLEDA logon to a disabled account. Worth a look for privileged and departed accounts.Failure
0xC0000193STATUS_ACCOUNT_EXPIREDA logon to an expired account.Failure
0xC000006FSTATUS_INVALID_LOGON_HOURSA logon outside the account's allowed hours.Failure
0xC0000070STATUS_INVALID_WORKSTATIONA logon from a workstation the account may not use.Failure
0xC0000071STATUS_PASSWORD_EXPIREDThe password has expired. Listed by Microsoft for the NTLM validation event 4776.Noise
0xC0000224STATUS_PASSWORD_MUST_CHANGEThe password must be changed at next logon. Listed by Microsoft for event 4776.Noise
0x0No further detailStatus says it all, as with a locked-out account (0xC0000234).Worth knowing

Logon Type LogonType

ValueMeaningSignal
3NetworkA failed logon over the network, for example to a file share, with the address of the client.Worth knowing
10RemoteInteractiveA failed Remote Desktop sign-in.Worth knowing
2InteractiveA failed sign-in at the computer itself.Worth knowing
8NetworkCleartextA network logon whose password reached the authentication package unhashed.Worth knowing
4 or 5Batch or ServiceA scheduled task or service that could not log on under its account, for example because its stored password is wrong or expired. Microsoft recommends monitoring every 4625 of service accounts, which should not be locked out or stopped.Failure

Volume and noise

Failures never stop entirely: mistyped passwords, expired passwords, and services, scheduled tasks, mapped drives and phones that keep presenting an old password after a change. One account failing again and again from the same source at a steady pace is most often such a stale credential. Servers that accept logons from the internet see guessing attempts from it, so their volume depends on their exposure more than on their users.

Some codes are not security events at all: Microsoft describes 0xC000005E (no logon servers available) and 0xC0000192 (Netlogon not started) as infrastructure or availability problems.

Keeping it manageable

  • Keep every failure with 0xC000006A in Status or SubStatus: the guessing and spraying rules count them per account and source address and per distinct account, so filtering them at collection time breaks the counts.
  • Keep 0xC0000064 (the user name does not exist): Microsoft notes that several in a row can be account enumeration.
  • Collect the event from the servers that accept remote logons (Remote Desktop, file, web and mail servers) and not only from domain controllers: only the computer that received the attempt writes it.
  • Route 0xC000005E and 0xC0000192 to operations instead of the SOC.
  • Before alerting on a burst for one account, check whether it is a stale credential: the same workstation name and logon type repeating at a steady interval usually is. Exclude the pair once the owner has fixed or confirmed it.

Sample event

Version 0, with made-up values.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
    <EventID>4625</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>12546</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8010000000000000</Keywords>
    <TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
    <EventRecordID>1048576</EventRecordID>
    <Correlation />
    <Execution ProcessID="712" ThreadID="2408" />
    <Channel>Security</Channel>
    <Computer>FS01.corp.example.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-0-0</Data>
    <Data Name="SubjectUserName">-</Data>
    <Data Name="SubjectDomainName">-</Data>
    <Data Name="SubjectLogonId">0x0</Data>
    <Data Name="TargetUserSid">S-1-0-0</Data>
    <Data Name="TargetUserName">alice</Data>
    <Data Name="TargetDomainName">CORP</Data>
    <Data Name="Status">0xc0000234</Data>
    <Data Name="FailureReason">%%2307</Data>
    <Data Name="SubStatus">0x0</Data>
    <Data Name="LogonType">3</Data>
    <Data Name="LogonProcessName">NtLmSsp</Data>
    <Data Name="AuthenticationPackageName">NTLM</Data>
    <Data Name="WorkstationName">WS042</Data>
    <Data Name="TransmittedServices">-</Data>
    <Data Name="LmPackageName">-</Data>
    <Data Name="KeyLength">0</Data>
    <Data Name="ProcessId">0x0</Data>
    <Data Name="ProcessName">-</Data>
    <Data Name="IpAddress">10.20.30.41</Data>
    <Data Name="IpPort">51512</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

What do Status 0xC000006D and Sub Status 0xC000006A mean in event 4625?

0xC000006D is the generic logon failure, a bad user name or bad authentication information, and Sub Status gives the precise reason. 0xC000006A means the account exists and the password was wrong. One such failure is a typing mistake; many for the same account in a short time are guessing or a device with an old password, and one address failing for many accounts is a password spray.

Which 4625 events point to password spraying?

One source address with wrong-password failures (0xC000006A) for many different accounts in a short time. The library's rule counts the distinct accounts per source address, starting at 10 accounts in 30 minutes, which is a value to tune. Guessing is the opposite shape, many failures for one account, and has its own rule.

Why don't I see 4625 on the domain controller when a user fails to log on to a server?

Event 4625 is written by the computer where the logon was attempted, so the failure is in the server's Security log. The domain controller that checked a domain account's password logs its own event, 4771 for Kerberos or 4776 for NTLM, which has no logon type and, for NTLM, no source address. Collect 4625 from the servers that accept remote logons.

Which 4625 status codes are not security problems?

Microsoft describes 0xC000005E (no logon servers available) and 0xC0000192 (Netlogon not started) as infrastructure or availability issues. Expired passwords (0xC0000071) and passwords that must be changed (0xC0000224) are routine. Wrong passwords, unknown user names, disabled or expired accounts and logons outside allowed hours or workstations deserve attention, especially for privileged and service accounts.

References