From 146f59f4bd63300c1cd2c2eadba94e8e00f5fd96 Mon Sep 17 00:00:00 2001 From: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com> Date: Mon, 25 Jul 2022 11:43:03 -0500 Subject: [PATCH] [New Rule] Chkconfig Service Add (#2159) * [New Rule] Chkconfig Service Add * Update rules/linux/persistence_chkconfig_service_add.toml --- .../persistence_chkconfig_service_add.toml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 rules/linux/persistence_chkconfig_service_add.toml diff --git a/rules/linux/persistence_chkconfig_service_add.toml b/rules/linux/persistence_chkconfig_service_add.toml new file mode 100644 index 000000000..df5e2bcb5 --- /dev/null +++ b/rules/linux/persistence_chkconfig_service_add.toml @@ -0,0 +1,48 @@ +[metadata] +creation_date = "2022/07/22" +maturity = "production" +updated_date = "2022/07/22" + +[rule] +author = ["Elastic"] +description = """ +Detects the use of the chkconfig binary to manually add a service for management by chkconfig. Threat actors may utilize this technique to maintain persistence on a system. When a new service is added, chkconfig ensures that the service has either a start or a kill entry in every runlevel and when the system is rebooted the service file added will run providing long-term persistence. +""" +from = "now-9m" +index = ["logs-*"] +language = "eql" +license = "Elastic License v2" +name = "Chkconfig Service Add" +references = [ + "https://www.intezer.com/blog/research/lightning-framework-new-linux-threat/" +] +risk_score = 74 +rule_id = "b910f25a-2d44-47f2-a873-aabdc0d355e6" +severity = "medium" +tags = ["Elastic", "Host", "Linux", "Threat Detection", "Persistence", "Lightning Framework"] +timestamp_override = "event.ingested" +type = "eql" + +query = ''' +process where event.type == "start" and + (process.executable : "/usr/sbin/chkconfig" and process.args : "--add") or + (process.args : "*chkconfig" and process.args : "--add") +''' + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1037" +name = "Boot or Logon Initialization Scripts" +reference = "https://attack.mitre.org/techniques/T1037/" + +[[rule.threat.technique.subtechnique]] +id = "T1037.004" +name = "RC Scripts" +reference = "https://attack.mitre.org/techniques/T1037/004/" + +[rule.threat.tactic] +id = "TA0003" +name = "Persistence" +reference = "https://attack.mitre.org/tactics/TA0003/" +