Enumeration of Administrator Accounts

Identifies instances of lower privilege accounts enumerating Administrator accounts or groups using built-in Windows tools.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/12/04"
  3integration = ["endpoint", "windows", "system", "m365_defender", "crowdstrike"]
  4maturity = "production"
  5updated_date = "2024/11/02"
  6min_stack_version = "8.14.0"
  7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12Identifies instances of lower privilege accounts enumerating Administrator accounts or groups using built-in Windows
 13tools.
 14"""
 15from = "now-9m"
 16index = [
 17    "logs-endpoint.events.process-*",
 18    "winlogbeat-*",
 19    "logs-windows.forwarded*",
 20    "endgame-*",
 21    "logs-system.security*",
 22    "logs-m365_defender.event-*",
 23    "logs-crowdstrike.fdr*",
 24]
 25language = "eql"
 26license = "Elastic License v2"
 27name = "Enumeration of Administrator Accounts"
 28note = """## Triage and analysis
 29
 30### Investigating Enumeration of Administrator Accounts
 31
 32After successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.
 33
 34This rule looks for the execution of the `net` and `wmic` utilities to enumerate administrator-related users or groups in the domain and local machine scope. Attackers can use this information to plan their next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.
 35
 36#### Possible investigation steps
 37
 38- 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.
 39- Identify the user account that performed the action and whether it should perform this kind of action.
 40- Investigate other alerts associated with the user/host during the past 48 hours.
 41- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.
 42
 43### False positive analysis
 44
 45- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.
 46
 47### Related rules
 48
 49- AdFind Command Activity - eda499b8-a073-4e35-9733-22ec71f57f3a
 50
 51### Response and remediation
 52
 53- Initiate the incident response process based on the outcome of the triage.
 54- Isolate the involved hosts to prevent further post-compromise behavior.
 55- 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.
 56- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 57- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 58- 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).
 59"""
 60risk_score = 21
 61rule_id = "871ea072-1b71-4def-b016-6278b505138d"
 62severity = "low"
 63tags = [
 64    "Domain: Endpoint",
 65    "OS: Windows",
 66    "Use Case: Threat Detection",
 67    "Tactic: Discovery",
 68    "Resources: Investigation Guide",
 69    "Data Source: Elastic Endgame",
 70    "Data Source: Elastic Defend",
 71    "Data Source: System",
 72    "Data Source: Microsoft Defender for Endpoint",
 73    "Data Source: Crowdstrike",
 74]
 75timestamp_override = "event.ingested"
 76type = "eql"
 77
 78query = '''
 79process where host.os.type == "windows" and event.type == "start" and
 80(
 81  (
 82    (
 83      (process.name : "net.exe" or ?process.pe.original_file_name == "net.exe") or
 84      ((process.name : "net1.exe" or ?process.pe.original_file_name == "net1.exe") and not process.parent.name : "net.exe")
 85    ) and
 86    process.args : ("group", "user", "localgroup") and
 87    process.args : ("*admin*", "Domain Admins", "Remote Desktop Users", "Enterprise Admins", "Organization Management")
 88    and not process.args : ("/add", "/delete")
 89  ) or
 90  (
 91    (process.name : "wmic.exe" or ?process.pe.original_file_name == "wmic.exe") and
 92    process.args : ("group", "useraccount")
 93  )
 94) and not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20")
 95'''
 96
 97
 98[[rule.threat]]
 99framework = "MITRE ATT&CK"
100[[rule.threat.technique]]
101id = "T1069"
102name = "Permission Groups Discovery"
103reference = "https://attack.mitre.org/techniques/T1069/"
104[[rule.threat.technique.subtechnique]]
105id = "T1069.001"
106name = "Local Groups"
107reference = "https://attack.mitre.org/techniques/T1069/001/"
108
109[[rule.threat.technique.subtechnique]]
110id = "T1069.002"
111name = "Domain Groups"
112reference = "https://attack.mitre.org/techniques/T1069/002/"
113
114
115[[rule.threat.technique]]
116id = "T1087"
117name = "Account Discovery"
118reference = "https://attack.mitre.org/techniques/T1087/"
119[[rule.threat.technique.subtechnique]]
120id = "T1087.001"
121name = "Local Account"
122reference = "https://attack.mitre.org/techniques/T1087/001/"
123
124[[rule.threat.technique.subtechnique]]
125id = "T1087.002"
126name = "Domain Account"
127reference = "https://attack.mitre.org/techniques/T1087/002/"
128
129
130
131[rule.threat.tactic]
132id = "TA0007"
133name = "Discovery"
134reference = "https://attack.mitre.org/tactics/TA0007/"

Triage and analysis

Investigating Enumeration of Administrator Accounts

After successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.

This rule looks for the execution of the net and wmic utilities to enumerate administrator-related users or groups in the domain and local machine scope. Attackers can use this information to plan their next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.

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.
  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.

False positive analysis

  • Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.
  • AdFind Command Activity - eda499b8-a073-4e35-9733-22ec71f57f3a

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • 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).

Related rules

to-top