-
Notifications
You must be signed in to change notification settings - Fork 587
[New Rule/Tuning] Linux User or Group Deletion/Creation #4861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Aegrah
wants to merge
3
commits into
main
Choose a base branch
from
linux-user-or-group-deletion
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+72
−15
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[metadata] | ||
creation_date = "2025/06/30" | ||
integration = ["system"] | ||
maturity = "production" | ||
updated_date = "2025/06/30" | ||
|
||
[rule] | ||
author = ["Elastic"] | ||
description = """ | ||
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. | ||
""" | ||
from = "now-9m" | ||
index = ["filebeat-*", "logs-system.auth-*"] | ||
language = "eql" | ||
license = "Elastic License v2" | ||
name = "Linux User or Group Deletion" | ||
risk_score = 21 | ||
rule_id = "8f8004e1-0783-485f-a3da-aca4362f74a7" | ||
setup = """## Setup | ||
|
||
This rule requires data coming in from Filebeat. | ||
|
||
### Filebeat Setup | ||
Filebeat 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. | ||
|
||
#### The following steps should be executed in order to add the Filebeat on a Linux System: | ||
- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages. | ||
- 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). | ||
- 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). | ||
- 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). | ||
- 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). | ||
- 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). | ||
|
||
#### Rule Specific Setup Note | ||
- This rule requires the “Filebeat System Module” to be enabled. | ||
- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions. | ||
- 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). | ||
""" | ||
severity = "low" | ||
tags = [ | ||
"Domain: Endpoint", | ||
"OS: Linux", | ||
"Use Case: Threat Detection", | ||
"Tactic: Defense Evasion", | ||
] | ||
timestamp_override = "event.ingested" | ||
type = "eql" | ||
query = ''' | ||
iam where host.os.type == "linux" and event.type in ("group", "user") and event.type == "deletion" and event.outcome == "success" | ||
''' | ||
|
||
[[rule.threat]] | ||
framework = "MITRE ATT&CK" | ||
|
||
[[rule.threat.technique]] | ||
id = "T1070" | ||
name = "Indicator Removal" | ||
reference = "https://attack.mitre.org/techniques/T1070/" | ||
|
||
[rule.threat.tactic] | ||
id = "TA0005" | ||
name = "Defense Evasion" | ||
reference = "https://attack.mitre.org/tactics/TA0005/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should either ship the setup guide with the System integration mentioned or not include a setup guide at all. As is, this indicates that the rule requires filebeat, which is not true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is part of the comment above, I need to check all compatibility and make the rule compliant to that. That includes setup guides.