Skip to content

Commit fe48309

Browse files
Aegrahw0rk3r
andauthored
[New Rule] Linux User Account Credential Modification (#4484)
* [New Rule] Linux User Account Credential Modification * Update rules/linux/persistence_user_credential_modification_via_echo.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]>
1 parent 342e180 commit fe48309

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
[metadata]
2+
creation_date = "2025/02/21"
3+
integration = ["endpoint"]
4+
maturity = "production"
5+
updated_date = "2025/02/21"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This rule detects Linux user account credential modification events where the echo command is
11+
used to directly echo a password into the passwd utility. This technique is used by malware
12+
to automate the process of user account credential modification on Linux systems post-infection.
13+
"""
14+
from = "now-9m"
15+
index = ["logs-endpoint.events.process*"]
16+
language = "eql"
17+
license = "Elastic License v2"
18+
name = "Linux User Account Credential Modification"
19+
risk_score = 21
20+
rule_id = "79e7291f-9e3b-4a4b-9823-800daa89c8f9"
21+
setup = """## Setup
22+
This rule requires data coming in from Elastic Defend.
23+
### Elastic Defend Integration Setup
24+
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
25+
#### Prerequisite Requirements:
26+
- Fleet is required for Elastic Defend.
27+
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
28+
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
29+
- Go to the Kibana home page and click "Add integrations".
30+
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
31+
- Click "Add Elastic Defend".
32+
- Configure the integration name and optionally add a description.
33+
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
34+
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
35+
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
36+
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
37+
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
38+
- Click "Save and Continue".
39+
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
40+
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
41+
"""
42+
severity = "low"
43+
tags = [
44+
"Domain: Endpoint",
45+
"OS: Linux",
46+
"Use Case: Threat Detection",
47+
"Tactic: Persistence",
48+
"Data Source: Elastic Defend"
49+
]
50+
timestamp_override = "event.ingested"
51+
type = "eql"
52+
query = '''
53+
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
54+
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
55+
process.command_line like~ "*echo*passwd*" and
56+
not (
57+
process.parent.command_line == "runc init" or
58+
process.parent.executable in ("/usr/bin/make", "/bin/make")
59+
)
60+
'''
61+
62+
[[rule.threat]]
63+
framework = "MITRE ATT&CK"
64+
65+
[[rule.threat.technique]]
66+
id = "T1098"
67+
name = "Account Manipulation"
68+
reference = "https://attack.mitre.org/techniques/T1098/"
69+
70+
[rule.threat.tactic]
71+
id = "TA0003"
72+
name = "Persistence"
73+
reference = "https://attack.mitre.org/tactics/TA0003/"

0 commit comments

Comments
 (0)