Lesson 5 of 5 · 45 min read

Mock Take-Home — T1003.003 NTDS.dit Credential Theft

This is a full mock take-home challenge. The time limit is 72 hours. Write your answer before reading the model solution.



Model Solution

1. Detection Rationale

Technique: T1003.003 — OS Credential Dumping: NTDS.dit

Behavioral invariant: Any extraction of NTDS.dit requires one of three OS-level operations:

  1. Creating a Volume Shadow Copy to access the locked database file (vssadmin / WMIC WMI call)
  2. Invoking ntdsutil.exe with IFM parameters to export the database
  3. Opening a read handle to the ntds.dit file directly (rarest in practice)

I will cover extraction paths 1 and 2 with separate rules. Path 3 (direct file handle) is included as a bonus rule, noting the lower signal-to-noise ratio.

DML level: DML-4 to DML-5. The rules target specific host artifacts (ntdsutil arguments, shadow copy creation on DCs) rather than generic OS primitives — because the behavioral invariant for ntds.dit extraction IS relatively specific to these tools. A DML-6 complement (any file read of ntds.dit path) is also provided.

Telemetry required:


2. Detection Rules

Rule 1: NTDSUtil IFM Command Execution

title: NTDSUtil IFM Command — NTDS.dit Extraction
id: b2c3d4e5-f6a7-8901-bcde-f123456789ab
status: stable
description: |
  Detects ntdsutil.exe invoked with 'ifm' or 'install from media' arguments,
  indicating NTDS.dit export. This command is used by attackers to extract
  a copy of the Active Directory database. Legitimate use: domain controller
  provisioning via IFM, which should be rare and documented.
references:
  - https://attack.mitre.org/techniques/T1003/003/
tags:
  - attack.credential_access
  - attack.t1003.003
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|endswith: '\ntdsutil.exe'
    CommandLine|contains|all:
      - 'ifm'
      - 'create'
  condition: selection
falsepositives:
  - Legitimate domain controller provisioning via IFM (Install From Media)
    during planned DC deployment — expected frequency: < 4 times/year per DC
level: high
fields:
  - Image
  - CommandLine
  - User
  - ParentImage
  - ComputerName

Rule 2: VSS Shadow Copy Creation on Domain Controller

title: Volume Shadow Copy Created on Domain Controller — NTDS.dit Theft Precursor
id: c3d4e5f6-a7b8-9012-cdef-123456789abc
status: experimental
description: |
  Detects vssadmin or wmic creating volume shadow copies on Windows hosts.
  Combined with the host being a domain controller, this is a high-confidence
  NTDS.dit theft precursor — attackers create shadow copies to access the
  locked ntds.dit file.
tags:
  - attack.credential_access
  - attack.t1003.003
  - attack.t1490
logsource:
  category: process_creation
  product: windows
detection:
  selection_vssadmin:
    Image|endswith: '\vssadmin.exe'
    CommandLine|contains:
      - 'create shadow'
  selection_wmic:
    Image|endswith: '\wmic.exe'
    CommandLine|contains:
      - 'shadowcopy'
      - 'create'
  condition: 1 of selection_*
falsepositives:
  - Backup software that uses VSS for consistent backups (Veeam, Windows Server Backup)
    — filter by ParentImage matching known backup tool paths
  - System-triggered VSS during Windows Updates (ParentImage: TrustedInstaller.exe)
level: medium
fields:
  - Image
  - CommandLine
  - ParentImage
  - ComputerName

Rule 3 (Bonus): NTDS.dit File Access

title: NTDS.dit File Accessed Outside Expected Paths
id: d4e5f6a7-b8c9-0123-defa-23456789abcd
status: experimental
description: |
  Detects file creation or access events for files named ntds.dit outside
  the expected NTDS database path, indicating the file may have been copied
  for offline extraction.
tags:
  - attack.credential_access
  - attack.t1003.003
logsource:
  category: file_event
  product: windows
detection:
  selection:
    FileName|endswith: '\ntds.dit'
  filter_legitimate_path:
    FileName|startswith: 'C:\Windows\NTDS\'
  condition: selection and not filter_legitimate_path
falsepositives:
  - AD Lightweight Directory Services (NTDS.dit can exist in non-standard paths)
  - Backup software that restores NTDS.dit to a temporary path during AD recovery
level: high
fields:
  - Image
  - FileName
  - User
  - ComputerName

3. Test Fixtures

TP Fixture — Rule 1 (NTDSUtil):

[{
  "EventID": 1,
  "Image": "C:\\Windows\\System32\\ntdsutil.exe",
  "CommandLine": "ntdsutil.exe \"ac i ntds\" \"ifm\" \"create full c:\\temp\\ifm\" q q",
  "ParentImage": "C:\\Windows\\System32\\cmd.exe",
  "User": "CORP\\Administrator",
  "ComputerName": "dc01",
  "_source": "Atomic Red Team T1003.003 test 1 — NTDSUtil IFM"
}]

TP Fixture — Rule 2 (VSS):

[{
  "EventID": 1,
  "Image": "C:\\Windows\\System32\\vssadmin.exe",
  "CommandLine": "vssadmin.exe create shadow /for=C:",
  "ParentImage": "C:\\Windows\\System32\\cmd.exe",
  "User": "CORP\\Administrator",
  "ComputerName": "dc01",
  "_source": "Atomic Red Team T1003.003 test 2 — VSS shadow copy creation"
}]

FP Fixture — Rule 2 (Backup Software):

[{
  "EventID": 1,
  "Image": "C:\\Windows\\System32\\vssadmin.exe",
  "CommandLine": "vssadmin create shadow /for=C:",
  "ParentImage": "C:\\Program Files\\Veeam\\Backup and Replication\\Veeam.Backup.Agent.exe",
  "User": "CORP\\svc-veeam",
  "ComputerName": "fileserver01",
  "_source": "Synthetic — known-legitimate Veeam backup VSS creation; excluded via ParentImage filter"
}]

4. Limitations

Rule 1 (NTDSUtil):

Rule 2 (VSS):

Rule 3 (File Access):

What this doesn’t cover:

T1003.003 — NTDS.dit— MITRE Atomic Red Team T1003.003— Red Canary