When it is written
A domain controller writes 4771 when its Key Distribution Center refuses a request for a ticket-granting ticket because pre-authentication failed: the wrong password was provided (0x18), the password has expired (0x17), or a smart card sign-in found no suitable certificate on the domain controller (0x10). Microsoft's page for 4768 says a wrong password (0x18) and the smart card case (0x10) are never written as 4768, only here. It does not say that of an expired password, and 0x17 is in the result code table of 4768 too, so look for it in both events. The event is always an Audit Failure.
Only domain controllers write it, and only the one that answered: collect the Security log of every domain controller, because one source can spread its attempts over several. It is not written for accounts that have Do not require Kerberos preauthentication set, so failures of such accounts never appear here. Logons that use NTLM instead of Kerberos fail as event 4776 on the domain controller. Microsoft adds that when a request was damaged in transit and could not be decrypted, many fields of the event can be missing.
How to turn it on
Advanced audit policy subcategory Audit Kerberos Authentication Service, 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 > Account Logon > Audit Kerberos Authentication Service| Computer | Audit | Note |
|---|---|---|
| Domain controllers | Success and Failure | Microsoft's general and stronger baselines both recommend Success auditing (every ticket-granting ticket request, with the client address and the encryption type) and Failure auditing (wrong passwords, unknown user names, revoked certificates and other Kerberos problems), and expect high volume. |
| Member servers | Not logged | Microsoft says the subcategory makes sense only on domain controllers. |
| Workstations | Not logged | Microsoft says the subcategory makes sense only on domain controllers. |
auditpol /get /subcategory:"Kerberos Authentication Service"auditpol /set /subcategory:"Kerberos Authentication Service" /failure:enableauditpol /get /subcategory:"{0CCE9242-69AE-11D9-BED3-505054503030}"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.
| Field | What it holds | Since |
|---|---|---|
Security IDTargetSidAccount Information | SID of that account (Security ID). | v0 |
Account NameTargetUserNameAccount InformationRead by 3 rules | Account whose pre-authentication failed (Account Name), without the domain. Computer accounts end with $. | v0 |
Service NameServiceNameService Information | Service the ticket was requested for: krbtgt/ followed by the domain as a NetBIOS or DNS name, for example krbtgt/CORP.EXAMPLE.COM. | v0 |
Client AddressIpAddressNetwork InformationRead by 3 rules | Address of the client (Client Address): IPv4, IPv6 or ::ffff:IPv4; ::1 for the domain controller itself. The counting rules group by it. | v0 |
Client PortIpPortNetwork Information | Source port of the client connection; 0 for local requests. Microsoft suggests examining values from 1 to 1023, which are well-known ports. | v0 |
Ticket OptionsTicketOptionsAdditional Information | Kerberos options of the request in hexadecimal (RFC 4120); commonly 0x40810010 (forwardable, renewable, canonicalize, renewable-ok). | v0 |
Failure CodeStatusAdditional InformationRead by 3 rules | Failure Code: the Kerberos error in hexadecimal. 0x18 is a wrong password, 0x17 an expired one, 0x10 a smart card certificate problem. | v0 |
Pre-Authentication TypePreAuthTypeAdditional Information | Pre-authentication type the client used, as a number: 2 for a password, 15 or 16 for a smart card or certificate, 138 for armoring (FAST). | v0 |
Certificate Issuer NameCertIssuerNameCertificate Information | Issuer of a smart card certificate. Microsoft states that it is always empty in event 4771. | v0 |
Certificate Serial NumberCertSerialNumberCertificate Information | Serial number of that certificate. Always empty in event 4771, according to Microsoft. | v0 |
Certificate ThumbprintCertThumbprintCertificate Information | Thumbprint of that certificate. Always empty in event 4771, according to Microsoft. | v0 |
Values to know
Failure Code Status
| Value | Meaning | Signal |
|---|---|---|
0x18 | KDC_ERR_PREAUTH_FAILED, wrong passwordMany for one account from one source is guessing, one source failing for many accounts is a spray, and one account failing from many addresses is distributed guessing. Microsoft names repeated 0x18 failures as a possible brute-force attack. | Attack signal |
0x17 | KDC_ERR_KEY_EXPIRED, password expiredThe user's password has expired. Microsoft's page for 4768 excludes only 0x18 and 0x10 from that event and lists 0x17 among its result codes, so look for an expired password in both events. | Noise |
0x10 | KDC_ERR_PADATA_TYPE_NOSUPPSmart card sign-in, but the domain controller has no suitable certificate (Domain Controller or Domain Controller Authentication template) or the right CA cannot be reached. | Worth knowing |
0x25 | KRB_AP_ERR_SKEWClock skew too great between client and domain controller. Listed in Microsoft's code table for this event. | Worth knowing |
Pre-Authentication Type PreAuthType
| Value | Meaning | Signal |
|---|---|---|
2 | PA-ENC-TIMESTAMPStandard password pre-authentication. | Expected |
15 or 16 | PA-PK-AS-REP_OLD or PA-PK-AS-REQSmart card or certificate pre-authentication, as in Microsoft's example with failure code 0x10. Microsoft suggests watching for other types on accounts that must use a smart card. | Worth knowing |
138 | PA-ENCRYPTED-CHALLENGEKerberos armoring (FAST). Microsoft suggests watching for other types where armoring is enforced everywhere. | Expected |
Client Address IpAddress
| Value | Meaning | Signal |
|---|---|---|
::ffff:a.b.c.d | An IPv4 clientIPv4 addresses are often written in this mapped form. Normalize them before grouping or joining with other logs. | Expected |
::1 | The domain controller itselfMicrosoft suggests checking these against the accounts that are allowed to sign in on domain controllers. | Worth knowing |
Outside your ranges | A client outside your internal or private address rangesMicrosoft suggests tracking failures from addresses that are not internal. | Attack signal |
Volume and noise
Failures follow the users: mistyped passwords, expired passwords, and devices, services, scheduled tasks and mapped drives that keep presenting an old password after a change. One account failing from one address at a steady pace is often such a stale credential, and it keeps failing until the device is updated or the account locks. Microsoft rates the subcategory's volume as high on domain controllers; 4771 is only its failure part, so its own volume depends on how many users mistype and how many stale credentials linger.
Keeping it manageable
- Keep every failure with
0x18: the guessing and spraying rules count them per account and address, per address across accounts, and per account across addresses. - Keep the count of the guessing rule at or below the domain's lockout threshold: once an account is locked, further requests fail as event 4768 with
0x12and are no longer counted here. - Leave
0x17(expired password) out of alerting: the user only has to change the password. - Send
0x10to the team that runs the PKI: Microsoft describes it as a smart card problem, a domain controller without a suitable certificate. - Find the stale credentials behind steady failures (same account, same address, regular interval) and fix them at the source; that removes most of the noise and leaves the counts readable.
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>4771</EventID>
<Version>0</Version>
<Level>0</Level>
<Task>14339</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>DC01.corp.example.com</Computer>
<Security />
</System>
<EventData>
<Data Name="TargetUserName">alice</Data>
<Data Name="TargetSid">S-1-5-21-1004336348-1177238915-682003330-1105</Data>
<Data Name="ServiceName">krbtgt/CORP.EXAMPLE.COM</Data>
<Data Name="TicketOptions">0x40810010</Data>
<Data Name="Status">0x18</Data>
<Data Name="PreAuthType">2</Data>
<Data Name="IpAddress">::ffff:10.20.30.41</Data>
<Data Name="IpPort">51244</Data>
<Data Name="CertIssuerName"></Data>
<Data Name="CertSerialNumber"></Data>
<Data Name="CertThumbprint"></Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Detection logic (hypotheses that join this event with others) for:
Frequently asked questions
What does failure code 0x18 mean in event 4771?
0x18 is KDC_ERR_PREAUTH_FAILED. The pre-authentication data was invalid, which Microsoft explains as a wrong password. One failure is a typing mistake. Many for the same account in a short time are guessing or a device that keeps an old password, and Microsoft names repeated 0x18 failures as a possible brute-force attack on the account.
How do I detect password spraying with event 4771?
Count, per client address, the distinct accounts that fail with 0x18 in a time window. A spray tries one or a few passwords against many accounts, so it shows up as one source failing for many accounts rather than one account failing many times. The library's rule starts at 10 accounts in 30 minutes, a value to tune. Collect 4771 from every domain controller, because a spray can spread over several.
Why do I see 4771 failures for a user who is not typing a wrong password?
Often a device or service still uses the user's old password after a change, such as a phone mail client, a mapped drive, a scheduled task or a service. The failures come from the same address at a steady interval. The client address in the event points to the device.
Why is there no 4771 for some failed logons?
It is written only for Kerberos pre-authentication failures. Accounts that do not require Kerberos pre-authentication never produce it, NTLM logons fail as event 4776, and failures for other reasons, such as a locked-out or disabled account (0x12) or an unknown user name (0x6), are logged as event 4768.