Detection rules › Elastic

User Added to Privileged Group in Active Directory

Status
production
Severity
medium
Time window
9m
Author
Elastic, Skoetting
Source
github.com/elastic/detection-rules

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.

MITRE ATT&CK coverage

Event coverage

Rule body elastic

[metadata]
creation_date = "2021/01/09"
integration = ["system", "windows"]
maturity = "production"
updated_date = "2026/05/04"

[rule]
author = ["Elastic", "Skoetting"]
description = """
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.
"""
from = "now-9m"
index = ["logs-system.security*", "logs-windows.forwarded*", "winlogbeat-*"]
language = "eql"
license = "Elastic License v2"
name = "User Added to Privileged Group in Active Directory"
note = """## 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).
"""

setup = """## Setup

Audit Security Group Management must be enabled to generate the events used by this rule.
Setup instructions: https://ela.st/audit-security-group-management
"""

references = [
    "https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory",
]
risk_score = 47
rule_id = "5cd8e1f7-0050-4afc-b2df-904e40b2f5ae"
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Persistence",
    "Resources: Investigation Guide",
    "Use Case: Active Directory Monitoring",
    "Data Source: Active Directory",
    "Data Source: Windows Security Event Logs",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
iam where host.os.type == "windows" and event.action == "added-member-to-group" and
(
    group.id : "S-1-5-21*" and
    (
        group.name : (
            "Admin*",
            "Domain Admins",
            "Enterprise Admins",
            "Backup Admins",
            "Schema Admins",
            "DnsAdmins",
            "Exchange Organization Administrators",
            "Print Operators",
            "Server Operators",
            "Account Operators"
        )
    ) or
    (
        group.id : (
            "S-1-5-21-*-544",
            "S-1-5-21-*-512",
            "S-1-5-21-*-519",
            "S-1-5-21-*-551",
            "S-1-5-21-*-518",
            "S-1-5-21-*-1101",
            "S-1-5-21-*-1102",
            "S-1-5-21-*-550",
            "S-1-5-21-*-549",
            "S-1-5-21-*-548"
        )
    )
)
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"

[[rule.threat.technique.subtechnique]]
id = "T1098.007"
name = "Additional Local or Domain Groups"
reference = "https://attack.mitre.org/techniques/T1098/007/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

Stages and Predicates

Stage 1: iam

iam where host.os.type == "windows" and event.action == "added-member-to-group" and
(
    group.id : "S-1-5-21*" and
    (
        group.name : (
            "Admin*",
            "Domain Admins",
            "Enterprise Admins",
            "Backup Admins",
            "Schema Admins",
            "DnsAdmins",
            "Exchange Organization Administrators",
            "Print Operators",
            "Server Operators",
            "Account Operators"
        )
    ) or
    (
        group.id : (
            "S-1-5-21-*-544",
            "S-1-5-21-*-512",
            "S-1-5-21-*-519",
            "S-1-5-21-*-551",
            "S-1-5-21-*-518",
            "S-1-5-21-*-1101",
            "S-1-5-21-*-1102",
            "S-1-5-21-*-550",
            "S-1-5-21-*-549",
            "S-1-5-21-*-548"
        )
    )
)

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
event.actioneq
  • added-member-to-group
group.idwildcard
  • S-1-5-21*
  • S-1-5-21-*-1101
  • S-1-5-21-*-1102
  • S-1-5-21-*-512
  • S-1-5-21-*-518
  • S-1-5-21-*-519
  • S-1-5-21-*-544
  • S-1-5-21-*-548
  • S-1-5-21-*-549
  • S-1-5-21-*-550
  • S-1-5-21-*-551
group.namewildcard
  • Account Operators
  • Admin*
  • Backup Admins
  • DnsAdmins
  • Domain Admins
  • Enterprise Admins
  • Exchange Organization Administrators
  • Print Operators
  • Schema Admins
  • Server Operators