Enumeration of Users or Groups via Built-in Commands

Identifies the execution of macOS built-in commands related to account or group enumeration. Adversaries may use account and group information to orient themselves before deciding how to act.

Elastic rule (View on GitHub)

 2creation_date = "2021/01/12"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/11/15"
10author = ["Elastic"]
11description = """
12Identifies the execution of macOS built-in commands related to account or group enumeration. Adversaries may use account
13and group information to orient themselves before deciding how to act.
15from = "now-9m"
16index = ["logs-endpoint.events.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Enumeration of Users or Groups via Built-in Commands"
20risk_score = 21
21rule_id = "6e9b351e-a531-4bdc-b73e-7034d6eed7ff"
22setup = """## Setup
24This rule requires data coming in from Elastic Defend.
26### Elastic Defend Integration Setup
27Elastic 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.
29#### Prerequisite Requirements:
30- Fleet is required for Elastic Defend.
31- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
33#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
34- Go to the Kibana home page and click "Add integrations".
35- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
36- Click "Add Elastic Defend".
37- Configure the integration name and optionally add a description.
38- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
39- 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).
40- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
41- 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.
42For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
43- Click "Save and Continue".
44- 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.
45For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
47severity = "low"
48tags = ["Domain: Endpoint", "OS: macOS", "Use Case: Threat Detection", "Tactic: Discovery", "Data Source: Elastic Defend"]
49timestamp_override = "event.ingested"
50type = "eql"
52query = '''
53process where host.os.type == "macos" and event.type in ("start", "process_started") and
54  (
55    process.name : ("ldapsearch", "dsmemberutil") or
56    (process.name : "dscl" and
57      process.args : ("read", "-read", "list", "-list", "ls", "search", "-search") and
58      process.args : ("/Active Directory/*", "/Users*", "/Groups*"))
59	) and
60  not process.parent.executable : ("/Applications/NoMAD.app/Contents/MacOS/NoMAD",
61     "/Applications/ZoomPresence.app/Contents/MacOS/ZoomPresence",
62     "/Applications/Sourcetree.app/Contents/MacOS/Sourcetree",
63     "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon",
64     "/Applications/Jamf Connect.app/Contents/MacOS/Jamf Connect",
65     "/usr/local/jamf/bin/jamf",
66     "/Library/Application Support/AirWatch/hubd",
67     "/opt/jc/bin/jumpcloud-agent",
68     "/Applications/ESET Endpoint Antivirus.app/Contents/MacOS/esets_daemon",
69     "/Applications/ESET Endpoint Security.app/Contents/MacOS/esets_daemon",
70     "/Library/PrivilegedHelperTools/com.fortinet.forticlient.uninstall_helper"
71    )
76framework = "MITRE ATT&CK"
78id = "T1069"
79name = "Permission Groups Discovery"
80reference = "https://attack.mitre.org/techniques/T1069/"
82id = "T1069.001"
83name = "Local Groups"
84reference = "https://attack.mitre.org/techniques/T1069/001/"
87id = "T1087"
88name = "Account Discovery"
89reference = "https://attack.mitre.org/techniques/T1087/"
91id = "T1087.001"
92name = "Local Account"
93reference = "https://attack.mitre.org/techniques/T1087/001/"
96id = "TA0007"
97name = "Discovery"
98reference = "https://attack.mitre.org/tactics/TA0007/"

Related rules