Account Discovery Command via SYSTEM Account

Identifies when the SYSTEM account uses an account discovery utility. This could be a sign of discovery activity after an adversary has achieved privilege escalation.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/03/18"
  3integration = ["endpoint", "windows"]
  4maturity = "production"
  5updated_date = "2026/05/04"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies when the SYSTEM account uses an account discovery utility. This could be a sign of discovery activity after
 11an adversary has achieved privilege escalation.
 12"""
 13from = "now-9m"
 14index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*"]
 15language = "eql"
 16license = "Elastic License v2"
 17name = "Account Discovery Command via SYSTEM Account"
 18note = """## Triage and analysis
 19
 20### Investigating Account Discovery Command via SYSTEM Account
 21
 22After 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.
 23
 24This rule looks for the execution of account discovery utilities using the SYSTEM account, which is commonly observed after attackers successfully perform privilege escalation or exploit web applications.
 25
 26#### Possible investigation steps
 27
 28- 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.
 29  - If the process tree includes a web-application server process such as w3wp, httpd.exe, nginx.exe and alike, investigate any suspicious file creation or modification in the last 48 hours to assess the presence of any potential webshell backdoor.
 30- Investigate other alerts associated with the user/host during the past 48 hours.
 31- Determine how the SYSTEM account is being used. For example, users with administrator privileges can spawn a system shell using Windows services, scheduled tasks or other third party utilities.
 32
 33### False positive analysis
 34
 35- 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.
 36
 37### Response and remediation
 38
 39- Initiate the incident response process based on the outcome of the triage.
 40- Isolate the involved hosts to prevent further post-compromise behavior.
 41- 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.
 42- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 43- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
 44- 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).
 45- Use the data collected through the analysis to investigate other machines affected in the environment.
 46"""
 47risk_score = 21
 48rule_id = "2856446a-34e6-435b-9fb5-f8f040bfa7ed"
 49setup = """## Setup
 50
 51This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
 52
 53Setup instructions: https://ela.st/install-elastic-defend
 54
 55### Additional data sources
 56
 57This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
 58
 59- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
 60"""
 61severity = "low"
 62tags = [
 63    "Domain: Endpoint",
 64    "OS: Windows",
 65    "Use Case: Threat Detection",
 66    "Tactic: Discovery",
 67    "Tactic: Privilege Escalation",
 68    "Resources: Investigation Guide",
 69    "Data Source: Elastic Defend",
 70    "Data Source: Sysmon",
 71]
 72timestamp_override = "event.ingested"
 73type = "eql"
 74
 75query = '''
 76process where host.os.type == "windows" and event.type == "start" and
 77  (?process.Ext.token.integrity_level_name : "System" or
 78  ?winlog.event_data.IntegrityLevel : "System") and
 79  (
 80    process.name : "whoami.exe" or
 81    (
 82      process.name : "net1.exe" and not process.parent.name : "net.exe" and not process.args : ("start", "stop", "/active:*")
 83    )
 84  ) and 
 85process.parent.executable != null and 
 86not (process.name : "net1.exe" and process.working_directory : "C:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Downloads\\") and 
 87not process.parent.executable : 
 88                ("C:\\Program Files\\Microsoft Monitoring Agent\\Agent\\MonitoringHost.exe", 
 89                 "C:\\Program Files\\Dell\\SupportAssistAgent\\SRE\\SRE.exe", 
 90                 "C:\\Program Files\\Obkio Agent\\main.dist\\ObkioAgentSoftware.exe", 
 91                 "C:\\Windows\\Temp\\WinGet\\defaultState\\PostgreSQL.PostgreSQL*\\postgresql-*-windows-x64.exe", 
 92                 "C:\\Program Files\\Obkio Agent\\main.dist\\ObkioAgentSoftware.exe", 
 93                 "C:\\Program Files (x86)\\SolarWinds\\Agent\\Plugins\\JobEngine\\SWJobEngineWorker2.exe") and 
 94not (process.parent.executable : "C:\\Windows\\Sys?????\\WindowsPowerShell\\v1.0\\powershell.exe" and 
 95     process.parent.args : ("C:\\Program Files (x86)\\Microsoft Intune Management Extension\\*.ps1", 
 96                            "Agent\\Modules\\AdHealthConfiguration\\AdHealthConfiguration.psd1'")) and 
 97not (process.parent.name : "cmd.exe" and process.working_directory : "C:\\Program Files\\Infraon Corp\\SecuraAgent\\")
 98'''
 99
100
101[[rule.threat]]
102framework = "MITRE ATT&CK"
103
104[[rule.threat.technique]]
105id = "T1033"
106name = "System Owner/User Discovery"
107reference = "https://attack.mitre.org/techniques/T1033/"
108
109[[rule.threat.technique]]
110id = "T1087"
111name = "Account Discovery"
112reference = "https://attack.mitre.org/techniques/T1087/"
113
114[rule.threat.tactic]
115id = "TA0007"
116name = "Discovery"
117reference = "https://attack.mitre.org/tactics/TA0007/"
118
119[[rule.threat]]
120framework = "MITRE ATT&CK"
121
122[[rule.threat.technique]]
123id = "T1078"
124name = "Valid Accounts"
125reference = "https://attack.mitre.org/techniques/T1078/"
126
127[[rule.threat.technique.subtechnique]]
128id = "T1078.003"
129name = "Local Accounts"
130reference = "https://attack.mitre.org/techniques/T1078/003/"
131
132[rule.threat.tactic]
133id = "TA0004"
134name = "Privilege Escalation"
135reference = "https://attack.mitre.org/tactics/TA0004/"

Triage and analysis

Investigating Account Discovery Command via SYSTEM Account

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 account discovery utilities using the SYSTEM account, which is commonly observed after attackers successfully perform privilege escalation or exploit web applications.

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.
    • If the process tree includes a web-application server process such as w3wp, httpd.exe, nginx.exe and alike, investigate any suspicious file creation or modification in the last 48 hours to assess the presence of any potential webshell backdoor.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Determine how the SYSTEM account is being used. For example, users with administrator privileges can spawn a system shell using Windows services, scheduled tasks or other third party utilities.

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.

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 via 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).
  • Use the data collected through the analysis to investigate other machines affected in the environment.

Related rules

to-top