Boot or Logon Autostart Execution: Kernel Modules and Extensions T1547.006

Tactics: Persistence, Privilege Escalation

Adversaries may modify the kernel to automatically execute programs on system boot. Loadable Kernel Modules (LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. For example, one type of module is the device driver, which allows the kernel to access hardware connected to the system.

Events covered

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

Authoring guide

Patterns shared across the 28 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (30 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
host.os.type15eq 15
EventType13eq 9, in 4exec, ProcessRollup2, exec_event, kextload, loaded-kernel-module
process_name11eq 9, in 2kmod, kernel, modprobe, insmod, sudo
event.type7eq 6, in 1start, creation, process_started
process.args6eq 3, contains 2, in 2, wildcard 2.ko, *.EndpointSecurity, --exec, --load, --remove
TargetFilename5contains 2, wildcard 2, eq 1, starts_with 1/boot/efi/efi/*/grub.cfg, /boot/grub/grub.cfg, /boot/grub2/grub.cfg, /etc/modprobe.conf, /etc/modprobe.d
comm4eq 4insmod, modprobe, rmmod
data_stream.dataset4eq 4system.syslog, fim.event
sourcetype4eq 4auditd
type4eq 4SYSCALL
event.category3eq 3file, driver
message3eq 3bpf_probe_write_user, loading out-of-tree module taints kernel., module verification failed: signature and/or required...
CommandLine2contains 2insmod, modprobe
auditd.data.syscall2in 2finit_module, init_module
esf.event_type2eq 217

Top indicator values (268 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
5606
EventTypein
ProcessRollup2
4117
EventTypein
exec
4171
EventTypein
exec_event
4139
EventTypein
start
4134
EventTypein
executed
388
EventTypein
process_started
374
sourcetypeeq
auditd
456
typeeq
SYSCALL
422
data_stream.dataseteq
system.syslog
35
process_nameeq
kernel
36
process_nameeq
modprobe
33
process_nameeq
insmod
22
EventTypeeq
kextload
23
EventTypeeq
loaded-kernel-module
22
TargetFilenamewildcard
/etc/modprobe.d/*
22
TargetFilenamewildcard
/etc/modules
22
TargetFilenamewildcard
/etc/modules-load.d/*
22
TargetFilenamewildcard
/run/modules-load.d/*
22
TargetFilenamewildcard
/usr/lib/modprobe.d/*
22
TargetFilenamewildcard
/usr/lib/modules-load.d/*
22
TargetFilenamewildcard
/usr/local/lib/modules-load.d/*
22
auditd.data.syscallin
finit_module
22
auditd.data.syscallin
init_module
22
commeq
insmod
22
esf.event_typeeq
17
23
event.categoryeq
file
231
process.argscontains
.ko
22
process.argseq
insmod
22
process.argseq
modprobe
22

Exclusions (168 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
Imageeq
/usr/bin/pacman
2
Imageeq
/opt/traps/bin/pmd
1
Imageeq
/sbin/dracut
1
Imageeq
/sbin/unsquashfs
1
Imageeq
/usr/bin/containerd
1
Imageeq
/usr/bin/dockerd
1
file.extensionin
dpkg-remove
2
process_namestarts_with
python
2
CurrentDirectoryeq
/tmp/newroot
1
CurrentDirectoryin
/opt/ds_agent
1
CurrentDirectoryin
/opt/vinchin/agent
1
CurrentDirectoryin
/var/opt/TrendMicro/vls_agent/am
1
CurrentDirectoryin
/var/opt/ds_agent/am
1
CurrentDirectorywildcard
/tmp/makeself*NVIDIA-Linux*
1
CurrentDirectorywildcard
/tmp/self*NVIDIA-Linux*
1

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Platform (all)
Domain (all)

Sigma 3 rules

Elastic 16 rules

Splunk 9 rules