From 0ca16a15163627024634d442a4ad1facb8d4d90f Mon Sep 17 00:00:00 2001 From: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:35:25 +0200 Subject: [PATCH] [New Rule] User or Group Creation/Modification (#3804) --- ...ser_or_group_creation_or_modification.toml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 rules/linux/persistence_user_or_group_creation_or_modification.toml diff --git a/rules/linux/persistence_user_or_group_creation_or_modification.toml b/rules/linux/persistence_user_or_group_creation_or_modification.toml new file mode 100644 index 00000000000..cbd541dbbb0 --- /dev/null +++ b/rules/linux/persistence_user_or_group_creation_or_modification.toml @@ -0,0 +1,63 @@ +[metadata] +creation_date = "2024/06/20" +integration = ["auditd_manager"] +maturity = "production" +updated_date = "2024/06/20" + +[rule] +author = ["Elastic"] +description = """ +This rule leverages the `auditd_manager` integration to detect user or group creation or modification events on Linux +systems. Threat actors may attempt to create or modify users or groups to establish persistence on the system. +""" +from = "now-9m" +index = ["auditbeat-*", "logs-auditd_manager.auditd-*"] +language = "eql" +license = "Elastic License v2" +name = "User or Group Creation/Modification" +risk_score = 21 +rule_id = "fcf733d5-7801-4eb0-92ac-8ffacf3658f2" +setup = """## Setup +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. +``` +Kibana --> +Management --> +Integrations --> +Auditd Manager --> +Add Auditd Manager +``` +`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. +For this detection rule to trigger, no additional configuration is required. +""" +severity = "low" +tags = [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Auditd Manager", +] +timestamp_override = "event.ingested" +type = "eql" +query = ''' +iam where host.os.type == "linux" and event.type in ("creation", "change") and auditd.result == "success" and +event.action in ("changed-password", "added-user-account", "added-group-account-to") +''' + +[[rule.threat]] +framework = "MITRE ATT&CK" + +[[rule.threat.technique]] +id = "T1136" +name = "Create Account" +reference = "https://attack.mitre.org/techniques/T1136/" + +[[rule.threat.technique.subtechnique]] +id = "T1136.001" +name = "Local Account" +reference = "https://attack.mitre.org/techniques/T1136/001/" + +[rule.threat.tactic] +id = "TA0003" +name = "Persistence" +reference = "https://attack.mitre.org/tactics/TA0003/"