[rule]
description = """
Identifies the execution of a process from the Windows Console host and from an unbacked memeory region. This may
indicate an attempt to inject code via the ConsoleWindowClass method.
"""
id = "2ad63716-3dc3-49ba-b682-ef4b9e4a4d87"
license = "Elastic License v2"
name = "Potential Injection via the Console Window Class"
os_list = ["windows"]
reference = [
"https://github.com/odzhan/injection/tree/master/conhost",
"https://modexp.wordpress.com/2018/09/12/process-injection-user-data/",
"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
process.parent.name : "conhost.exe" and
process.parent.thread.Ext.call_stack_contains_unbacked == true and
process.parent.thread.Ext.call_stack_summary : "*kernelbase.dll|Unbacked*" and
not process.executable : "C:\\Program Files (x86)\\Microsoft Intune Management Extension\\AgentExecutor.exe"
'''
min_endpoint_version = "8.8.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
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.8.0"