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
← All ad identity attacks tasks

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

CommandsIf → thenExplanation & examples

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.

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. More detail ↓

If → then

  • A principal has the relevant effective replication rights at the domain naming context → Use validated directory replication rights for bounded credential proof

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

  • An NT verifier from an appropriate credential source → Recover or reuse an NT password hash

    Needs: Correct account/domain and actual NT hash; recovery mode or an accepting NTLM service with required destination rights

  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context

    Needs: Artifact provenance and format; possible local/domain/application identity and compatible protocol

  • An already compromised domain exposes a KRBTGT key and domain SID → Conditional: understand a realm-wide TGT forgery from KRBTGT material

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

No useful finding → another task in this topic. Failed check → resolve the failure before ruling out the path.

Explanation & examples

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

USE WHEN
An already controlled DC or a validated privileged domain collection context
STARTING ACCESS
A domain identity, appropriate host privilege, or a validated effective directory-object right
RESULT
Domain credential material with a recorded source and collection mechanism

Recognize the clue

Start only from evidence of an already controlled DC or a domain replication right; identify the source mechanism before choosing a generic extraction command.

file NTDS.dit SYSTEM.save
SYNTHETIC EXAMPLE OUTPUT
NTDS.dit: database artifact
SYSTEM.save: registry artifact
Same DC/consistent snapshot: must be verified

Means: A database/key pair is an offline source candidate; remote DRS requires a different permission chain.

Confirm: Verify same-source consistency and access, or independently validate the exact replication/remote collection prerequisites.

After validation
The consistent offline pair parses into account-labelled material: choose classification/reuse.
Ruled out in this context
Only administrator access on a member server exists: reject the assumed domain-database/replication access.
Still inconclusive
Two filenames without provenance do not prove a matched usable source.

Troubleshooting: DC reachability or local administrator access on a member server is not sufficient for domain replication.

Offline NTDS from an already controlled DC

An offline parse needs a matched NTDS.dit and SYSTEM hive:

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:

At the DISKSHADOW> prompt:

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

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.

Why it works

Offline database parsing and DRS replication are different mechanisms. A generic remote extraction command can try multiple methods; select only the source whose prerequisites have been taught and verified.

Worked example · hypothetical

Observation: an already controlled DC provides a consistent database/key pair. Test: parse the matched source offline. Illustrative output: domain-account hashes are recovered. Interpretation: classify identities and perform the smallest relevant verification.

New identity, privilege, host or route? Re-enumerate → All topic tasks →

Study guide ↗Full procedure ↗Cheatsheet ↗
HomeProjectsToolsNotes
Interactive toolsOSCP notes ↗Extended OSCP workspace ↗Attack-path visualizer ↗

© 2026 Armaan. Built with curiosity.

GitHub ↗GMT+8