Reflective Code Loading T1620

Tactic: Stealth

Adversaries may reflectively load code into a process in order to conceal the execution of malicious payloads. Reflective loading involves allocating then executing payloads directly within the memory of the process, vice creating a thread or process backed by a file path on disk (e.g., Shared Modules).

Events covered

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

Authoring guide

These 44 rules share fields, values, and exclusions.

Fields filtered most (43 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
event.type24eq 21, ne 3start, deletion, denied, allowed
EventType21eq 21exec, memfd_create, connection_attempted, load, load_module
Image16starts_with 10, regex_match 5, is_not_null 2, wildcard 2?memfd:, /boot/, /dev/shm/, /proc/(self|[0-9]{1,7})/fd/[0-9]{1,7}, memfd:
process_name12eq 6, starts_with 5, wildcard 3, in 2, is_not_null 2, ends_with 1bash, ., awk, base64, node
process.Ext.api.name8eq 4, in 4VirtualProtect, MapViewOfFile, MapViewOfFile2, SetThreadContext, VirtualAlloc
process.Ext.api.behaviors6eq 4, in 2, ne 2allocate_shellcode, hidden_code, execute_fluctuation, guarded_code, image_rop
process.args6regex_match 3, starts_with 3, eq 2, wildcard 2/proc/(self|[0-9]{1,7})/fd/[0-9]{1,7}, -c, -e, -r, if=
process.thread.Ext.call_stack_final_user_module.hash.sha2566is_not_null 6
ParentImage5is_not_null 3, starts_with 2?memfd:, memfd:
process.Ext.api.metadata.target_address_name5eq 3, in 2Unbacked, ntdll.dll, Unknown, kernel32.dll, kernelbase.dll
process.thread.Ext.call_stack_final_user_module.code_signature5array_any 4, is_not_null 2
process.thread.Ext.call_stack_final_user_module.name5ne 3, eq 2, is_not_null 1Unbacked, Undetermined, jvm.dll
EventID4eq 2, in 2memory_signature, shellcode_thread, 4104, 7
ScriptBlockText4contains 2, in 2, match 1, regex_match 1[reflection.assembly]::load, (?i)[c][r][e][a][t][e][p][r][o][c][e][s][s], (?i)[c][r][e][a][t][e][r][e][m][o][t][e][t][h][r][e][a][d], (?i)[c][r][e][a][t][e][t][h][r][e][a][d], [system.reflection.assembly]::load
host.os.type4eq 4

Top indicator values (353 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
191078
EventTypeeq
exec
13576
EventTypeeq
memfd_create
77
EventTypeeq
connection_attempted
473
EventTypeeq
load
224
EventTypeeq
load_module
26
Imagestarts_with
?memfd:
77
Imagestarts_with
memfd:
66
Imagestarts_with
/boot/
428
Imagestarts_with
/dev/shm/
453
Imagestarts_with
/tmp/
358
Imagestarts_with
/var/tmp/
356
Imagestarts_with
/lost+found/
213
Imagestarts_with
/proc/
213
Imagestarts_with
/run/user/
211
Imagestarts_with
/sys/
214
Imagestarts_with
/var/mail/
214
Imageregex_match
/proc/(self|[0-9]{1,7})/fd/[0-9]{1,7}
55
process.Ext.api.namein
VirtualProtect
435
process.Ext.api.namein
VirtualAlloc
327
event.typene
deletion
332
process.argsregex_match
/proc/(self|[0-9]{1,7})/fd/[0-9]{1,7}
33
process_namestarts_with
php
328
process_namewildcard
lua*
332
process_namewildcard
perl*
335
process_namewildcard
php*
339
process_namewildcard
python*
369
process_namewildcard
ruby*
333
EventIDin
memory_signature
25
EventIDin
shellcode_thread
25

Exclusions (719 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
dest_ipcidr_match
127.0.0.0/8
5
dest_ipcidr_match
169.254.0.0/16
5
dest_ipcidr_match
224.0.0.0/4
5
dest_ipcidr_match
::1
5
dest_ipcidr_match
100.64.0.0/10
4
dest_ipcidr_match
172.16.0.0/12
4
dest_ipcidr_match
192.0.0.0/24
4
dest_ipcidr_match
192.0.0.0/29
4
dest_ipcidr_match
192.0.0.10/32
4
dest_ipcidr_match
192.0.0.170/32
4
dest_ipcidr_match
192.0.0.171/32
4
dest_ipcidr_match
192.0.0.8/32
4
dest_ipcidr_match
192.0.0.9/32
4
dest_ipcidr_match
192.0.2.0/24
4
dest_ipcidr_match
192.168.0.0/16
4

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 3 rules

Elastic 39 rules

Splunk 2 rules