Linux User or Group Deletion
This rule detects the deletion of user or group accounts on Linux systems. Adversaries may use these commands to remove accounts to cover their tracks or disrupt operations.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/01/08"
3integration = ["system"]
4maturity = "production"
5updated_date = "2026/01/08"
6
7[rule]
8author = ["Elastic"]
9description = """
10This rule detects the deletion of user or group accounts on Linux systems. Adversaries may use these
11commands to remove accounts to cover their tracks or disrupt operations.
12"""
13from = "now-9m"
14index = ["filebeat-*", "logs-system.auth-*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Linux User or Group Deletion"
18risk_score = 21
19rule_id = "8f8004e1-0783-485f-a3da-aca4362f74a7"
20setup = """## Setup
21
22This rule requires data coming in from Filebeat.
23
24### Filebeat Setup
25Filebeat 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.
26
27#### The following steps should be executed in order to add the Filebeat on a Linux System:
28- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
29- 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).
30- 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).
31- 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).
32- 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).
33- 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).
34
35#### Rule Specific Setup Note
36- This rule requires the “Filebeat System Module” to be enabled.
37- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions.
38- 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).
39"""
40severity = "low"
41tags = [
42 "Domain: Endpoint",
43 "OS: Linux",
44 "Use Case: Threat Detection",
45 "Tactic: Defense Evasion",
46]
47timestamp_override = "event.ingested"
48type = "eql"
49query = '''
50iam where host.os.type == "linux" and event.type in ("group", "user") and event.type == "deletion" and event.outcome == "success"
51'''
52
53[[rule.threat]]
54framework = "MITRE ATT&CK"
55
56[[rule.threat.technique]]
57id = "T1070"
58name = "Indicator Removal"
59reference = "https://attack.mitre.org/techniques/T1070/"
60
61[rule.threat.tactic]
62id = "TA0005"
63name = "Defense Evasion"
64reference = "https://attack.mitre.org/tactics/TA0005/"
Related rules
- Suspicious Path Invocation from Command Line
- Kernel Seeking Activity
- Kernel Unpacking Activity
- Access Control List Modification via setfacl
- Attempt to Clear Kernel Ring Buffer