Skip to content
Tutorials Center
My learning

Topics

Lesson 31 of 38 ยท Integration and Security

Hardening Active Directory: Tiering, Privileged Groups and Auditing

Protect your domain: the tiered administration model, privileged groups and AdminSDHolder, Protected Users, LAPS, krbtgt rotation, key audit events and common attack paths explained.

An Active Directory domain is a single trust zone: whoever controls a domain controller, or an account that can change the directory, controls every computer and user that depends on it. Attackers know this. Most real breaches do not exploit a clever bug; they follow a path of ordinary credentials, from a stolen laptop password to a server admin to a domain admin. Hardening means shortening and cutting those paths.

This lesson gives you the model, the specific controls and the events to watch. The Windows features are described as text; the Python examples are checkers that run on sample data to show how audits work.

The tier model

The classic enterprise access model splits the environment into tiers, and rules say credentials may only move downward in trust, never leave a high tier on a lower-tier machine:

Tier Contains Administrators
Tier 0 Domain controllers, AD, PKI, identity servers, the accounts and groups that control them Tier 0 admins only
Tier 1 Application and member servers Server admins
Tier 2 Workstations, laptops, user devices Help desk, desktop support

The central rule: a Tier 0 account never logs on to a Tier 1 or Tier 2 machine. When an admin signs in interactively, their credentials (hashes, Kerberos tickets) sit in the memory of that machine; if it is compromised, so is the admin. Enforce it with separate administrative accounts (alice and alice-t0), authentication policies and silos, and the Group Policy user-rights Deny log on locally / through Remote Desktop / as a batch job for Tier 0 groups on lower-tier computers. Microsoft's newer enterprise access model extends this with a control plane, a management plane and a data plane, but the principle is the same.

Privileged groups

Know who is in these groups, and keep them nearly empty:

  • Enterprise Admins (forest root only), Schema Admins (empty except while changing the schema), Domain Admins.
  • Administrators (built-in), Account Operators, Backup Operators, Server Operators, Print Operators, DnsAdmins and Group Policy Creator Owners; each has a path to higher rights.
  • Anyone with write access to the domain object, the AdminSDHolder object, GPOs linked to the DC OU, or the PKI templates is effectively Tier 0 as well, even if in no named group.

AdminSDHolder and SDProp protect these groups: every hour the PDC emulator copies the ACL of CN=AdminSDHolder,CN=System onto every account whose adminCount is 1. That is why manual permission changes on admins disappear, and why an attacker who adds an ACE to AdminSDHolder keeps persistent control. Also, accounts that were once privileged keep adminCount=1 and an unusual ACL even after removal from the group; clean those up.

Python Tier-violation and privileged-group audit (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Controls worth deploying

  1. Protected Users group. Members cannot use NTLM, DES or RC4 for Kerberos, cannot be delegated, and their TGT lifetime is limited to 4 hours with no renewal; credentials are not cached. Put Tier 0 admins in it (not service accounts: they would break).
  2. Windows LAPS (Local Administrator Password Solution). Gives every computer a unique, random, rotated local administrator password stored in an AD attribute (msLAPS-Password, encrypted) with access delegated to a group. This breaks lateral movement with a shared local admin password. Built into current Windows versions; the legacy product used ms-Mcs-AdmPwd.
  3. Authentication policies and silos so Tier 0 accounts can authenticate only from Tier 0 devices.
  4. Credential Guard isolates secrets in memory from tools that dump them.
  5. Disable what you do not use: SMB1, LLMNR, NetBIOS-NS, NTLMv1, the Print Spooler service on DCs. Restrict NTLM (audit it first).
  6. gMSAs for services and AES-only Kerberos types (SPNs and gMSA). Strong, long passwords on anything left.
  7. Sign LDAP and bind channels (LDAPS and signing); require SMB signing on DCs.
  8. Certificate templates: review who can enrol and which templates allow the requester to specify a subject name; misconfigured AD CS templates give a regular user a certificate as Domain Admin.
  9. Rotate the krbtgt password at least yearly and after any suspected compromise, twice, waiting at least the maximum ticket lifetime (10 hours) between rotations, so that existing legitimate tickets stay valid yet forged ones die. Microsoft provides a script that does it safely.
  10. Reduce attack surface on domain controllers: no browsing, no email, no extra software, no third-party agents that run as SYSTEM without review. Patch them first.

Common attack paths and their defence

Attack Idea Defence
Pass-the-hash Reuse an NT hash instead of the password Tiering, Credential Guard, LAPS, Protected Users
Kerberoasting Crack service tickets offline gMSA, long passwords, AES only
AS-REP roasting Crack replies for accounts without pre-auth Never disable pre-auth
DCSync Abuse replication rights to copy password hashes Audit and restrict Replicating Directory Changes rights
Golden ticket Forge TGTs with the krbtgt key Rotate krbtgt, protect DCs
GPO abuse Edit a GPO linked to a high-value OU Tight GPO ACLs, review edit rights
Password spray Try one common password on many accounts Smart lockout, banned passwords, MFA (password policies)

Free tools such as PingCastle, Purple Knight and BloodHound help find these weaknesses before an attacker does. Run them as part of a yearly review.

What to audit

Turn on Advanced Audit Policy categories and send DC logs to a central collector. Core Windows Security events:

Event ID Meaning
4624 / 4625 Successful / failed logon (look at logon type)
4728, 4732, 4756 Member added to a security-enabled global, local or universal group
4720, 4722, 4725, 4726 User created, enabled, disabled, deleted
4740 Account locked out
4768, 4769, 4771 Kerberos TGT, service ticket and pre-auth failure
4662 Operation on an AD object with audit ACE (used to catch DCSync)
5136 Directory object modified (with audit enabled on the object)
4719 Audit policy changed
1102 Audit log cleared (attackers do this)
Python Alert on sensitive group changes (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

In production this is a rule in a SIEM; the idea is the same.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. What is the central rule of the tier model?

    A compromised lower-tier machine would expose the credentials of any higher-tier admin who logged on to it.
  2. 2. How often does SDProp refresh the ACLs of protected accounts from AdminSDHolder?

    By default the PDC emulator runs SDProp every 60 minutes.
  3. 3. What does Windows LAPS accomplish?

    Unique local admin passwords stop an attacker from reusing one captured password on every machine.
  4. 4. Why rotate the krbtgt password twice?

    The KDC accepts the current and previous krbtgt key, so two rotations invalidate old, possibly forged, tickets.
  5. 5. Which event reports that the security audit log was cleared?

    Event 1102 is logged when the Security log is cleared, a common attacker action to hide tracks.

Summary

  • Separate administrative credentials by tier and never expose Tier 0 accounts on lower tiers.
  • Keep privileged groups small; know AdminSDHolder, SDProp and the dangerous rights that make someone effectively Tier 0.
  • Deploy Protected Users, LAPS, gMSAs, Credential Guard, signed protocols, AES and safe krbtgt rotation.
  • Audit group changes, Kerberos and logon events centrally and review with assessment tools yearly.

Next: The Active Directory PowerShell Module