Process Injection T1055

Tactics: Stealth, Privilege Escalation

Adversaries may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges. Process injection is a method of executing arbitrary code in the address space of a separate live process. Running code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via process injection may also evade detection from security products since the execution is masked under a legitimate process.

Events covered

31 catalog events are tagged with this technique by at least one rule.

ProviderEventTitle
SysmonEvent ID 1Process creation
SysmonEvent ID 3Network connection
SysmonEvent ID 7Image loaded
SysmonEvent ID 8CreateRemoteThread
SysmonEvent ID 10ProcessAccess
SysmonEvent ID 11FileCreate
SysmonEvent ID 17PipeEvent (Pipe Created)
SysmonEvent ID 18PipeEvent (Pipe Connected)
SysmonEvent ID 25ProcessTampering (Process image change)
Security-AuditingEvent ID 4688A new process has been created.
Security-AuditingEvent ID 5145A network share object was checked to see whether client can be granted desired access.
Security-AuditingEvent ID 5156The Windows Filtering Platform has permitted a connection.
Defender-DeviceEventsanyDefender event
Defender-DeviceEventsCreateRemoteThreadApiCallCreateRemoteThread API call
Defender-DeviceEventsNamedPipeEventNamed pipe event
Defender-DeviceEventsNtAllocateVirtualMemoryRemoteApiCallRemote virtual memory allocation (NtAllocateVirtualMemory)
Defender-DeviceEventsMemoryRemoteProtectRemote virtual memory protection change
Defender-DeviceEventsNtMapViewOfSectionRemoteApiCallRemote section map (NtMapViewOfSection)
Defender-DeviceEventsQueueUserApcRemoteApiCallRemote APC queued (QueueUserApc)
Defender-DeviceEventsSetThreadContextRemoteApiCallRemote thread context change (SetThreadContext)
Defender-DeviceEventsNtAllocateVirtualMemoryApiCallNtAllocateVirtualMemory API call
Defender-DeviceEventsNtProtectVirtualMemoryApiCallNtProtectVirtualMemory API call
Defender-DeviceEventsReadProcessMemoryApiCallReadProcessMemory API call
Defender-DeviceNetworkEventsConnectionSuccessConnection succeeded
ESFwriteFile Write
Linux-AuditdEvent ID 1300SYSCALL
Linux-AuditdEvent ID 1309EXECVE
PowerShellEvent ID 4103Payload Context: ContextInfo User Data: UserData.
PowerShellEvent ID 4104Creating Scriptblock text (MessageNumber of MessageTotal).
Windows-DefenderEvent ID 1119ProductName has encountered a critical error when taking action on malware or other potentially unwanted software.
Sysmon-for-LinuxEvent ID 1Process Create

Authoring guide

These 329 rules share fields, values, and exclusions.

Fields filtered most (158 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
Image88is_not_null 38, ends_with 26, starts_with 16, wildcard 9, contains 4, regex_match 4, eq 2, is_null 2, cross_field_compare 1?memfd:, memfd:, \svchost.exe, ./*, /boot/*
process.Ext.api.name83eq 44, in 35, starts_with 5, wildcard 3, ne 1MapViewOfFile, VirtualProtect, MapViewOfFile2, VirtualAlloc, WriteProcessMemory
process.thread.Ext.call_stack_summary81starts_with 23, eq 20, in 15, wildcard 10, regex_match 7, contains 6, ends_with 3, is_not_null 3, match 3, length_compare 1, ne 1ntdll.dll|kernelbase.dll|Unbacked, ntdll.dll|Unbacked, ?, ntdll.dll|kernelbase.dll|kernel32.dll|Unbacked, ntdll.dll|
EventType71eq 67, in 2, ne 2start, exec, end, connection_attempted, memfd_create
process_name60eq 41, in 6, is_not_null 4, regex_match 4, starts_with 4, wildcard 4, ends_with 2, ne 1cmd.exe, rundll32.exe, gdb, cmstp.exe, cscript.exe
process.Ext.api.behaviors54eq 39, in 17, ne 4allocate_shellcode, cross-process, shellcode, execute_shellcode, execute_fluctuation
process.thread.Ext.call_stack54array_any 54
EventID46eq 42, in 51, 4688, 8, 17, 18
process.thread.Ext.call_stack_final_user_module.name44eq 28, is_not_null 10, ne 5, in 3, wildcard 3, starts_with 1Unbacked, Undetermined, Kernel, unbacked, Unknown
CommandLine38contains 17, regex_match 10, in 7, eq 4, ends_with 3, is_null 3, length_compare 2, wildcard 1(?i)((backgroundtaskhost|svchost|dllhost|werfault|searchp..., (?i)(davclnt.dll.*DavSetCookie.*://\d{1,3}\.\d{1,3}\.\d{1..., (?i)WdiSystemHost|LicenseManager|StorSvc|CDPSvc|cdbhsvc|B..., *dllhost, *dllhost.exe
parent_process_name33eq 21, is_not_null 5, regex_match 5, in 2, ne 1, wildcard 1explorer.exe, powershell.exe, (?i)lsass\.exe, (?i)svchost, autochk.exe
ParentImage32is_not_null 12, ends_with 10, starts_with 7, eq 4, wildcard 2?:\, ?:\programdata\*, ?:\users\*\appdata\*, ?memfd:, ?:\programdata\
event.type32eq 29, ne 2, in 1start, change, deletion, denied, allowed
process.Ext.api.parameters.size32ge 19, eq 6, gt 4, ne 310000, 100000, 0, 4000, 4096
dll.name31eq 23, in 5, is_not_null 2, wildcard 2winhttp.dll, wininet.dll, ws2_32.dll, clr.dll, dnsapi.dll

Top indicator values (2349 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
EventTypeeq
start
36391
EventTypeeq
exec
10576
EventTypeeq
end
918
event.typeeq
start
271078
process.Ext.api.namein
VirtualProtect
2435
process.Ext.api.namein
VirtualAlloc
2227
process.Ext.api.namein
VirtualProtectEx
2229
process.Ext.api.namein
MapViewOfFile
2124
process.Ext.api.namein
MapViewOfFile2
2124
process.Ext.api.namein
VirtualAllocEx
2022
process.Ext.api.namein
WriteProcessMemory
2023
process.Ext.api.namein
SuspendThread
1112
process.Ext.api.namein
SetThreadContext
1014
process.Ext.api.behaviorseq
cross-process
1820
process.Ext.api.nameeq
VirtualProtect
1619
process.Ext.api.nameeq
WriteProcessMemory
1014
process.thread.Ext.call_stack_final_user_module.nameeq
Unbacked
1521
dll.nameeq
ws2_32.dll
1420
dll.nameeq
wininet.dll
1318
dll.nameeq
winhttp.dll
1016
process.Ext.api.behaviorsin
allocate_shellcode
1415
process.Ext.api.behaviorsin
shellcode
1415
process.Ext.api.behaviorsin
execute_shellcode
1010
process_idne
4
1244
process.Ext.api.parameters.sizege
10000
1011
process.thread.Ext.call_stack_summaryin
ntdll.dll|kernelbase.dll|Unbacked
1011
EventIDeq
1
9241
EventIDeq
4688
9317
EventIDeq
8
910
event.categoryeq
process
8142

Exclusions (3623 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
process.code_signature.trustedeq
true
51
process.thread.Ext.call_stack_final_user_module.namein
Kernel
23
process.thread.Ext.call_stack_final_user_module.namein
Unknown
22
process.thread.Ext.call_stack_final_user_module.namein
Undetermined
16
process_nameeq
rundll32.exe
13
process.Ext.api.nameeq
VirtualProtect
12
Imagewildcard
?:\program files (x86)\*.exe
11
Imagewildcard
?:\program files\*.exe
10
process.thread.Ext.call_stack_final_user_module.protection_provenancewildcard
Kernel
10
process.thread.Ext.call_stack_final_user_module.protection_provenancewildcard
Kernel|*
10
user.ideq
S-1-5-18
9
Imagestarts_with
?:\program files (x86)\
8
Imagestarts_with
?:\program files\
8
process.thread.Ext.call_stack_final_user_module.pathwildcard
?:\program files (x86)\*
8
process.thread.Ext.call_stack_final_user_module.pathwildcard
?:\program files\*
8

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 54 rules

Elastic 203 rules

Splunk 63 rules

Kusto 9 rules