Back to Blog
Identity Security21 min read2024-11-15

Active Directory Security: Hardening Your Identity Infrastructure

Active Directory is the keys to the kingdom for most organizations. Learn essential hardening techniques to protect your identity infrastructure from attacks.

A

Asfaleia Team

Chief Security Researcher

Active Directory Security: Hardening Your Identity Infrastructure
Sections

Introduction to Active Directory Security

Active Directory (AD) is the cornerstone of identity management for most enterprises. It controls authentication, authorization, and access to virtually every resource. This makes it the primary target for attackers—compromise AD, and you own the entire organization.

Why AD is Critical:
90%+ of Fortune 1000 use Active Directory
AD controls access to all domain-joined resources
Compromise leads to total domain takeover
Recovery from AD compromise is extremely difficult
Common AD Attack Statistics:
95% of Fortune 500 have been compromised via AD
Median time to domain admin: 4 hours
80% of breaches involve credential theft
Average AD attack goes undetected for 146 days

Active Directory Attack Surface

Common Attack Vectors

1. Credential Theft

Kerberoasting
AS-REP Roasting
Pass-the-Hash
Pass-the-Ticket
NTLM relay attacks
Credential dumping (Mimikatz)

2. Privilege Escalation

Misconfigured ACLs
Group Policy abuse
Certificate Services attacks
Delegation abuse
SID History attacks

3. Lateral Movement

Remote service abuse
WMI/PowerShell remoting
DCOM attacks
Admin share access
Token manipulation

4. Persistence

Golden Ticket attacks
Silver Ticket attacks
Skeleton Key
AdminSDHolder abuse
DCSync rights

High-Value Targets

Tier 0 Assets (Protect at all costs):
Domain Controllers
AD FS servers
Azure AD Connect
PKI/Certificate Authority
Privileged Access Workstations
Tier 0 admin accounts

Tiered Administration Model

Implement administrative tiers to contain compromise.

Tier 0 - Domain/Forest Administration

Accounts:
Domain Admins
Enterprise Admins
Schema Admins
AD recovery accounts
Access:
Only to Tier 0 systems
Domain Controllers
AD management tools
PAW workstations only

Tier 1 - Server Administration

Accounts:
Server administrators
Application admins
Database admins
Access:
Servers and applications
Cannot access Tier 0 systems
Cannot log into workstations

Tier 2 - Workstation Administration

Accounts:
Help desk
Workstation admins
Standard IT support
Access:
Workstations only
Cannot access servers
Cannot access Tier 0

Implementation Rules

Critical Restrictions:
Higher tier credentials never used on lower tier systems
No interactive logons across tiers
Separate accounts for each tier
Enforce with Group Policy
Tier 0 admin → Can only log into Tier 0 systems
Tier 1 admin → Can only log into Tier 1 systems
Tier 2 admin → Can only log into Tier 2 systems

Privileged Access Workstations (PAW)

Dedicated, hardened workstations for privileged administration.

PAW Requirements

Hardware:
Dedicated physical devices
TPM 2.0 enabled
Secure Boot
No virtualization of PAW
Software:
Windows Enterprise edition
Credential Guard enabled
Device Guard/WDAC
BitLocker full disk encryption
Network:
Isolated network segment
Restricted internet access
Monitored connections
Jump server for Tier 0

PAW Configuration

# Enable Credential Guard
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\LSA" -Name "LsaCfgFlags" -Value 1
# Enable Device Guard
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Value 1
# Block credential caching
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "DisableDomainCreds" -Value 1

Domain Controller Hardening

Core Security Configurations

1. Patch Management

Critical patches within 24 hours
Monthly patch cycle strictly followed
Prioritize DC patches

2. Reduce Attack Surface

Remove unnecessary roles
Disable unnecessary services
Uninstall unnecessary software
Implement AppLocker

3. Network Protection

DC firewall enabled
Restrict management ports
Isolate DC subnet
Monitor all traffic

4. Authentication Hardening

# Disable NTLM where possible
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "LmCompatibilityLevel" -Value 5
# Require SMB signing
Set-SmbServerConfiguration -RequireSecuritySignature $true -Force
# Disable anonymous enumeration
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "RestrictAnonymous" -Value 1

Event Logging

Critical Events to Monitor:

| Event ID | Description |

|----------|-------------|

| 4624 | Successful logon |

| 4625 | Failed logon |

| 4648 | Explicit credential logon |

| 4672 | Special privileges assigned |

| 4720 | User account created |

| 4732 | Member added to security group |

| 4740 | Account locked out |

| 4768 | Kerberos TGT requested |

| 4769 | Kerberos service ticket requested |

| 4771 | Kerberos pre-auth failed |

Advanced Audit Configuration:
# Enable command line logging
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit" -Name "ProcessCreationIncludeCmdLine_Enabled" -Value 1
# Enable PowerShell Script Block Logging
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -Name "EnableScriptBlockLogging" -Value 1

Kerberos Security

Kerberoasting Defense

Problem: Service accounts with SPNs can be targeted for offline password cracking.
Mitigations:
1Strong Service Account Passwords
Minimum 25+ characters
Randomly generated
Unique per service
2Group Managed Service Accounts (gMSA)
# Create gMSA
New-ADServiceAccount -Name svc_app -DNSHostName svc_app.domain.com -PrincipalsAllowedToRetrieveManagedPassword AppServers
# Install on server
Install-ADServiceAccount svc_app
3Monitor Kerberoasting
Event ID 4769 with RC4 encryption
Unusual service ticket requests
High volume TGS requests

AS-REP Roasting Defense

Problem: Accounts without pre-authentication can be attacked offline.
Detection:
# Find accounts without pre-auth
Get-ADUser -Filter {DoesNotRequirePreAuth -eq $true} -Properties DoesNotRequirePreAuth
Mitigation:
Enable pre-authentication for all accounts
Alert on accounts with pre-auth disabled
Regular audit of this setting

Golden/Silver Ticket Defense

Protections:
Rotate KRBTGT password twice yearly
Protect KRBTGT account
Monitor Kerberos anomalies
Enable PAC validation
KRBTGT Password Reset:
# Reset KRBTGT (do twice, wait replication between)
Reset-ADAccountPassword -Identity krbtgt -NewPassword (ConvertTo-SecureString "ComplexPassword123!" -AsPlainText -Force)
# Wait for replication
Start-Sleep -Seconds 86400  # 24 hours
# Reset again
Reset-ADAccountPassword -Identity krbtgt -NewPassword (ConvertTo-SecureString "DifferentPassword456!" -AsPlainText -Force)

Group Policy Security

GPO Hardening

Key Policies:
1Account Policies
Password minimum length: 14+ characters
Password complexity: Enabled
Account lockout: 5 attempts / 15 minutes
Password history: 24 passwords
2User Rights Assignment
Restrict "Log on as a service"
Restrict "Log on as a batch job"
Restrict "Debug programs"
Restrict "Act as part of the operating system"
3Security Options
Disable anonymous enumeration
Require SMB signing
Restrict NTLM
Enable UAC

Protected Users Group

Add sensitive accounts to Protected Users:

Benefits:
No NTLM authentication
No delegation
No DES/RC4 Kerberos
TGT lifetime reduced to 4 hours
No caching credentials
Add to Protected Users:
Add-ADGroupMember -Identity "Protected Users" -Members admin_user
Note: Test thoroughly—some applications may break.

LAPS Implementation

Local Administrator Password Solution prevents lateral movement.

LAPS Deployment

1Schema Extension
# Extend schema
Import-Module AdmPwd.PS
Update-AdmPwdADSchema
2Delegate Permissions
# Grant read permissions
Set-AdmPwdReadPasswordPermission -OrgUnit "OU=Workstations,DC=domain,DC=com" -AllowedPrincipals "IT_Admins"
# Grant reset permissions
Set-AdmPwdResetPasswordPermission -OrgUnit "OU=Workstations,DC=domain,DC=com" -AllowedPrincipals "IT_Admins"
3Configure via GPO
Enable local admin password management
Set password complexity
Set password age
Configure password length

Attack Detection

High-Fidelity Alerts

DCSync Detection:
Event ID 4662 with specific GUIDs
Non-DC requesting replication rights
Unusual replication patterns
Pass-the-Hash Detection:
Event ID 4624 Type 9 logons
NTLM authentication from unusual sources
Logon without prior TGT request
Kerberoasting Detection:
Event ID 4769 with RC4 encryption (0x17)
High volume TGS requests
Requests for multiple SPNs
Golden Ticket Detection:
TGT with unusual lifetime
TGT for non-existent user
Encryption type anomalies

Honeypot Accounts

Create decoy accounts to detect attackers:

# Create honey user
New-ADUser -Name "svc_backup" -SamAccountName "svc_backup" -UserPrincipalName "[email protected]" -AccountPassword (ConvertTo-SecureString "HoneyPassword123!" -AsPlainText -Force) -Enabled $true
# Set SPN (for Kerberoasting detection)
Set-ADUser -Identity svc_backup -ServicePrincipalNames @{Add="MSSQLSvc/honeypot.domain.com:1433"}
# Set description to lure attackers
Set-ADUser -Identity svc_backup -Description "Backup service account - password: Summer2023!"

Alert on ANY activity on this account.

Assessment Checklist

Quick Wins

Protected Users group populated
LAPS deployed
KRBTGT password rotated recently
Tiered admin accounts exist
Domain Admin count minimized

Intermediate

PAWs deployed for Tier 0
gMSAs for service accounts
Advanced audit logging enabled
AdminSDHolder monitored
DNS secured

Advanced

Credential Guard on sensitive systems
Full tiered model implemented
Red Forest for management
Just-in-Time administration
Continuous AD assessment

Conclusion

Active Directory security is fundamental to enterprise security. A compromised AD means a compromised organization. Implement defense in depth through tiered administration, privileged access workstations, and comprehensive monitoring.

Key Priorities:
1Implement tiered administration
2Deploy LAPS immediately
3Rotate KRBTGT password
4Enable advanced auditing
5Harden Domain Controllers
6Deploy PAWs for privileged access
7Monitor for attack indicators

Asfaleia-Tech offers Active Directory security assessments, attack path analysis, and hardening implementation. Contact us to secure your identity infrastructure.

Tags

#Active Directory#Identity#Windows Security#Privileged Access#Kerberos

Downloadable-style takeaway

Use this as a working assessment checklist.

Pull the headings into your next security review, assign owners, and mark each section as ready, partial, or missing.

A

Written by

Asfaleia Team

Chief Security Researcher

Written by the Asfaleia Tech Security Team, combining field experience across offensive testing, detection engineering, incident readiness, and compliance evidence.

Ready to Strengthen Your Security?

Let's discuss how Asfaleia-Tech can help protect your organization.