Detection rules › Elastic

Suspicious Electron Command Execution

Time window
15s
Sequence by
process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Detects the use of specific commandline arguments that can be used with certain Electron based applications to covertly execute code for a variety of purposes.

MITRE ATT&CK coverage

Telemetry coverage

Rule body

[rule]
description = """
Detects the use of specific commandline arguments that can be used with certain Electron based applications to covertly
execute code for a variety of purposes.
"""
id = "1f1b8910-e6b3-4d9d-9bf0-7a7728f5bce6"
license = "Elastic License v2"
name = "Suspicious Electron Command Execution"
os_list = ["macos"]
reference = ["https://medium.com/@MalFuzzer/one-electron-to-rule-them-all-dc2e9b263daf"]
version = "1.0.11"

query = '''
sequence with maxspan=15s
[process where event.type == "start" and event.action == "exec"  and 
  process.command_line like~ ("*--gpu-launcher=?*", 
                             "*--utility-cmd-prefix=?*", 
                             "*--browser-subprocess-path=?*", 
                             "*--renderer-cmd-prefix=?*") and
  not process.command_line like~ "*--browser-subprocess-path=/Users/*Chromium Helper*"] by process.entity_id
[process where event.type == "start" and event.action == "exec"] by process.parent.entity_id
'''

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

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[internal]
min_endpoint_version = "8.10.2"

Stages and Predicates

Ordered sequence: each step below must occur in order within 15s, correlated by process.entity_id, process.parent.entity_id.

Stage 1: process

[process where event.type == "start" and event.action == "exec"  and 
  process.command_line like~ ("*--gpu-launcher=?*", 
                             "*--utility-cmd-prefix=?*", 
                             "*--browser-subprocess-path=?*", 
                             "*--renderer-cmd-prefix=?*") and
  not process.command_line like~ "*--browser-subprocess-path=/Users/*Chromium Helper*"] by process.entity_id

Stage 2: process

[process where event.type == "start" and event.action == "exec"] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.command_linewildcard*--browser-subprocess-path=/Users/*Chromium Helper*excludes:process.command_line field:"process.command_line" value:"*--browser-subprocess-path=/Users/*Chromium Helper*"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec
field:"EventType" kind:eq value:"exec"
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.command_linewildcard
  • *--browser-subprocess-path=?*
  • *--gpu-launcher=?*
  • *--renderer-cmd-prefix=?*
  • *--utility-cmd-prefix=?*
field:"CommandLine" kind:wildcard