User Added to Privileged Group
Identifies a user being added to a privileged group in Active Directory. Privileged accounts and groups in Active Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly any action in Active Directory and on domain-joined systems.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/01/09"
3integration = ["system", "windows"]
4maturity = "production"
5updated_date = "2024/10/15"
6min_stack_version = "8.14.0"
7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
8
9[rule]
10author = ["Elastic", "Skoetting"]
11description = """
12Identifies a user being added to a privileged group in Active Directory. Privileged accounts and groups in Active
13Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly
14any action in Active Directory and on domain-joined systems.
15"""
16from = "now-9m"
17index = ["winlogbeat-*", "logs-system.*", "logs-windows.*"]
18language = "eql"
19license = "Elastic License v2"
20name = "User Added to Privileged Group"
21note = """## Triage and analysis
22
23### Investigating User Added to Privileged Group in Active Directory
24
25Privileged accounts and groups in Active Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly any action in Active Directory and on domain-joined systems.
26
27Attackers can add users to privileged groups to maintain a level of access if their other privileged accounts are uncovered by the security team. This allows them to keep operating after the security team discovers abused accounts.
28
29This rule monitors events related to a user being added to a privileged group.
30
31#### Possible investigation steps
32
33- Identify the user account that performed the action and whether it should manage members of this group.
34- Contact the account owner and confirm whether they are aware of this activity.
35- Investigate other alerts associated with the user/host during the past 48 hours.
36
37### False positive analysis
38
39- This attack abuses a legitimate Active Directory mechanism, so it is important to determine whether the activity is legitimate, if the administrator is authorized to perform this operation, and if there is a need to grant the account this level of privilege.
40
41### Response and remediation
42
43- Initiate the incident response process based on the outcome of the triage.
44- If the admin is not aware of the operation, activate your Active Directory incident response plan.
45- If the user does not need the administrator privileges, remove the account from the privileged group.
46- Review the privileges of the administrator account that performed the action.
47- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
48- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
49"""
50references = [
51 "https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory",
52]
53risk_score = 47
54rule_id = "5cd8e1f7-0050-4afc-b2df-904e40b2f5ae"
55setup = """## Setup
56
57If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
58events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
59Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
60`event.ingested` to @timestamp.
61For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
62"""
63severity = "medium"
64tags = [
65 "Domain: Endpoint",
66 "OS: Windows",
67 "Use Case: Threat Detection",
68 "Tactic: Persistence",
69 "Resources: Investigation Guide",
70 "Use Case: Active Directory Monitoring",
71 "Data Source: Active Directory",
72 "Data Source: System",
73]
74timestamp_override = "event.ingested"
75type = "eql"
76
77query = '''
78iam where winlog.api == "wineventlog" and event.action == "added-member-to-group" and
79(
80 (
81 group.name : (
82 "Admin*",
83 "Local Administrators",
84 "Domain Admins",
85 "Enterprise Admins",
86 "Backup Admins",
87 "Schema Admins",
88 "DnsAdmins",
89 "Exchange Organization Administrators",
90 "Print Operators",
91 "Server Operators",
92 "Account Operators"
93 )
94 ) or
95 (
96 group.id : (
97 "S-1-5-32-544",
98 "S-1-5-21-*-544",
99 "S-1-5-21-*-512",
100 "S-1-5-21-*-519",
101 "S-1-5-21-*-551",
102 "S-1-5-21-*-518",
103 "S-1-5-21-*-1101",
104 "S-1-5-21-*-1102",
105 "S-1-5-21-*-550",
106 "S-1-5-21-*-549",
107 "S-1-5-21-*-548"
108 )
109 )
110)
111'''
112
113
114[[rule.threat]]
115framework = "MITRE ATT&CK"
116[[rule.threat.technique]]
117id = "T1098"
118name = "Account Manipulation"
119reference = "https://attack.mitre.org/techniques/T1098/"
120
121
122[rule.threat.tactic]
123id = "TA0003"
124name = "Persistence"
125reference = "https://attack.mitre.org/tactics/TA0003/"
Triage and analysis
Investigating User Added to Privileged Group in Active Directory
Privileged accounts and groups in Active Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly any action in Active Directory and on domain-joined systems.
Attackers can add users to privileged groups to maintain a level of access if their other privileged accounts are uncovered by the security team. This allows them to keep operating after the security team discovers abused accounts.
This rule monitors events related to a user being added to a privileged group.
Possible investigation steps
- Identify the user account that performed the action and whether it should manage members of this group.
- Contact the account owner and confirm whether they are aware of this activity.
- Investigate other alerts associated with the user/host during the past 48 hours.
False positive analysis
- This attack abuses a legitimate Active Directory mechanism, so it is important to determine whether the activity is legitimate, if the administrator is authorized to perform this operation, and if there is a need to grant the account this level of privilege.
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- If the admin is not aware of the operation, activate your Active Directory incident response plan.
- If the user does not need the administrator privileges, remove the account from the privileged group.
- Review the privileges of the administrator account that performed the action.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
References
Related rules
- AdminSDHolder SDProp Exclusion Added
- Active Directory Group Modification by SYSTEM
- Group Policy Abuse for Privilege Addition
- KRBTGT Delegation Backdoor
- Potential Credential Access via DCSync