Tainted Out-Of-Tree Kernel Module Load
This rule monitors the syslog log file for messages related to instances of a out-of-tree kernel module load, indicating the taining of the kernel. Rootkits often leverage kernel modules as their main defense evasion technique. Detecting tainted kernel module loads is crucial for ensuring system security and integrity, as malicious or unauthorized modules can compromise the kernel and lead to system vulnerabilities or unauthorized access.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2023/10/26"
3integration = ["system"]
4maturity = "production"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Elastic"]
9description = """
10This rule monitors the syslog log file for messages related to instances of a out-of-tree kernel module load, indicating
11the taining of the kernel. Rootkits often leverage kernel modules as their main defense evasion technique. Detecting
12tainted kernel module loads is crucial for ensuring system security and integrity, as malicious or unauthorized modules
13can compromise the kernel and lead to system vulnerabilities or unauthorized access.
14"""
15from = "now-9m"
16index = ["logs-system.syslog-*"]
17language = "kuery"
18license = "Elastic License v2"
19name = "Tainted Out-Of-Tree Kernel Module Load"
20risk_score = 21
21rule_id = "51a09737-80f7-4551-a3be-dac8ef5d181a"
22setup = """## Setup
23
24This rule requires data coming in from one of the following integrations:
25- Filebeat
26
27### Filebeat Setup
28Filebeat is a lightweight shipper for forwarding and centralizing log data. Installed as an agent on your servers, Filebeat monitors the log files or locations that you specify, collects log events, and forwards them either to Elasticsearch or Logstash for indexing.
29
30#### The following steps should be executed in order to add the Filebeat for the Linux System:
31- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
32- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setup-repositories.html).
33- To run Filebeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html).
34- To run Filebeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-kubernetes.html).
35- For quick start information for Filebeat refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/8.11/filebeat-installation-configuration.html).
36- For complete Setup and Run Filebeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setting-up-and-running.html).
37
38#### Rule Specific Setup Note
39- This rule requires the Filebeat System Module to be enabled.
40- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions.
41- To run the system module of Filebeat on Linux follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-system.html).
42"""
43severity = "low"
44tags = [
45 "Domain: Endpoint",
46 "OS: Linux",
47 "Use Case: Threat Detection",
48 "Tactic: Persistence",
49 "Tactic: Defense Evasion",
50]
51timestamp_override = "event.ingested"
52type = "query"
53
54query = '''
55host.os.type:linux and event.dataset:"system.syslog" and process.name:kernel and
56message:"loading out-of-tree module taints kernel."
57'''
58
59
60[[rule.threat]]
61framework = "MITRE ATT&CK"
62[[rule.threat.technique]]
63id = "T1547"
64name = "Boot or Logon Autostart Execution"
65reference = "https://attack.mitre.org/techniques/T1547/"
66[[rule.threat.technique.subtechnique]]
67id = "T1547.006"
68name = "Kernel Modules and Extensions"
69reference = "https://attack.mitre.org/techniques/T1547/006/"
70
71
72
73[rule.threat.tactic]
74id = "TA0003"
75name = "Persistence"
76reference = "https://attack.mitre.org/tactics/TA0003/"
77[[rule.threat]]
78framework = "MITRE ATT&CK"
79[[rule.threat.technique]]
80id = "T1014"
81name = "Rootkit"
82reference = "https://attack.mitre.org/techniques/T1014/"
83
84
85[rule.threat.tactic]
86id = "TA0005"
87name = "Defense Evasion"
88reference = "https://attack.mitre.org/tactics/TA0005/"
Related rules
- Kernel Driver Load
- Kernel Driver Load by non-root User
- Tainted Kernel Module Load
- Deprecated - Potential Process Injection via LD_PRELOAD Environment Variable
- Attempt to Clear Kernel Ring Buffer