Detection rules › Elastic

Suspicious Access to Active Directory Database File

Source
github.com/elastic/protections-artifacts

Identifies access to the Active Directory Domain Database file (ntds.dit). This file contains sensitive information including hashed domain credentials.

MITRE ATT&CK coverage

TacticTechniques
Credential Access

Rule body

[rule]
description = """
Identifies access to the Active Directory Domain Database file (ntds.dit). This file contains sensitive information
including hashed domain credentials.
"""
id = "d66765b8-010b-4a40-ab62-1d8f13a44878"
license = "Elastic License v2"
name = "Suspicious Access to Active Directory Database File"
os_list = ["windows"]
reference = [
    "https://www.ired.team/offensive-security/credential-access-and-credential-dumping/ntds.dit-enumeration",
]
version = "1.0.35"

query = '''
file where event.action == "open" and process.pid != 4 and 
 file.path : "*\\Windows\\NTDS\\ntds.dit" and process.executable : "?:\\*" and
 /* covered by RuleId 3c44fc50-2672-48b3-af77-ff43b895ac70 */
 not process.executable :
             ("?:\\Windows\\System32\\ntdsutil.exe",
              "?:\\Windows\\System32\\esentutl.exe",
              "?:\\Windows\\system32\\lsass.exe",
              "?:\\Windows\\System32\\wbengine.exe",
              "?:\\Program Files\\*.exe",
              "?:\\Program Files (x86)\\*.exe",
              "C:\\PCBP\\WBPS.exe",
              "?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*.exe", 
              "?:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Platform\\*.exe",
              "?:\\Windows\\explorer.exe") and
 not (process.code_signature.subject_name in ("EFOLDER, INC.", "Avira Operations GmbH") and process.code_signature.trusted == true)
'''

min_endpoint_version = "8.1.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"
[[threat.technique.subtechnique]]
id = "T1003.003"
name = "NTDS"
reference = "https://attack.mitre.org/techniques/T1003/003/"



[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"

[internal]
min_endpoint_version = "8.1.0"

Stages and Predicates

Stage 1: file

file where event.action == "open" and process.pid != 4 and
 file.path : "*\\Windows\\NTDS\\ntds.dit" and process.executable : "?:\\*" and
 not process.executable :
             ("?:\\Windows\\System32\\ntdsutil.exe",
              "?:\\Windows\\System32\\esentutl.exe",
              "?:\\Windows\\system32\\lsass.exe",
              "?:\\Windows\\System32\\wbengine.exe",
              "?:\\Program Files\\*.exe",
              "?:\\Program Files (x86)\\*.exe",
              "C:\\PCBP\\WBPS.exe",
              "?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*.exe",
              "?:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Platform\\*.exe",
              "?:\\Windows\\explorer.exe") and
 not (process.code_signature.subject_name in ("EFOLDER, INC.", "Avira Operations GmbH") and process.code_signature.trusted == true)

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_nameinAvira Operations GmbH, EFOLDER, INC.excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Avira Operations GmbH" field:"process.code_signature.subject_name" value:"EFOLDER, INC."
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executablewildcard?:\Windows\System32\ntdsutil.exe, ?:\Windows\System32\esentutl.exe, ?:\Windows\system32\lsass.exe, ?:\Windows\System32\wbengine.exe, ?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, C:\PCBP\WBPS.exe, ?:\ProgramData\Microsoft\Windows Defender\Platform\*.exe, ?:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Platform\*.exe, ?:\Windows\explorer.exeexcludes:process.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • open corpus 52 (elastic 51, sigma 1)
field:"EventType" kind:eq value:"open"
file.pathwildcard
  • *\Windows\NTDS\ntds.dit
field:"TargetFilename" kind:wildcard value:"*\Windows\NTDS\ntds.dit"
process.executablewildcard
  • ?:\* corpus 18 (elastic 18)
field:"Image" kind:wildcard value:"?:\*"
process.pidne
  • 4 transforms: number corpus 44 (elastic 44)
field:"process_id" kind:ne value:"4"