Potential Credential Access via Windows Utilities

Identifies the execution of known Windows utilities often abused to dump LSASS memory or the Active Directory database (NTDS.dit) in preparation for credential access.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/11/24"
  3integration = ["endpoint", "windows"]
  4maturity = "production"
  5updated_date = "2024/05/21"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies the execution of known Windows utilities often abused to dump LSASS memory or the Active Directory database
 11(NTDS.dit) in preparation for credential access.
 12"""
 13from = "now-9m"
 14index = [
 15    "winlogbeat-*",
 16    "logs-endpoint.events.process-*",
 17    "logs-windows.*",
 18    "endgame-*",
 19    "logs-system.security*",
 20]
 21language = "eql"
 22license = "Elastic License v2"
 23name = "Potential Credential Access via Windows Utilities"
 24note = """## Triage and analysis
 25
 26### Investigating Potential Credential Access via Windows Utilities
 27
 28Local Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.
 29
 30The `Ntds.dit` file is a database that stores Active Directory data, including information about user objects, groups, and group membership.
 31
 32This rule looks for the execution of utilities that can extract credential data from the LSASS memory and Active Directory `Ntds.dit` file.
 33
 34#### Possible investigation steps
 35
 36- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
 37- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.
 38- Investigate other alerts associated with the user/host during the past 48 hours.
 39- Examine the command line to identify what information was targeted.
 40- Identify the target computer and its role in the IT environment.
 41
 42### False positive analysis
 43
 44- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.
 45
 46### Response and remediation
 47
 48- Initiate the incident response process based on the outcome of the triage.
 49- If the host is a domain controller (DC):
 50  - Activate your incident response plan for total Active Directory compromise.
 51  - Review the privileges assigned to users that can access the DCs, to ensure that the least privilege principle is being followed and to reduce the attack surface.
 52- Isolate the involved hosts to prevent further post-compromise behavior.
 53- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
 54- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 55- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 56- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
 57"""
 58references = ["https://lolbas-project.github.io/"]
 59risk_score = 73
 60rule_id = "00140285-b827-4aee-aa09-8113f58a08f3"
 61setup = """## Setup
 62
 63If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
 64events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
 65Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
 66`event.ingested` to @timestamp.
 67For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
 68"""
 69severity = "high"
 70tags = [
 71    "Domain: Endpoint",
 72    "OS: Windows",
 73    "Use Case: Threat Detection",
 74    "Tactic: Credential Access",
 75    "Tactic: Defense Evasion",
 76    "Resources: Investigation Guide",
 77    "Data Source: Elastic Endgame",
 78    "Data Source: Elastic Defend",
 79]
 80timestamp_override = "event.ingested"
 81type = "eql"
 82
 83query = '''
 84process where host.os.type == "windows" and event.type == "start" and
 85(
 86  (
 87    (?process.pe.original_file_name : "procdump" or process.name : "procdump.exe") and process.args : "-ma"
 88  ) or
 89  (
 90    process.name : "ProcessDump.exe" and not process.parent.executable regex~ """C:\\Program Files( \(x86\))?\\Cisco Systems\\.*"""
 91  ) or
 92  (
 93    (?process.pe.original_file_name : "WriteMiniDump.exe" or process.name : "WriteMiniDump.exe") and
 94      not process.parent.executable regex~ """C:\\Program Files( \(x86\))?\\Steam\\.*"""
 95  ) or
 96  (
 97    (?process.pe.original_file_name : "RUNDLL32.EXE" or process.name : "RUNDLL32.exe") and
 98      (process.args : "MiniDump*" or process.command_line : "*comsvcs.dll*#24*")
 99  ) or
100  (
101    (?process.pe.original_file_name : "RdrLeakDiag.exe" or process.name : "RdrLeakDiag.exe") and
102      process.args : "/fullmemdmp"
103  ) or
104  (
105    (?process.pe.original_file_name : "SqlDumper.exe" or process.name : "SqlDumper.exe") and
106      process.args : "0x01100*") or
107  (
108    (?process.pe.original_file_name : "TTTracer.exe" or process.name : "TTTracer.exe") and
109      process.args : "-dumpFull" and process.args : "-attach") or
110  (
111    (?process.pe.original_file_name : "ntdsutil.exe" or process.name : "ntdsutil.exe") and
112      process.args : "create*full*") or
113  (
114    (?process.pe.original_file_name : "diskshadow.exe" or process.name : "diskshadow.exe") and process.args : "/s")
115)
116'''
117
118
119[[rule.threat]]
120framework = "MITRE ATT&CK"
121[[rule.threat.technique]]
122id = "T1003"
123name = "OS Credential Dumping"
124reference = "https://attack.mitre.org/techniques/T1003/"
125[[rule.threat.technique.subtechnique]]
126id = "T1003.001"
127name = "LSASS Memory"
128reference = "https://attack.mitre.org/techniques/T1003/001/"
129
130[[rule.threat.technique.subtechnique]]
131id = "T1003.003"
132name = "NTDS"
133reference = "https://attack.mitre.org/techniques/T1003/003/"
134
135
136
137[rule.threat.tactic]
138id = "TA0006"
139name = "Credential Access"
140reference = "https://attack.mitre.org/tactics/TA0006/"
141[[rule.threat]]
142framework = "MITRE ATT&CK"
143[[rule.threat.technique]]
144id = "T1218"
145name = "System Binary Proxy Execution"
146reference = "https://attack.mitre.org/techniques/T1218/"
147[[rule.threat.technique.subtechnique]]
148id = "T1218.011"
149name = "Rundll32"
150reference = "https://attack.mitre.org/techniques/T1218/011/"
151
152
153
154[rule.threat.tactic]
155id = "TA0005"
156name = "Defense Evasion"
157reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Potential Credential Access via Windows Utilities

Local Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.

The Ntds.dit file is a database that stores Active Directory data, including information about user objects, groups, and group membership.

This rule looks for the execution of utilities that can extract credential data from the LSASS memory and Active Directory Ntds.dit file.

Possible investigation steps

  • Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
  • Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Examine the command line to identify what information was targeted.
  • Identify the target computer and its role in the IT environment.

False positive analysis

  • This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • If the host is a domain controller (DC):
    • Activate your incident response plan for total Active Directory compromise.
    • Review the privileges assigned to users that can access the DCs, to ensure that the least privilege principle is being followed and to reduce the attack surface.
  • Isolate the involved hosts to prevent further post-compromise behavior.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top