|
| 1 | +[metadata] |
| 2 | +creation_date = "2020/04/12" |
| 3 | +integration = ["auditd_manager"] |
| 4 | +maturity = "production" |
| 5 | +min_stack_comments = "New fields added: required_fields, related_integrations, setup" |
| 6 | +min_stack_version = "8.3.0" |
| 7 | +updated_date = "2023/06/12" |
| 8 | + |
| 9 | +[rule] |
| 10 | +author = ["Elastic"] |
| 11 | +description = """ |
| 12 | +Loadable Kernel Modules (or LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They |
| 13 | +extend the functionality of the kernel without the need to reboot the system. This identifies attempts to enumerate |
| 14 | +information about a kernel module using the /proc/modules filesystem. This filesystem is used by utilities such as |
| 15 | +lsmod and kmod to list the available kernel modules. |
| 16 | +""" |
| 17 | +false_positives = [ |
| 18 | + """ |
| 19 | + Security tools and device drivers may run these programs in order to enumerate kernel modules. Use of these programs |
| 20 | + by ordinary users is uncommon. These can be exempted by process name or username. |
| 21 | + """, |
| 22 | +] |
| 23 | +from = "now-9m" |
| 24 | +index = ["auditbeat-*", "logs-auditd_manager.auditd-*"] |
| 25 | +language = "eql" |
| 26 | +license = "Elastic License v2" |
| 27 | +name = "Enumeration of Kernel Modules via Proc" |
| 28 | +note = """## Setup |
| 29 | +This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. |
| 30 | +``` |
| 31 | +Kibana --> |
| 32 | +Management --> |
| 33 | +Integrations --> |
| 34 | +Auditd Manager --> |
| 35 | +Add Auditd Manager |
| 36 | +``` |
| 37 | +`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the "audit rules" configuration box or the "auditd rule files" box by specifying a file to read the audit rules from. |
| 38 | +For this detection rule to trigger, the following additional audit rules are required to be added to the integration: |
| 39 | +``` |
| 40 | +-w /proc/ -p r -k audit_proc |
| 41 | +``` |
| 42 | +Add the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable. |
| 43 | +""" |
| 44 | +risk_score = 47 |
| 45 | +rule_id = "80084fa9-8677-4453-8680-b891d3c0c778" |
| 46 | +severity = "medium" |
| 47 | +tags = ["Elastic", "Host", "Linux", "Threat Detection", "Discovery"] |
| 48 | +timestamp_override = "event.ingested" |
| 49 | +type = "eql" |
| 50 | + |
| 51 | +query = ''' |
| 52 | +file where host.os.type == "linux" and event.action == "opened-file" and |
| 53 | +file.path == "/proc/modules" and not process.parent.pid == 1 |
| 54 | +''' |
| 55 | + |
| 56 | + |
| 57 | +[[rule.threat]] |
| 58 | +framework = "MITRE ATT&CK" |
| 59 | +[[rule.threat.technique]] |
| 60 | +id = "T1082" |
| 61 | +name = "System Information Discovery" |
| 62 | +reference = "https://attack.mitre.org/techniques/T1082/" |
| 63 | + |
| 64 | + |
| 65 | +[rule.threat.tactic] |
| 66 | +id = "TA0007" |
| 67 | +name = "Discovery" |
| 68 | +reference = "https://attack.mitre.org/tactics/TA0007/" |
| 69 | + |
0 commit comments