In short
- An attacker’s target is often not a single computer but domain admin rights.
- The most effective measures: tiered admin accounts, Windows LAPS, Protected Users, restricting NTLM and regular privilege reviews.
- Try changes in audit mode first; older devices and applications may be affected.
The last step of a ransomware attack is usually the same: the attacker reaches domain admin rights in Active Directory and encrypts every server and computer at once through Group Policy or remote management tools. This article summarises the attack chain for IT managers, and the technical steps that can be taken to break it. If you want the basics of AD first, see our article what is Active Directory.
A typical attack chain
- Initial access: an ordinary user’s computer is compromised through a phishing email or a stolen VPN account.
- Credential harvesting: password hashes and Kerberos tickets in memory are stolen. If the local admin password is the same on every computer, the attacker uses that hash to move to other computers too (pass-the-hash).
- Kerberoasting: Kerberos tickets for service accounts (accounts with an SPN) are requested and weak passwords are cracked offline.
- Privilege escalation: when an admin signs in to a compromised computer with a domain admin account, their credentials are stolen too.
- Impact: through the domain controller, backups are deleted, security software is switched off and encryption begins.
Each of the steps below aims to break one link in this chain.
1. Separate admin accounts into tiers
The essence of Microsoft’s enterprise access model is that privilege levels must not mix. In practice, use at least three separate classes of account:
- Tier 0: domain controllers and AD administration. These accounts sign in only to DCs and to a secure workstation dedicated to administration.
- Tier 1: server administrators.
- Tier 2: user computers and the helpdesk.
Higher-tier accounts should be blocked from signing in to machines in a lower tier. You can enforce this with the “Deny log on locally” and “Deny log on through Remote Desktop Services” rights in Group Policy. Each admin should also have a separate, unprivileged account for everyday email and browsing.
2. Shrink and audit privileged groups
The members of Domain Admins, Enterprise Admins, Schema Admins, Administrators, Account Operators and Backup Operators should be reviewed regularly:
Get-ADGroupMember "Domain Admins" -Recursive | Select-Object Name, SamAccountName, objectClass
Get-ADGroupMember "Enterprise Admins" -Recursive | Select-Object Name, SamAccountName
Service accounts shouldn’t be in these groups. Enterprise Admins and Schema Admins are recommended to be kept empty under normal circumstances.
3. Make local admin passwords unique with Windows LAPS
The same local admin password on every computer is the easiest route for a pass-the-hash attack. Windows LAPS was built into supported Windows versions with the April 2023 updates; it makes every computer’s local admin password unique and automatically rotated:
Update-LapsADSchema
Set-LapsADComputerSelfPermission -Identity "OU=Computers,DC=company,DC=local"
# Then configure the LAPS policy through Group Policy and check a password:
Get-LapsADPassword -Identity PC-001 -AsPlainText
4. Put admin accounts in the Protected Users group
Accounts in the Protected Users group can’t authenticate with NTLM, can’t use DES/RC4 in Kerberos pre-authentication, can’t be delegated and don’t have their credentials cached. It is a strong extra layer for admin accounts, but don’t add service accounts to this group, and test with a single account first.
5. Review service accounts against Kerberoasting
# User accounts with an SPN (exposed to Kerberoasting)
Get-ADUser -Filter {ServicePrincipalName -like "*"} -Properties ServicePrincipalName, PasswordLastSet |
Select-Object SamAccountName, PasswordLastSet, ServicePrincipalName
# Accounts with Kerberos pre-authentication disabled (exposed to AS-REP roasting)
Get-ADUser -Filter {DoesNotRequirePreAuth -eq $true} | Select-Object SamAccountName
Where possible, use group managed service accounts (gMSA) for services; their passwords are automatic and long. Where gMSA can’t be used, passwords should be at least 25 random characters and AES encryption should be enabled on the accounts.
6. Restrict NTLM and require signing
- Disable NTLMv1 and LM: set the “Network security: LAN Manager authentication level” policy to “Send NTLMv2 response only. Refuse LM & NTLM”.
- SMB signing: require SMB signing on servers and clients; it blocks NTLM relay attacks.
- LDAP signing and channel binding: enforce LDAP signing and channel binding on domain controllers.
Watch out: these settings can cause incompatibilities with older printers, scanners, NAS devices and legacy applications. Turn on NTLM auditing first, identify the systems using NTLM from the event logs, then enforce.
7. Other quick wins
- Machine account quota: by default, every user can add 10 computers to the domain; set this to zero:
Set-ADDomain -Identity (Get-ADDomain) -Replace @{"ms-DS-MachineAccountQuota"="0"} - Print Spooler on domain controllers: switch off the Print Spooler service on DCs if it isn’t needed.
- Inactive accounts: find and disable accounts that haven’t signed in for 90 days:
Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly - krbtgt password: change it twice, waiting for replication in between, at regular intervals and whenever an incident is suspected.
- Updates: always keep domain controllers up to date; don’t leave them on out-of-support versions (e.g. Windows Server 2016, whose support ends on 12 January 2027).
- Backup: take AD system state backups and keep them separate so they can’t be deleted with a domain admin account.
8. Monitor: which events should raise an alarm?
Spotting unusual activity matters as much as hardening. Members being added to privileged groups (4728, 4732, 4756), new services being installed (7045), the security log being cleared (1102) and large numbers of Kerberos tickets requested with RC4 (4769) must all be monitored. For details, see our article on detecting attacks with Windows event logs.
Conclusion
Active Directory is the key ring of the company network, which is exactly why attackers target it. With tiered admin accounts, unique local admin passwords, tightened authentication and regular audits, it becomes much harder for an attack to spread across the whole network. At SistemON, as part of our cyber security and Microsoft solutions, we carry out Active Directory security assessments and prepare a hardening plan that prioritises findings by impact and ease of implementation.
Frequently Asked Questions
Will applying these steps affect users?
Some steps (restricting NTLM, SMB/LDAP signing, setting the machine account quota to zero) can affect older devices and applications. So event logs should first be reviewed in audit mode, and settings enforced only once affected systems have been identified and fixed.
Is a tiered admin model necessary in a small domain?
A full tier model can be heavy for small environments, but the core principle applies at any scale: never sign in to user computers and servers with a domain admin account, and do everyday work with a separate, unprivileged account.
How often should we change the krbtgt password?
It should always be changed when a security incident is suspected, and routinely at regular intervals (e.g. once or twice a year). The change should be made twice, waiting for replication to complete in between.
Need help with this?
Let us review your infrastructure free for the first month and share a clear list of risks and priorities.