SECURITY ENGINEERING · PART 1 · LINUX AND WINDOWS, FROM THE INSIDE · WINDOWS · 19 OF 229

Active Directory Explained: Domains, Kerberos, NTLM

Active Directory, the identity system most companies run, and why attackers love it: domains, domain controllers, users, groups and OUs, how login works with Kerberos and the older NTLM, the all-powerful Domain Admins and KRBTGT account, and the structural weaknesses (one compromised account reaching everything) that Part 7 attacks and this episode starts to defend.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. 14
  14. 15
  15. 16
  16. 17
  17. 18
  18. 19
  19. 20
  20. 21
  21. 22
  22. 23
  23. 24
  24. 25
  25. 26
  26. 27
  27. 28
  28. 29
  29. 30
  30. 31
  31. 32
  32. 33
  33. 34
  34. 35
  35. 36
  36. 37
  37. 38
  38. 39
  39. 40
  40. 41
  41. 42
  42. 43
  43. 44
  44. 45
  45. 46
  46. 47
  47. 48
  48. 49
  49. 50
  50. 51
  51. 52
  52. 53
  53. 54
  54. 55
  55. 56
  56. 57
  57. 58
  58. 59
  59. 60
  60. 61
  61. 62
  62. 63
  63. 64
  64. 106
  65. 107
  66. 108
  67. 109
  68. 110
  69. 111
  70. 112
  71. 113
  72. 114
  73. 115
  74. 116
  75. 117
  76. 118
  77. 119
  78. 120
  79. 121
  80. 122
  81. 123
  82. 124
  83. 125
  84. 126
  85. 127
  86. 128
  87. 129
  88. 130
  89. 131
  90. 132
  91. 133
  92. 134
  93. 135
  94. 136
  95. 137
  96. 138
  97. 139
  98. 140
  99. 141
  100. 142
  101. 143
  102. 144
1 / 12

Press play to hear the narration, or step through at your own pace.

Key takeaways

  • Domains and DCs
  • Kerberos tickets and old NTLM
  • Domain Admins and KRBTGT
  • flat trust creates paths
  • tier and monitor

Notes

What AD is

Active Directory is a central directory of a company's accounts and computers, grouped into a domain. The servers that hold it and check every login are domain controllers. Inside are user accounts, computer accounts and groups, arranged in organisational units, which are folders used to apply settings through Group Policy. The promise is single sign-on: an employee signs in once and reaches every system that trusts the domain. That convenience is exactly what makes it a target.

The building blocks
  • domain: a boundary of accounts and computers, e.g. corp.local
  • domain controller (DC): the server that holds the directory and checks logins
  • users, computers, groups
  • OUs: folders to organise and apply policy (Group Policy)

Kerberos login

Modern Windows login uses Kerberos. You prove your identity once and receive a ticket-granting ticket. When you want a specific service, a file share or an app, you present that ticket to the Kerberos service on the domain controller and get a service ticket for it. You show the service ticket to the file server, which trusts it without ever seeing your password. Passwords are not sent around, and tickets expire. It is elegant, and every step is something an attacker tries to abuse in Part seven.

How Kerberos works
  • 1 log in: get a TGT (ticket-granting ticket)
  • 2 want a service? ask the KDC with your TGT
  • 3 get a service ticket
  • 4 show it to the file server, which never sees your password
  • tickets expire; passwords are not sent around

NTLM, the old way

Older than Kerberos is NTLM, still enabled on most networks for compatibility. It is a challenge-response scheme where the server checks that you can prove knowledge of your password hash. The flaw is that the hash itself is enough to authenticate, so an attacker who steals a hash from LSASS can reuse it directly without ever cracking it. That attack is called pass the hash, and it is why NTLM should be disabled where possible, with its use monitored where it cannot be.

NTLM
  • older challenge-response auth
  • the server checks you can prove knowledge of your password hash
  • problem: the hash itself is enough to authenticate → pass-the-hash
  • disable where you can; prefer Kerberos; monitor NTLM use

The crown jewels

A few things hold all the power. The Domain Admins group controls the entire domain. The domain controllers are the machines that must never be compromised. And one special account, KRBTGT, holds the key that signs every Kerberos ticket. If an attacker steals that key, they can forge a ticket for anyone, including a domain admin, that the domain will accept, the so-called golden ticket. Protecting these few things is most of Active Directory security.

The most powerful accounts
  • Domain Admins: full control of the domain
  • the domain controllers themselves
  • KRBTGT: the account whose key signs all Kerberos tickets (steal it = forge any ticket, the "golden ticket")
  • protect these above all else

Why AD is fragile

Active Directory is fragile by design. Single sign-on means one account reaches many systems. Administrators often log in to ordinary workstations, leaving their powerful credentials in that machine's memory for an attacker to steal. Years of over-broad groups, forgotten accounts and nested memberships create hidden paths from a nobody account up to Domain Admin. A tool called BloodHound maps those paths automatically. You meet it, as a defender, in Part seven.

The structural weakness
  • one login reaches many systems
  • admins log in to normal workstations, leaving their credentials in memory there
  • over-broad groups, old accounts, nested group membership
  • result: a path from any user to Domain Admin, found with BloodHound (Part 7)

Defending AD

The defenses follow from the weaknesses. Tiering: the most powerful admin accounts never log in to ordinary machines, so their credentials are never left where a user could be phished. Admins use separate accounts on hardened workstations. Keep groups least-privilege and remove stale accounts, which shrinks the attack paths. Give service accounts long random passwords. Monitor Kerberos and NTLM for the signs of forged tickets, and rotate the KRBTGT key on a schedule so a stolen one expires.

Core defenses
  • tiering: admin accounts never log in to normal workstations
  • separate admin accounts, with Privileged Access Workstations
  • least privilege on groups; remove stale accounts
  • strong, long service passwords
  • monitor Kerberos and NTLM; alert on golden/silver tickets
  • rotate KRBTGT regularly

What Part 7 covers

To be concrete about where this goes: Part seven covers the named Active Directory attacks and, for each, the fix. Kerberoasting, which cracks weak service-account passwords offline. AS-REP roasting. Pass the hash and pass the ticket, reusing stolen credentials. Golden and silver tickets, forged from stolen keys. And using BloodHound to find and then close the shortest path to Domain Admin. The point of this episode is that none of those make sense until you know how login works, which you now do.

Coming in Part 7
  • Kerberoasting: crack weak service-account passwords
  • AS-REP roasting
  • pass-the-hash / pass-the-ticket
  • golden and silver tickets
  • BloodHound attack paths
  • each with the setting or detection that stops it

If you run AD at home

If you want hands-on practice, build a tiny domain in your own lab: one domain controller and one workstation in virtual machines on an isolated network. There are deliberately vulnerable practice domains, such as Game of Active Directory, built exactly for this. Everything stays on a host-only network that cannot reach anything real. And the rule from Part zero holds absolutely here: never point any of these tools or techniques at a real company domain without written permission.

Lab, don't touch real domains
  • build a small domain in VMs: one DC, one workstation
  • use a deliberately vulnerable lab (e.g. GOAD) to practise
  • everything stays on an isolated host-only network
  • never test a real company domain without written permission

Common mistakes

Mistakes that get a domain taken over. Administrators logging in to ordinary workstations, scattering their credentials. NTLM left fully enabled with no plan to reduce it. Service accounts with weak passwords that crack in minutes. Enormous, nested admin groups nobody can explain. Stale accounts that are never removed and become quiet footholds. A KRBTGT key that has never been rotated. And no monitoring of Kerberos and NTLM, so forged tickets and credential reuse go unseen.

Avoid these
  • admins logging in everywhere
  • NTLM left on with no reason
  • weak service-account passwords
  • huge, nested admin groups
  • stale accounts never removed
  • KRBTGT never rotated
  • no monitoring of Kerberos/NTLM

Say it like this

In the interview: Active Directory is central identity with single sign-on, so compromising it means compromising the whole company. Its flat trust, over-broad groups and the habit of admins logging in everywhere create hidden paths from any account to Domain Admin. I defend it with tiering so admin credentials are never exposed on normal machines, least privilege on groups, regular KRBTGT rotation, strong service-account passwords, and monitoring of Kerberos and NTLM for forged tickets.

In the interview
  • "It is central identity with single sign-on, so taking it
  • over means taking over the company. Flat trust and admins
  • logging in everywhere create
  • paths to Domain Admin. I
  • defend with tiering, least
  • privilege, KRBTGT rotation and Kerberos/NTLM monitoring."

Interview questions

Q1What is Active Directory?

Microsoft’s directory service for Windows networks: a central store of user, computer and group accounts organised into domains, run by domain controllers, providing single sign-on and centralised policy (Group Policy) across an organisation.

Q2How does Kerberos authentication work?

You authenticate once to the domain controller and receive a ticket-granting ticket. To reach a service you present it and get a service ticket, which you show to the service. The service trusts the ticket without seeing your password, and tickets expire.

Q3What is NTLM and why is it risky?

An older challenge-response protocol still enabled for compatibility. Because proving knowledge of the password hash is enough to authenticate, a stolen hash can be reused directly (pass-the-hash). It should be reduced, disabled where possible and monitored.

Q4Why is Active Directory such a common attack target?

It is central identity with single sign-on, so taking it over gives access to the whole organisation. Flat trust, over-broad groups and admins logging in to normal machines create paths from any account up to Domain Admin.

Q5What are the crown jewels of an AD environment?

The Domain Admins group, the domain controllers themselves, and the KRBTGT account whose key signs all Kerberos tickets. Stealing the KRBTGT key allows forging tickets for any account (a golden ticket), so these must be protected above all.

Q6What is tiering in Active Directory security?

Separating privileged accounts so that high-tier admin credentials are never used on lower-tier machines like user workstations. Admins use dedicated accounts on hardened privileged access workstations, so their credentials are never left where attackers can steal them.

Q7What is pass-the-hash?

Reusing a stolen NTLM password hash to authenticate as that user without knowing or cracking the plaintext password. It is possible because NTLM treats the hash as the secret, and is countered by reducing NTLM, Credential Guard and least admin.

Q8How can you practise AD attacks safely?

Build a small isolated lab domain in virtual machines, or use a purpose-built vulnerable environment such as Game of Active Directory, on a host-only network. Never test a real organisation’s domain without explicit written permission.