Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 6 min read

Event 4768 Kerberos TGT Request Failed: A Read-First Result Code, Client Address, and Account Triage

Helpdesk: "A user says they cannot sign in, and the domain controller shows Event 4768 with a Result Code that is not zero. Is the password wrong, the account locked, or is Kerberos itself broken?" Fair question, and th

Helpdesk: "A user says they cannot sign in, and the domain controller shows Event 4768 with a Result Code that is not zero. Is the password wrong, the account locked, or is Kerberos itself broken?"

Fair question, and the first thing to know is where 4768 sits. Event 4768 is the domain controller's record that a Kerberos ticket-granting ticket (TGT) was requested, and the Result Code field tells you whether it was issued. Microsoft's reference says the event "generates every time Key Distribution Center issues a Kerberos Ticket Granting Ticket (TGT)" and "generates only on domain controllers". If issuing fails, you "will see Failure event with Result Code field not equal to 0x0".

One trap up front: Microsoft notes this event "doesn't generate for Result Codes: 0x10 and 0x18". Those wrong-password style failures are logged as Event 4771 instead. So a bad password usually does not show up here at all.

This post is a read-first order: pull the 4768 events from the DCs, split successes from failures, group failures by account and client address, decode the Result Code, check the pre-authentication and encryption fields, then change one thing. It pairs with the Event 4771 Kerberos pre-authentication failed decoder and the Event 4776 NTLM triage.

TL;DR

  • 4768 is the TGT request, logged on the DC. The service name in it is krbtgt.
  • Read Result Code first. 0x0 is success. 0x6 is an unknown user name, 0x12 a revoked client (disabled, expired or locked), 0x25 clock skew.
  • Wrong passwords land in 4771, not 4768, because 0x18 is never logged here.
  • Client Address is the source. ::1 means the request came from the DC itself.
  • Pre-Authentication Type 0 is a flag: it means pre-authentication was not used.

Step 1: Pull the events from every DC (read-only)

Run this in an elevated PowerShell on a domain controller. Each DC only logs the requests it handled, so repeat on every DC or loop over them.

$events = Get-WinEvent -FilterHashtable @{ LogName='Security'; Id=4768; StartTime=(Get-Date).AddHours(-24) } -ErrorAction SilentlyContinue

$rows = foreach ($e in $events) {
    $x = [xml]$e.ToXml()
    $d = @{}
    foreach ($n in $x.Event.EventData.Data) { $d[$n.Name] = $n.'#text' }
    [pscustomobject]@{
        Time    = $e.TimeCreated
        Account = $d.TargetUserName
        Status  = $d.Status
        Client  = $d.IpAddress
        Port    = $d.IpPort
        PreAuth = $d.PreAuthType
        EncType = $d.TicketEncryptionType
        DC      = $e.MachineName
    }
}
"{0} events in 24h" -f @($rows).Count

If the count is zero, check the audit policy. Microsoft lists the subcategory as Audit Kerberos Authentication Service, and it has to be enabled for the result you want to see.

Step 2: Separate failures and group them (read-only)

$fail = $rows | Where-Object { $_.Status -ne '0x0' }

$fail | Group-Object Status  | Sort-Object Count -Descending | Format-Table Count, Name -AutoSize
$fail | Group-Object Account | Sort-Object Count -Descending | Select-Object -First 10 Count, Name
$fail | Group-Object Client  | Sort-Object Count -Descending | Select-Object -First 10 Count, Name

Read the shape before the numbers:

Pattern Likely meaning
One account, one client, steady rate A service or task with a stale or disabled account
One account, many clients The user is signed in on several machines, or the account was disabled or locked
Many accounts, one client, mostly 0x6 Names that do not exist; possible enumeration from that host
Failures clustered at a single 0x25 A client with a wrong clock

Step 3: Decode the Result Code

These are values from Microsoft's table for 4768 that you will meet most often:

Result Code Name Meaning
0x6 KDC_ERR_C_PRINCIPAL_UNKNOWN Client not found in the Kerberos database; the user name does not exist
0x7 KDC_ERR_S_PRINCIPAL_UNKNOWN Server not found in the Kerberos database; the DC cannot find the server name in AD
0x8 Multiple principal entries Microsoft says monitoring this "will help you to find duplicate SPNs faster"
0xC KDC_ERR_POLICY Logon restrictions on the account, such as workstation restriction, smart card requirement or logon time restriction
0x12 KDC_ERR_CLIENT_REVOKED Credentials revoked: account disabled, expired, or locked out
0x17 KDC_ERR_KEY_EXPIRED The user's password has expired
0x25 KRB_AP_ERR_SKEW The clock skew is too great
0x3C Generic error Generic Kerberos problem; Microsoft says monitoring it helps identify problems faster

The two to remember: 0x12 is a broad account-state code, so check disabled, expired and locked before assuming anything else. And 0x25 is time, not credentials; the Windows time sync triage is the fix path.

Step 4: Check the account state for 0x12 and 0xC

Confirm what the directory says before you change anything.

Import-Module ActiveDirectory
Get-ADUser -Identity 'jsmith' -Properties Enabled, LockedOut, AccountExpirationDate, PasswordExpired, LogonWorkstations |
    Select-Object SamAccountName, Enabled, LockedOut, AccountExpirationDate, PasswordExpired, LogonWorkstations

Replace jsmith with the account from the event. A non-empty LogonWorkstations explains a 0xC from a machine that is not on the list. Disabled, expired and locked accounts explain 0x12.

Step 5: Look at Client Address and port

Microsoft's monitoring guidance for this event includes a few simple checks on the source fields:

  • Track requests where Client Address is outside your internal or private ranges.
  • If an account should only be used from known addresses, track every Client Address for it.
  • ::1 means local authentication; flag it if the account should not log on to a DC.
  • Examine requests with a Client Port above 0 and below 1024, because "a well-known port was used for outbound connection".
$rows | Where-Object { [int]$_.Port -gt 0 -and [int]$_.Port -lt 1024 } |
    Select-Object -First 20 Time, Account, Client, Port, Status

An empty result is the normal case.

Step 6: Check pre-authentication and encryption type

Two more fields are worth a pass even when the Result Code is 0x0. Microsoft's table says Pre-Authentication Type 0 means "pre-authentication was not used", and that all accounts should use it except those with "Do not require Kerberos preauthentication", which Microsoft calls "a security risk". Type 2 is the normal password type (PA-ENC-TIMESTAMP) and type 15 is smart card.

For Ticket Encryption Type, Microsoft says values 0x1 or 0x3 mean DES was used and should not be, and that on current systems you should "monitor for values other than 0x11 and 0x12", the AES family.

"Pre-auth type 0:"
$rows | Where-Object { $_.PreAuth -eq '0' } | Group-Object Account | Select-Object Count, Name
"Encryption types in use:"
$rows | Group-Object EncType | Sort-Object Count -Descending | Format-Table Count, Name -AutoSize

Treat a non-AES value as a finding to investigate with the owner of the account or device, not as something to block on sight.

Change one thing

Once the pattern is clear, change exactly one thing and re-run Step 1 an hour later:

  • 0x12 for a service account: fix the account state (enabled, not expired, not locked), then find what keeps using it.
  • 0x25 from one client: fix that machine's time source.
  • 0x6 from one host: isolate the host and tell your security contact; do not change accounts.
  • Pre-auth type 0 for an account: confirm whether "Do not require Kerberos preauthentication" is set on purpose, and review it with the owner.
  • 0x7 or 0x8: look for a missing or duplicate SPN on the target service account.

Common false starts

  • "Reset the password." 0x18 is not even logged in 4768; check 4771 for bad passwords, and Result Code before you reset.
  • "Result Code 0x12 means locked out." It also covers disabled and expired accounts.
  • "4768 failures mean Kerberos is broken." Usually it is one account, one client or one clock.
  • "Block the client address." Confirm it is not a legitimate server or appliance first.
  • "Ignore 0x0 events." Successes still show pre-auth type and encryption type findings.

Related posts

Free checklist

Knowing which accounts authenticate without pre-authentication or with weak ciphers is the same habit as knowing who a new access policy will hit. The free Conditional Access pre-enforcement checklist keeps break-glass accounts, pilot groups, and report-only review on one page:

πŸ‘‰ https://cashflow4375.gumroad.com/l/ujkqxb?utm_source=devto&utm_medium=article&utm_campaign=aps_first_sale&utm_content=event-4768-kerberos-tgt-request-result-code

Sources: Microsoft Learn, "4768(S, F): A Kerberos authentication ticket (TGT) was requested" (Windows security auditing reference). Commands are read-only unless a step says to change something. Test in a lab first.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.