-
Notifications
You must be signed in to change notification settings - Fork 505
/
privilege_escalation_user_added_to_admin_group.toml
124 lines (104 loc) · 4.35 KB
/
privilege_escalation_user_added_to_admin_group.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
[metadata]
creation_date = "2024/09/12"
integration = ["jamf_protect"]
maturity = "production"
min_stack_comments = "The jamf integration is available for stack versions 8.12 and above"
min_stack_version = "8.12.0"
updated_date = "2024/09/12"
[transform]
[[transform.investigate]]
label = "Show events after Privilege Escalation"
relativeFrom = "now"
relativeTo = "now+30m"
providers = [
[
{field = "host.hostname", excluded = false, queryType = "phrase", value = "{{host.hostname}}", valueType = "string"}
]
]
[[transform.investigate]]
label = "Show events having the same reponsible process"
providers = [
[
{field = "host.hostname", excluded = false, queryType = "phrase", value = "{{host.hostname}}", valueType = "string"},
{field = "process.entity_id", excluded = false, queryType = "phrase", value = "{{process.group_leader.entity_id}}", valueType = "string"}
]
]
[[transform.investigate]]
label = "Show events having the same parent process"
providers = [
[
{field = "host.hostname", excluded = false, queryType = "phrase", value = "{{host.hostname}}", valueType = "string"},
{field = "process.entity_id", excluded = false, queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string"}
]
]
[rule]
author = ["Thijs Xhaflaire"]
description = """
Identifies users being added to the admin group. This could be an indication of privilege
escalation activity.
"""
from = "now-9m"
index = ["logs-jamf_protect*"]
language = "eql"
license = "Elastic License v2"
name = "User Added to the Admin Group"
references = [
"https://www.loobins.io/binaries/dscl/",
"https://managingosx.wordpress.com/2010/01/14/add-a-user-to-the-admin-group-via-command-line-3-0/"
]
note = """## Triage and analysis
To thoroughly investigate the actions that occurred **after a user was elevated to administrator**, it's essential to conduct a search on the Timeline. This allows you to review and understand the sequence of events that followed the elevation, helping to identify any potentially malicious or unauthorized activities that might have taken place. **Analyzing these actions is crucial for maintaining security and ensuring that the elevation was not exploited for harmful purposes.**
> **Note**:
> This investigation guide uses the [Investigate Markdown Plugin](https://www.elastic.co/guide/en/security/master/interactive-investigation-guides.html) introduced in Elastic Stack version 8.8.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
**Consider reviewing these actions:**
- Have persistency items been added?
- Is any software installed after elevation?
- Were any additional users created after elevation?
$investigate_0
$investigate_1
$investigate_2
"""
risk_score = 21
rule_id = "04e65517-16e9-4fc4-b7f1-94dc21ecea0d"
setup = """## Setup
This rule requires data coming in from Jamf Protect.
### Jamf Protect Integration Setup
Jamf Protect is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events incoming events and send data to the Elastic.
#### Prerequisite Requirements:
- Fleet is required for Jamf Protect.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Jamf Protect integration:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Jamf Protect" and select the integration to see more details about it.
- Click "Add Jamf Protect".
- Configure the integration name.
- Click "Save and Continue".
"""
severity = "low"
tags = [
"Domain: Endpoint",
"OS: macOS",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Data Source: Jamf Protect",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
configuration where host.os.type == "macos" and event.type == "change" and
event.action == "od_group_add" and group.name:"admin"
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique.subtechnique]]
id = "T1078.003"
name = "Local Accounts"
reference = "https://attack.mitre.org/techniques/T1078/003/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"