Kerberos authentication and NTLM explained with a lab
-
Phase 0: Before you start
-
Phase 1: The foundation
-
Phase 2: Core administration and security
-
Phase 3: Enterprise infrastructure
-
Phase 4: Troubleshooting step by step
-
Phase 5: Final project and career
Before you run any command, double-check it
Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.
Each time Priya opens a share, Windows proves who she is without ever sending her password. Kerberos authentication does this with tickets, and when it can’t, Windows quietly drops back to the older NTLM. Once you know which of the two happened and why, a whole family of “access denied” and “it keeps asking for my password” problems gets much easier.
You’ll look at real tickets with klist and see Kerberos and NTLM side by side in the Security log. Then you’ll register an SPN for a service account, set up time sync properly and break authentication with a clock that’s 10 minutes off.
| Time | You need | By the end you can |
|---|---|---|
| About 75 minutes | DC01, SRV01 and CL01 from Lesson 20 | Read klist output, explain TGTs, service tickets and SPNs, tell Kerberos from NTLM in event 4624, fix time sync and SPN problems |
What it is, in one line
Kerberos authentication is the ticket-based sign-in protocol AD uses. A domain controller hands you tickets that prove who you are to each service, so your password never has to cross the network.
In Simple Words
The theme park wristband
At a theme park you show your ID once at the entrance and get a wristband for the day. At each ride you don’t show the ID again; you show the wristband and the attendant gives you a ride token. Kerberos works the same way: signing in gets you a TGT (the wristband) from the DC, and for each service, a file share for example, you trade the TGT for a service ticket (the ride token).
Wristbands run out at closing time, and if the park’s clocks don’t agree, a perfectly good wristband looks fake. That’s why time matters so much to Kerberos.
Engineer's View
TGT, TGS, SPNs, time and NTLM
Flow: at sign-in the client sends the KDC on a DC an AS-REQ with pre-authentication (a timestamp encrypted with a key made from the password), and gets back a TGT encrypted with the krbtgt account’s key. When it needs a service, it sends that TGT in a TGS-REQ and receives a service ticket encrypted with the service account’s key, which it then presents to the service (AP-REQ). By default a TGT lasts 10 hours and can be renewed for 7 days.
SPNs: a service principal name like cifs/SRV01.saatlab.internal tells the KDC which account runs a service, so it knows whose key to encrypt the ticket with. A missing SPN leads to NTLM fallback, and an SPN on the wrong account leads to KRB_AP_ERR_MODIFIED failures. SPNs have to be unique across the forest.
Time: by default a ticket is rejected when the clocks are more than 5 minutes apart. Members sync with a DC, DCs with the PDC Emulator and the PDC with a reliable outside source, and on VMs you switch off the hypervisor’s own time sync for DCs.
NTLM is challenge-response, and Windows uses it when Kerberos isn’t possible: access by IP address, no SPN, no reachable DC, or workgroup machines. It’s weaker (no mutual authentication, open to relay attacks) and Microsoft is phasing it out, with NTLMv1 already removed in Windows Server 2025.
How it works, step by step
These are all the steps when Priya signs in and then opens \\SRV01\Departments:
The DC only takes part to issue tickets. SRV01 checks the service ticket on its own with its computer account key and reads Priya’s groups from the PAC inside the ticket. That’s also why group changes need a fresh sign-in, because the groups are baked into the tickets she already holds.
When does Windows use Kerberos, and when NTLM?
- Look at Priya’s TGT and service tickets with klist.
- Compare access by name (Kerberos) and by IP (NTLM) in SRV01’s Security log.
- List and register SPNs with setspn.
- Fix time: the PDC Emulator syncs with an external source, and VirtualBox stops changing DC clocks.
Hands-on Lab: Kerberos authentication in saatlab.internal
Start DC01, SRV01 and CL01, then sign in to CL01 as SAATLAB\priya.sharma and open an ordinary PowerShell window.
1Look at Priya’s TGT
On CL01, run this:
klist tgtYou should see something like this (shortened):
Current LogonId is 0:0x5e2c1
Cached TGT:
ServiceName : krbtgt
TargetName (SPN) : krbtgt
ClientName : priya.sharma
DomainName : SAATLAB.INTERNAL
TargetDomainName : SAATLAB.INTERNAL
AltTargetDomainName: SAATLAB.INTERNAL
Ticket Flags : 0x40e10000 -> forwardable renewable initial pre_authent name_canonicalize
Session Key : KeyType 0x12 - AES-256-CTS-HMAC-SHA1-96
StartTime : 10/19/2026 18:02:11 (local)
EndTime : 10/20/2026 4:02:11 (local)
RenewUntil : 10/26/2026 18:02:11 (local)The TGT is for the krbtgt service, lasts 10 hours and can be renewed for 7 days. KeyType 0x12 is AES-256, which is the encryption you want to see; RC4 here would be a warning sign.
✅ Checkpoint: klist tgt shows a krbtgt ticket for priya.sharma with AES-256.
2Get a service ticket for SRV01
On CL01, clear the tickets, open the share by name and list the tickets again:
klist purge
Get-ChildItem \\SRV01.saatlab.internal\Departments | Out-Null
klistYou should see something like this (shortened):
Current LogonId is 0:0x5e2c1
Cached Tickets: (2)
#0> Client: priya.sharma @ SAATLAB.INTERNAL
Server: krbtgt/SAATLAB.INTERNAL @ SAATLAB.INTERNAL
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
...
Kdc Called: DC01.saatlab.internal
#1> Client: priya.sharma @ SAATLAB.INTERNAL
Server: cifs/SRV01.saatlab.internal @ SAATLAB.INTERNAL
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
Ticket Flags 0x40a50000 -> forwardable renewable pre_authent ok_as_delegate name_canonicalize
Start Time: 10/19/2026 18:10:42 (local)
End Time: 10/20/2026 4:02:11 (local)
Kdc Called: DC01.saatlab.internalAfter the purge, Windows silently fetched a new TGT and then a service ticket for cifs/SRV01.saatlab.internal, where cifs is the SPN prefix for file sharing (SMB). The service ticket expires when the TGT does.
✅ Checkpoint: klist shows a krbtgt ticket and a cifs/SRV01.saatlab.internal ticket.
3Access by IP address and see NTLM
On CL01, open the same share by IP address and list the tickets:
Get-ChildItem \\10.0.0.20\Departments | Out-Null
klist | Select-String 'Server:'You should see something like this:
Server: krbtgt/SAATLAB.INTERNAL @ SAATLAB.INTERNAL
Server: cifs/SRV01.saatlab.internal @ SAATLAB.INTERNALIt worked, but there’s no ticket for cifs/10.0.0.20, because an IP address has no SPN, so Windows used NTLM instead. Now check what SRV01 recorded:
On SRV01, in PowerShell as administrator:
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624} -MaxEvents 50 |
Where-Object { $_.Properties[5].Value -eq 'priya.sharma' } |
Select-Object -First 4 TimeCreated, @{n='Package';e={$_.Properties[10].Value}}, @{n='NtlmVersion';e={$_.Properties[14].Value}}You should see something like this:
TimeCreated Package NtlmVersion
----------- ------- -----------
19/10/2026 18:11:05 NTLM NTLM V2
19/10/2026 18:10:42 Kerberos -Event 4624 (successful logon) records which package was used: NTLM V2 for the IP access and Kerberos for the name. Plenty of so-called “Kerberos problems” turn out to be people using IP addresses or aliases that have no SPN.
✅ Checkpoint: SRV01 logged one Kerberos and one NTLM logon for Priya.

4List SPNs and register one for a service account
On DC01, in PowerShell as administrator:
setspn -L SRV01
New-ADUser -Name svc_intranet -Path 'OU=Service Accounts,OU=SAATLAB,DC=saatlab,DC=internal' -AccountPassword (Read-Host -AsSecureString 'Password') -Enabled $true -PasswordNeverExpires $true
setspn -S HTTP/intranet.saatlab.internal SAATLAB\svc_intranetYou should see something like this:
Registered ServicePrincipalNames for CN=SRV01,OU=Servers,OU=SAATLAB,DC=saatlab,DC=internal:
TERMSRV/SRV01.saatlab.internal
WSMAN/SRV01.saatlab.internal
RestrictedKrbHost/SRV01.saatlab.internal
HOST/SRV01.saatlab.internal
TERMSRV/SRV01
WSMAN/SRV01
RestrictedKrbHost/SRV01
HOST/SRV01
Checking domain DC=saatlab,DC=internal
Registering ServicePrincipalNames for CN=svc_intranet,OU=Service Accounts,OU=SAATLAB,DC=saatlab,DC=internal
HTTP/intranet.saatlab.internal
Updated objectHOST/ covers a lot of built-in services, cifs among them, which is why you never had to register cifs/SRV01 yourself. The intranet site in Lesson 25 will run as svc_intranet, so its SPN has to be on that account.
Always use -S, because it checks for duplicates before adding anything. In Lesson 22 you’ll swap this account for a gMSA, which looks after its own password.
✅ Checkpoint: setspn -L lists HOST/SRV01 entries, and HTTP/intranet.saatlab.internal is registered on svc_intranet.
5Set up time sync the right way
On DC01 (the PDC Emulator), point Windows Time at an outside source:
w32tm /config /manualpeerlist:"time.windows.com,0x8" /syncfromflags:manual /reliable:yes /update
Restart-Service w32time
w32tm /resync
w32tm /query /sourceYou should see something like this:
The command completed successfully.
Sending resync command to local computer
The command completed successfully.
time.windows.com,0x8On CL01 (as administrator), check where it gets its time from:
w32tm /query /sourceYou should see something like this:
DC01.saatlab.internalVirtualBox Guest Additions also set the guest clock from your laptop, and on DCs that fights with Windows Time. Shut down DC01 and DC02, run this on your laptop for each of them, and start them again:
On your laptop:
VBoxManage setextradata DC01 "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
VBoxManage setextradata DC02 "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1✅ Checkpoint: DC01 syncs from time.windows.com, CL01 from DC01, and host time sync is off for both DCs.
Break It, Then Fix It
Kerberos tends to break in two familiar ways: a clock that drifts, and an SPN someone tries to register twice.
1Break it: CL01’s clock is 10 minutes fast
Shut down CL01. On your laptop, stop VirtualBox from correcting its clock, then start it:
VBoxManage setextradata CL01 "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
VBoxManage startvm CL01Sign in to CL01 with the local labadmin account and run this in PowerShell as administrator:
Stop-Service w32time
Set-Date (Get-Date).AddMinutes(10) | Out-Null
Get-DateSign out, then sign in as SAATLAB\priya.sharma.
You’ll get an error like this:
The system cannot log you on due to the following error: There is a time and/or date difference between the client and server. Please try again or consult your system administrator.Priya’s password is correct, but her pre-authentication timestamp is 10 minutes ahead of DC01, past the 5-minute limit, so the KDC rejects it as a possible replay. You’ll find Kerberos errors about clock skew in DC01’s System log, and event 4 or something like it from Security-Kerberos in CL01’s System log.
To fix it, sign in as labadmin and let Windows Time correct the clock from the DC:
Start-Service w32time
w32tm /resync /force
w32tm /query /status | Select-String 'Source|Last Successful'You should see something like this:
Sending resync command to local computer
The command completed successfully.
Last Successful Sync Time: 19/10/2026 18:32:07
Source: DC01.saatlab.internalPriya can sign in again. On a real network, look at the PDC Emulator first, because if its time is wrong every computer follows it. Leave VirtualBox time sync off for CL01, since Windows Time keeps it right from DC01.
✅ Checkpoint: Priya couldn’t sign in with a 10-minute skew and can after w32tm /resync.

2Break it: register an SPN that already exists
On DC01, try putting the intranet SPN on SRV01 too:
setspn -S HTTP/intranet.saatlab.internal SRV01You’ll see something like this:
Checking domain DC=saatlab,DC=internal
CN=svc_intranet,OU=Service Accounts,OU=SAATLAB,DC=saatlab,DC=internal
HTTP/intranet.saatlab.internal
Duplicate SPN found, aborting operation!Now try to get round setspn by writing the attribute directly:
Set-ADComputer SRV01 -ServicePrincipalNames @{Add='HTTP/intranet.saatlab.internal'}You’ll get an error like this:
Set-ADComputer : The operation failed because SPN value provided for addition/modification is not unique forest-wide
At line:1 char:1
+ Set-ADComputer SRV01 -ServicePrincipalNames @{Add='HTTP/intranet.saatlab.internal'}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (SRV01:ADComputer) [Set-ADComputer], ADException
+ FullyQualifiedErrorId : ActiveDirectoryServer:8647,Microsoft.ActiveDirectory.Management.Commands.SetADComputerModern DCs flatly refuse duplicate SPNs, but you’ll still find duplicates in older domains that were created before the check existed. When two accounts hold the same SPN, the KDC can’t tell which key to use, and Kerberos to that service fails.
To fix it, find the duplicates and remove the wrong one:
setspn -X
setspn -D HTTP/intranet.saatlab.internal <wrong-account> # only if -X finds a duplicateYou should see something like this:
Checking domain DC=saatlab,DC=internal
Processing entry 0
...
found 0 group of duplicate SPNs.✅ Checkpoint: setspn -S and Set-ADComputer both refused the duplicate, and setspn -X finds none.
This happened at work
The manager who couldn’t open the intranet
After a reorganisation, one senior manager found she couldn’t open any internal websites. Her browser showed “HTTP 400 Bad Request: Request header too long”, yet her assistant at the next desk had no trouble at all. The helpdesk reset her password, rebuilt her profile and even replaced her laptop, and none of it helped, because there was nothing wrong with any of those.
It turned out that over the years she’d been added to more than 1,000 groups, many of them nested. Her Kerberos ticket carries every group SID, and it had grown so big that the HTTP header taking it to IIS went over the server’s limit. File shares kept working because SMB copes with big tickets better than HTTP headers do. The fix: a group cleanup removed hundreds of old memberships and empty nested groups, the web servers’ header limits were raised a little as a safety margin, and a quarterly report now lists anyone in more than 300 groups.
The lesson: group sprawl is more than untidy. It makes tickets bigger and sign-ins slower, and past a certain point authentication fails altogether.
Common mistakes and troubleshooting
| Mistake or symptom | What happens | What to do instead |
|---|---|---|
| Clocks more than 5 minutes apart | “time and/or date difference” sign-in errors | Members sync from DCs, PDC from a reliable source |
| Hypervisor time sync on DCs | DC clocks jump and fight Windows Time | Disable host time sync for DCs |
| Accessing servers by IP address | NTLM instead of Kerberos | Use DNS names; register SPNs for aliases |
| SPN on the wrong account | KRB_AP_ERR_MODIFIED and failed sign-ins to the service | Put the SPN on the account that runs the service |
| Using setspn -A | No duplicate check on older tools | Always setspn -S; check with setspn -X |
| Users in hundreds of groups | Large tickets, HTTP 400 header errors | Clean up groups; watch token size |
| Allowing RC4 and NTLMv1 | Weak, easily attacked authentication | AES only where possible; audit and reduce NTLM |
| “Kerberos is broken” after group changes | Old tickets still in use | klist purge or sign out and in |
| Service accounts with passwords that never change | Ticket keys can be cracked offline (Kerberoasting) | Long random passwords or gMSAs |
Interview questions
Click a question to open it. Each one is phrased the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.
Fresher level
1. Can you explain in simple words how Kerberos signs a user in?
Why they ask this: They want to check the basics of AD authentication and that you know passwords are not sent around the network.
How you might answer: Kerberos is AD’s default authentication protocol. At sign-in, the KDC on a domain controller gives the user a ticket-granting ticket, or TGT. After that the user asks for a service ticket for each service they open, so the password itself never crosses the network. It’s a bit like getting a wristband at the gate and showing it at every ride.
2. A server’s clock is a few minutes off, and users suddenly can’t sign in to it. How much time difference does Kerberos allow?
Why they ask this: They want to see that you know the time rule, because clock problems cause confusing sign-in failures.
How you might answer: By default Kerberos allows 5 minutes of difference, and past that tickets and pre-authentication get rejected. So with a case like this I’d check the server’s time first.
3. How would you check which Kerberos tickets a user has on their PC?
Why they ask this: They want to know if you have used klist in real troubleshooting.
How you might answer: I’d run klist in the user’s own session to list their tickets, and klist tgt shows the ticket-granting ticket. To force fresh tickets I’d clear them with klist purge.
2–5 years experience
4. How would you explain an SPN to a new team member, and why should they care about it?
Why they ask this: They want to see that you understand SPNs, because they are behind many Kerberos failures and NTLM fallbacks.
How you might answer: I’d tell them an SPN, or service principal name, links a service like HTTP/intranet.domain to the account that runs it, and the KDC uses it to pick which account’s key encrypts the ticket. If the SPN is missing, Windows falls back to NTLM, and if it’s wrong or duplicated, Kerberos fails.
5. You find a lot of NTLM traffic in a domain where you expected Kerberos. What usually causes Windows to fall back to NTLM?
Why they ask this: They want to check that you know the common cases, so you can find and fix them.
How you might answer: Usually it’s people connecting by IP address, or there’s no SPN for the name they’re using. It also happens when no DC is reachable, in a workgroup, or across forests with no trust, and some apps only support NTLM anyway.
6. Walk me through how time sync works in an Active Directory domain.
Why they ask this: They want to see that you know the time hierarchy, since Kerberos depends on it.
How you might answer: Member computers sync with a DC, DCs sync with their domain’s PDC Emulator, and the PDC Emulator in the forest root syncs with a reliable outside source. I use w32tm to set it up and check it.
Senior level
7. An app team asks you to enable Kerberos delegation for their web server. What options would you discuss, and what are the risks?
Why they ask this: They want to see that you understand the delegation types and protect sensitive accounts.
How you might answer: Unconstrained delegation is dangerous because the server can impersonate users to any service. Constrained delegation allows only the services you list, and resource-based constrained delegation is set on the target service. I’d push for RBCD or constrained delegation, and protect sensitive accounts with “Account is sensitive and cannot be delegated” or the Protected Users group.
8. Your security team mentions Kerberoasting. What is it, and how would you defend against it?
Why they ask this: They want to know if you understand this common attack and the practical steps that stop it.
How you might answer: Any domain user can request service tickets for accounts with SPNs and then try to crack them offline, and a weak service account password falls quickly. I’d use gMSAs or random passwords of 25 or more characters, allow AES only, and watch event 4769 for RC4 ticket requests.
9. Your company wants to reduce NTLM across a large domain. How would you plan it without breaking things?
Why they ask this: They want to see that you plan a careful, staged migration instead of switching NTLM off in one go.
How you might answer: I’d turn on the NTLM auditing policies first and use the event logs to see who’s still using NTLM. Then I’d fix the causes, like access by IP and missing SPNs, add exceptions where they’re needed, and restrict NTLM a step at a time, server by server.
Quick quiz
Q1. What does Priya get from the DC when she signs in?
- A service ticket
- A TGT
- An NTLM hash
Show answer
B — The TGT is then traded for service tickets.
Q2. Why did accessing \\10.0.0.20 use NTLM?
- The share was hidden
- There’s no SPN for an IP address
- Kerberos was disabled
Show answer
B — Use names, not IPs.
Q3. What stopped Priya signing in during Break It step 1?
- A wrong password
- A 10-minute clock difference
- A missing SPN
Show answer
B — The default limit is 5 minutes.
Q4. Which command adds an SPN with a duplicate check?
- setspn -A
- setspn -S
- setspn -L
Show answer
B — Always use -S.
Q5. In the work story, what caused the HTTP 400 error?
- A broken browser
- A huge ticket from too many groups
- An expired certificate
Show answer
B — Group sprawl made the ticket too big.
Quick recap
- Kerberos authentication uses a TGT from the DC and a service ticket per service;
klistshows them. - SPNs tell the KDC which account runs a service; register them with
setspn -S. - No SPN (or access by IP) means NTLM; event 4624 shows which package was used.
- Keep clocks within 5 minutes: members to DCs, PDC to an external source, no host time sync on DCs.
- Duplicate SPNs are refused by modern DCs; check old domains with
setspn -X. - Large group counts make large tickets.
Next lesson
Lesson 22: Identity security → You’ll deploy Windows LAPS for local admin passwords, replace svc_intranet with a gMSA, add admins to Protected Users, set a fine-grained password policy and look at admin tiering.
Further reading: Kerberos authentication
Want to go deeper into Kerberos authentication? Microsoft’s Windows authentication overview explains Kerberos and NTLM, and the Windows Time service guide covers time sync. You can also see the full plan for this course on the Windows Server Administration course page.
