Skip to content

Commit 1153581

Browse files
committed
[New Rule] PAM Version Discovery
1 parent 2ff2965 commit 1153581

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
[metadata]
2+
creation_date = "2024/12/16"
3+
integration = ["endpoint"]
4+
maturity = "production"
5+
updated_date = "2024/12/16"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This rule detects PAM version discovery activity on Linux systems. PAM version discovery can be an indication of an
11+
attacker attempting to backdoor the authentication process through malicious PAM modules.
12+
"""
13+
from = "now-9m"
14+
index = ["logs-endpoint.events.*", "endgame-*"]
15+
language = "eql"
16+
license = "Elastic License v2"
17+
name = "PAM Version Discovery"
18+
references = [
19+
"https://www.group-ib.com/blog/pluggable-authentication-module/",
20+
"https://embracethered.com/blog/posts/2022/post-exploit-pam-ssh-password-grabbing/",
21+
]
22+
risk_score = 21
23+
rule_id = "135abb91-dcf4-48aa-b81a-5ad036b67c68"
24+
setup = """## Setup
25+
26+
This rule requires data coming in from Elastic Defend.
27+
28+
### Elastic Defend Integration Setup
29+
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.
30+
31+
#### Prerequisite Requirements:
32+
- Fleet is required for Elastic Defend.
33+
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
34+
35+
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
36+
- Go to the Kibana home page and click "Add integrations".
37+
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
38+
- Click "Add Elastic Defend".
39+
- Configure the integration name and optionally add a description.
40+
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
41+
- 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).
42+
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
43+
- 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.
44+
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).
45+
- Click "Save and Continue".
46+
- 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.
47+
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
48+
"""
49+
severity = "low"
50+
tags = [
51+
"Domain: Endpoint",
52+
"OS: Linux",
53+
"Use Case: Threat Detection",
54+
"Tactic: Discovery",
55+
"Data Source: Elastic Defend",
56+
"Data Source: Elastic Endgame",
57+
]
58+
timestamp_override = "event.ingested"
59+
type = "eql"
60+
query = '''
61+
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and (
62+
(process.name in ("dpkg", "dpkg-query") and process.args == "libpam-modules") or
63+
(process.name == "rpm" and process.args == "pam")
64+
)
65+
'''
66+
67+
[[rule.threat]]
68+
framework = "MITRE ATT&CK"
69+
70+
[[rule.threat.technique]]
71+
id = "T1082"
72+
name = "System Information Discovery"
73+
reference = "https://attack.mitre.org/techniques/T1082/"
74+
75+
[rule.threat.tactic]
76+
id = "TA0007"
77+
name = "Discovery"
78+
reference = "https://attack.mitre.org/tactics/TA0007/"

0 commit comments

Comments
 (0)