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)

 1[metadata]
 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/02/22"
 8
 9[rule]
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.
14"""
15from = "now-9m"
16index = ["auditbeat-*", "logs-endpoint.events.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Enumeration of Users or Groups via Built-in Commands"
20note = """## Setup
21
22If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
23"""
24risk_score = 21
25rule_id = "6e9b351e-a531-4bdc-b73e-7034d6eed7ff"
26severity = "low"
27tags = ["Elastic", "Host", "macOS", "Threat Detection", "Discovery"]
28timestamp_override = "event.ingested"
29type = "eql"
30
31query = '''
32process where host.os.type == "macos" and event.type in ("start", "process_started") and
33  (
34    process.name : ("ldapsearch", "dsmemberutil") or
35    (process.name : "dscl" and
36      process.args : ("read", "-read", "list", "-list", "ls", "search", "-search") and
37      process.args : ("/Active Directory/*", "/Users*", "/Groups*"))
38	) and
39  not process.parent.executable : ("/Applications/NoMAD.app/Contents/MacOS/NoMAD",
40     "/Applications/ZoomPresence.app/Contents/MacOS/ZoomPresence",
41     "/Applications/Sourcetree.app/Contents/MacOS/Sourcetree",
42     "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon",
43     "/Applications/Jamf Connect.app/Contents/MacOS/Jamf Connect",
44     "/usr/local/jamf/bin/jamf",
45     "/Library/Application Support/AirWatch/hubd",
46     "/opt/jc/bin/jumpcloud-agent",
47     "/Applications/ESET Endpoint Antivirus.app/Contents/MacOS/esets_daemon",
48     "/Applications/ESET Endpoint Security.app/Contents/MacOS/esets_daemon",
49     "/Library/PrivilegedHelperTools/com.fortinet.forticlient.uninstall_helper"
50    )
51'''
52
53
54[[rule.threat]]
55framework = "MITRE ATT&CK"
56[[rule.threat.technique]]
57id = "T1069"
58name = "Permission Groups Discovery"
59reference = "https://attack.mitre.org/techniques/T1069/"
60[[rule.threat.technique.subtechnique]]
61id = "T1069.001"
62name = "Local Groups"
63reference = "https://attack.mitre.org/techniques/T1069/001/"
64
65[[rule.threat.technique]]
66id = "T1087"
67name = "Account Discovery"
68reference = "https://attack.mitre.org/techniques/T1087/"
69[[rule.threat.technique.subtechnique]]
70id = "T1087.001"
71name = "Local Account"
72reference = "https://attack.mitre.org/techniques/T1087/001/"
73
74[rule.threat.tactic]
75id = "TA0007"
76name = "Discovery"
77reference = "https://attack.mitre.org/tactics/TA0007/"

Setup

If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested to @timestamp for this rule to work.

to-top