Tainted Kernel Module Load

This rule monitors the syslog log file for messages related to instances of a tainted kernel module load. 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/23"
 3integration = ["system"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/02/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12This rule monitors the syslog log file for messages related to instances of a tainted kernel module load. Rootkits often
13leverage kernel modules as their main defense evasion technique. Detecting tainted kernel module loads is crucial for
14ensuring system security and integrity, as malicious or unauthorized modules can compromise the kernel and lead to
15system vulnerabilities or unauthorized access.
16"""
17from = "now-9m"
18index = ["logs-system.syslog-*"]
19language = "kuery"
20license = "Elastic License v2"
21name = "Tainted Kernel Module Load"
22risk_score = 21
23rule_id = "05cad2fb-200c-407f-b472-02ea8c9e5e4a"
24setup = """## Setup
25
26This rule requires data coming in from one of the following integrations:
27- Filebeat
28
29### Filebeat Setup
30Filebeat 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.
31
32#### The following steps should be executed in order to add the Filebeat for the Linux System:
33- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
34- 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).
35- 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).
36- 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).
37- 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).
38- 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).
39
40#### Rule Specific Setup Note
41- This rule requires the Filebeat System Module to be enabled.
42- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions.
43- 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).
44"""
45severity = "low"
46tags = [
47        "Domain: Endpoint",
48        "OS: Linux",
49        "Use Case: Threat Detection",
50        "Tactic: Persistence",
51        "Tactic: Defense Evasion"
52        ]
53timestamp_override = "event.ingested"
54type = "query"
55query = '''
56host.os.type:linux and event.dataset:"system.syslog" and process.name:kernel and 
57message:"module verification failed: signature and/or required key missing - tainting kernel"
58'''
59
60[[rule.threat]]
61framework = "MITRE ATT&CK"
62
63[[rule.threat.technique]]
64id = "T1547"
65name = "Boot or Logon Autostart Execution"
66reference = "https://attack.mitre.org/techniques/T1547/"
67
68[[rule.threat.technique.subtechnique]]
69id = "T1547.006"
70name = "Kernel Modules and Extensions"
71reference = "https://attack.mitre.org/techniques/T1547/006/"
72
73[rule.threat.tactic]
74id = "TA0003"
75name = "Persistence"
76reference = "https://attack.mitre.org/tactics/TA0003/"
77
78[[rule.threat]]
79framework = "MITRE ATT&CK"
80
81[rule.threat.tactic]
82id = "TA0005"
83name = "Defense Evasion"
84reference = "https://attack.mitre.org/tactics/TA0005/"
85
86[[rule.threat.technique]]
87name = "Rootkit"
88id = "T1014"
89reference = "https://attack.mitre.org/techniques/T1014/"

Related rules

to-top