User Added to the Admin Group

Identifies users being added to the admin group. This could be an indication of privilege escalation activity.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2024/09/12"
  3integration = ["jamf_protect"]
  4maturity = "production"
  5updated_date = "2026/05/06"
  6
  7[transform]
  8[[transform.investigate]]
  9label = "Show events having the same responsible process"
 10providers = [
 11  [
 12    { excluded = false, field = "host.hostname", queryType = "phrase", value = "{{host.hostname}}", valueType = "string" },
 13    { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.group_leader.entity_id}}", valueType = "string" }
 14  ]
 15]
 16
 17[[transform.investigate]]
 18label = "Show events having the same parent process"
 19providers = [
 20  [
 21    { excluded = false, field = "host.hostname", queryType = "phrase", value = "{{host.hostname}}", valueType = "string" },
 22    { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string" }
 23  ]
 24]
 25
 26
 27[rule]
 28author = ["Thijs Xhaflaire"]
 29description = "Identifies users being added to the admin group. This could be an indication of privilege\nescalation activity.\n"
 30from = "now-9m"
 31index = ["logs-jamf_protect*"]
 32language = "eql"
 33license = "Elastic License v2"
 34name = "User Added to the Admin Group"
 35note = """## Triage and analysis
 36
 37To 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.**
 38
 39**Consider reviewing these actions:**
 40
 41- Have persistency items been added?
 42- Is any software installed after elevation?
 43- Were any additional users created after elevation?
 44
 45$investigate_0
 46$investigate_1
 47"""
 48references = [
 49    "https://www.loobins.io/binaries/dscl/",
 50    "https://managingosx.wordpress.com/2010/01/14/add-a-user-to-the-admin-group-via-command-line-3-0/",
 51]
 52risk_score = 21
 53rule_id = "04e65517-16e9-4fc4-b7f1-94dc21ecea0d"
 54setup = """## Setup
 55
 56This rule requires data coming in from Jamf Protect.
 57
 58### Jamf Protect Integration Setup
 59Jamf 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.
 60
 61#### Prerequisite Requirements:
 62- Fleet is required for Jamf Protect.
 63- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 64
 65#### The following steps should be executed in order to add the Jamf Protect integration:
 66- Go to the Kibana home page and click "Add integrations".
 67- In the query bar, search for "Jamf Protect" and select the integration to see more details about it.
 68- Click "Add Jamf Protect".
 69- Configure the integration name.
 70- Click "Save and Continue".
 71"""
 72severity = "low"
 73tags = [
 74    "Domain: Endpoint",
 75    "OS: macOS",
 76    "Use Case: Threat Detection",
 77    "Tactic: Privilege Escalation",
 78    "Data Source: Jamf Protect",
 79    "Resources: Investigation Guide",
 80]
 81timestamp_override = "event.ingested"
 82type = "eql"
 83
 84query = '''
 85configuration where host.os.type == "macos" and event.type == "change" and
 86  event.action == "od_group_add" and group.name:"admin"
 87'''
 88
 89
 90[[rule.threat]]
 91framework = "MITRE ATT&CK"
 92
 93[[rule.threat.technique]]
 94id = "T1078"
 95name = "Valid Accounts"
 96reference = "https://attack.mitre.org/techniques/T1078/"
 97
 98[[rule.threat.technique.subtechnique]]
 99id = "T1078.003"
100name = "Local Accounts"
101reference = "https://attack.mitre.org/techniques/T1078/003/"
102
103[[rule.threat.technique]]
104id = "T1098"
105name = "Account Manipulation"
106reference = "https://attack.mitre.org/techniques/T1098/"
107
108[[rule.threat.technique.subtechnique]]
109id = "T1098.007"
110name = "Additional Local or Domain Groups"
111reference = "https://attack.mitre.org/techniques/T1098/007/"
112
113[rule.threat.tactic]
114id = "TA0004"
115name = "Privilege Escalation"
116reference = "https://attack.mitre.org/tactics/TA0004/"

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.

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

References

Related rules

to-top