Detection rules › Elastic

Potential Process Creation via Direct Syscall

Source
github.com/elastic/protections-artifacts

Identifies the creation of a process with parent call stack not starting with Windows NT syscall DLLs such as ntdll and win32u. This may indicate the use of direct system calls to evade endpoint security solutions hooking Windows APIs.

MITRE ATT&CK coverage

TacticTechniques
Stealth

Rule body

[rule]
description = """
Identifies the creation of a process with parent call stack not starting with Windows NT syscall DLLs such as ntdll and
win32u. This may indicate the use of direct system calls to evade endpoint security solutions hooking Windows APIs.
"""
id = "c1738eb3-e6dd-4e84-bc52-b4d48d1fca8f"
license = "Elastic License v2"
name = "Potential Process Creation via Direct Syscall"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/upping-the-ante-detecting-in-memory-threats-with-kernel-call-stacks",
    "https://www.ired.team/offensive-security/defense-evasion/using-syscalls-directly-from-visual-studio-to-bypass-avs-edrs",
]
version = "1.0.23"

query = '''
process where event.action == "start" and
 process.parent.thread.Ext.call_stack_summary : "Unbacked|?*" and
 not (process.parent.thread.Ext.call_stack_summary : "Unbacked|embeddedbrowserwebview.dll|Unbacked" and
      _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info : "?:\\Program Files*\\Microsoft\\EdgeWebView\\*\\EmbeddedBrowserWebView.dll*")) and 
 not (process.code_signature.subject_name in~ ("BYFRON TECHNOLOGIES LLC", "Valve Corp.", "Sony Interactive Entertainment LLC", "Roblox Corporation") and process.code_signature.trusted == true) and
 not process.parent.executable :  "?:\\Program Files\\WindowsApps\\ROBLOXCORPORATION.ROBLOX_*\\Windows10Universal.exe" and
 not (process.parent.code_signature.subject_name == "Roblox Corporation" and process.parent.code_signature.trusted == true) and
 not (process.code_signature.subject_name == "Roblox Corporation" and process.code_signature.trusted == true) and
 not (process.parent.thread.Ext.call_stack_summary like "Unbacked|cymemdef64.dll|*" and
       _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info like "C:\\Program Files\\Cylance\\Desktop\\CyMemDef64.dll*")) and
 not (process.executable : "C:\\ProgramData\\Sony Interactive Entertainment Inc\\PSPC_SDK\\*\\crashpad_handler.exe" and
      process.parent.thread.Ext.call_stack_summary == "Unbacked|kernelbase.dll|kernel32.dll|gameoverlayrenderer64.dll|Unbacked")
'''

min_endpoint_version = "8.10.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.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.10.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
 process.parent.thread.Ext.call_stack_summary : "Unbacked|?*" and
 not (process.parent.thread.Ext.call_stack_summary : "Unbacked|embeddedbrowserwebview.dll|Unbacked" and
      _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info : "?:\\Program Files*\\Microsoft\\EdgeWebView\\*\\EmbeddedBrowserWebView.dll*")) and 
 not (process.code_signature.subject_name in~ ("BYFRON TECHNOLOGIES LLC", "Valve Corp.", "Sony Interactive Entertainment LLC", "Roblox Corporation") and process.code_signature.trusted == true) and
 not process.parent.executable :  "?:\\Program Files\\WindowsApps\\ROBLOXCORPORATION.ROBLOX_*\\Windows10Universal.exe" and
 not (process.parent.code_signature.subject_name == "Roblox Corporation" and process.parent.code_signature.trusted == true) and
 not (process.code_signature.subject_name == "Roblox Corporation" and process.code_signature.trusted == true) and
 not (process.parent.thread.Ext.call_stack_summary like "Unbacked|cymemdef64.dll|*" and
       _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info like "C:\\Program Files\\Cylance\\Desktop\\CyMemDef64.dll*")) and
 not (process.executable : "C:\\ProgramData\\Sony Interactive Entertainment Inc\\PSPC_SDK\\*\\crashpad_handler.exe" and
      process.parent.thread.Ext.call_stack_summary == "Unbacked|kernelbase.dll|kernel32.dll|gameoverlayrenderer64.dll|Unbacked")

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
process.parent.thread.Ext.call_stack_summarystarts_withUnbacked|cymemdef64.dll|excludes:process.parent.thread.Ext.call_stack_summary field:"process.parent.thread.Ext.call_stack_summary" value:"Unbacked|cymemdef64.dll|"
process.parent.thread.Ext.call_stack_summaryeqUnbacked|embeddedbrowserwebview.dll|Unbackedexcludes:process.parent.thread.Ext.call_stack_summary field:"process.parent.thread.Ext.call_stack_summary" value:"Unbacked|embeddedbrowserwebview.dll|Unbacked"
process.code_signature.subject_nameeqRoblox Corporationexcludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Roblox Corporation"
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.code_signature.subject_nameinBYFRON TECHNOLOGIES LLC, Roblox Corporation, Sony Interactive Entertainment LLC, Valve Corp.excludes:process.code_signature.subject_name
process.executablewildcardC:\ProgramData\Sony Interactive Entertainment Inc\PSPC_SDK\*\crashpad_handler.exeexcludes:process.executable field:"process.executable" value:"C:\ProgramData\Sony Interactive Entertainment Inc\PSPC_SDK\*\crashpad_handler.exe"
process.parent.thread.Ext.call_stack_summaryeqUnbacked|kernelbase.dll|kernel32.dll|gameoverlayrenderer64.dll|Unbackedexcludes:process.parent.thread.Ext.call_stack_summary field:"process.parent.thread.Ext.call_stack_summary" value:"Unbacked|kernelbase.dll|kernel32.dll|gameoverlayrenderer64.dll|Unbacked"
process.parent.code_signature.subject_nameeqRoblox Corporationexcludes:process.parent.code_signature.subject_name field:"process.parent.code_signature.subject_name" value:"Roblox Corporation"
process.parent.code_signature.trustedeqtrueexcludes:process.parent.code_signature.trusted field:"process.parent.code_signature.trusted" value:"true"
process.parent.executablewildcard?:\Program Files\WindowsApps\ROBLOXCORPORATION.ROBLOX_*\Windows10Universal.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Program Files\WindowsApps\ROBLOXCORPORATION.ROBLOX_*\Windows10Universal.exe"

Indicators

These rows show field, operator, and value matches.