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

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

Authoring guide

These 45 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
EventType22eq 21, in 1exec, memfd_create, connection_attempted, load, load_module
Image16wildcard 9, regex_match 5, starts_with 3, is_not_null 2/boot/*, /dev/shm/*, ?memfd:*, /proc/(self|[0-9]{1,7})/fd/[0-9]{1,7}, memfd:*
process_basename11eq 5, starts_with 5, wildcard 3, in 2, is_not_null 2, ends_with 1bash, , *.bin, *.js, *.lua
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, wildcard 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.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(?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], AdjustTokenPrivileges, Assembly.Load(
process.Ext.api.parameters.size4gt 3, ge 14096, 10000, 66000
process.code_signature.trusted3eq 3false, true

Top indicator values (360 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
191036
EventTypeeq
exec
13547
EventTypeeq
memfd_create
77
EventTypeeq
connection_attempted
472
Imagewildcard
?memfd:*
910
Imagewildcard
memfd:*
89
Imagewildcard
/boot/*
418
Imagewildcard
/dev/shm/*
426
Imagewildcard
/lost+found/*
412
Imagewildcard
/proc/*
412
Imagewildcard
/run/user/*
412
Imagewildcard
/sys/*
412
Imagewildcard
/tmp/*
428
Imagewildcard
/var/mail/*
412
Imagewildcard
/var/run/user/*
412
Imagewildcard
/var/tmp/*
426
Imagewildcard
./*
314
Imagewildcard
/root/*
312
process.thread.Ext.call_stack_final_user_module.hash.sha256is_not_null
630
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
ParentImageis_not_null
393
event.typene
deletion
333
process.argsregex_match
/proc/(self|[0-9]{1,7})/fd/[0-9]{1,7}
33
process_basenamestarts_with
php*
317
process_basenamewildcard
lua*
329
process_basenamewildcard
perl*
325
process_basenamewildcard
php*
328
process_basenamewildcard
python*
332

Exclusions (768 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 40 rules

Splunk 2 rules