Detection rules › Elastic

Process Stared via Remote Thread

Source
github.com/elastic/protections-artifacts

Identifies the creation of a process with parent call stack not pointing to normal process creation APIs. This may indicate process creation as a result of code injection.

MITRE ATT&CK coverage

TacticTechniques
Stealth

Rule body

[rule]
description = """
Identifies the creation of a process with parent call stack not pointing to normal process creation APIs. This may
indicate process creation as a result of code injection.
"""
id = "697151c0-a1bd-498e-9056-6c726ce592b7"
license = "Elastic License v2"
name = "Process Stared via Remote Thread"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/upping-the-ante-detecting-in-memory-threats-with-kernel-call-stacks",
]
version = "1.0.19"

query = '''
process where event.action == "start" and
 _arraysearch(process.parent.thread.Ext.call_stack, $entry,
              $entry.symbol_info: ("?:\\Windows\\System32\\ntdll.dll!ZwCreateThreadEx*",
                                   "?:\\Windows\\System32\\ntdll.dll!NtCreateThreadEx*")) and
 not _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info: ("*CreateProcess*", "*CreateUserProcess*"))
'''

min_endpoint_version = "8.7.0"
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 = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
 _arraysearch(process.parent.thread.Ext.call_stack, $entry,
              $entry.symbol_info: ("?:\\Windows\\System32\\ntdll.dll!ZwCreateThreadEx*",
                                   "?:\\Windows\\System32\\ntdll.dll!NtCreateThreadEx*")) and
 not _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info: ("*CreateProcess*", "*CreateUserProcess*"))

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.parent.thread.Ext.call_stackarray_any(no value, null check)excludes:process.parent.thread.Ext.call_stack

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"