Skip to content

Commit b8aa737

Browse files
committed
Snap Mac Detections
1 parent f930b52 commit b8aa737

12 files changed

+513
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: MacOS Account Created
2+
id: 491004ae-694f-453e-b1e0-fc1e65daeea1
3+
version: 1
4+
date: '2026-02-26'
5+
author: Raven Tait, Splunk
6+
status: production
7+
type: Anomaly
8+
description: The following analytic detects the creation of a new local user account on a MacOS system. It leverages osquery logs to identify this activity. Monitoring the creation of local accounts is crucial for a SOC as it can indicate unauthorized access or lateral movement within the network. If confirmed malicious, this activity could allow an attacker to establish persistence, escalate privileges, or gain unauthorized access to sensitive systems and data.
9+
data_source:
10+
- osquery
11+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process IN ("*sysadminctl","*createhomedir*","*dseditgroup*") OR (Processes.process = "*dscl*" AND Processes.process IN ("*-create*","*-passwd*")) by Processes.dest Processes.original_file_name Processes.parent_process_id Processes.process Processes.process_exec Processes.process_guid Processes.process_hash Processes.process_id Processes.process_current_directory Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `macos_account_created_filter`'
12+
how_to_implement: This detection uses osquery and endpoint security on MacOS. Follow the link in references, which describes how to setup process auditing in MacOS with endpoint security and osquery. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the data models.
13+
known_false_positives: Creating new accounts after initial endpoint management should be rare in most environments.
14+
references:
15+
- https://osquery.readthedocs.io/en/stable/deployment/process-auditing/
16+
drilldown_searches:
17+
- name: View the detection results for - "$user$" and "$dest$"
18+
search: '%original_detection_search% | search user = "$user$" dest = "$dest$"'
19+
earliest_offset: $info_min_time$
20+
latest_offset: $info_max_time$
21+
- name: View risk events for the last 7 days for - "$user$" and "$dest$"
22+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
23+
earliest_offset: $info_min_time$
24+
latest_offset: $info_max_time$
25+
rba:
26+
message: New local account created on $dest$ by $user$
27+
risk_objects:
28+
- field: user
29+
type: user
30+
score: 18
31+
- field: dest
32+
type: system
33+
score: 18
34+
threat_objects: []
35+
tags:
36+
analytic_story:
37+
- MacOS Persistence Techniques
38+
asset_type: Endpoint
39+
mitre_attack_id:
40+
- T1136
41+
product:
42+
- Splunk Enterprise
43+
- Splunk Enterprise Security
44+
- Splunk Cloud
45+
security_domain: endpoint
46+
tests:
47+
- name: True Positive Test
48+
attack_data:
49+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136/osquery_account_creation/osquery.log
50+
source: osquery
51+
sourcetype: osquery:results
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: MacOS Data Chunking
2+
id: 7f1c8bed-9bd4-40b0-a1df-c262cbade0fc
3+
version: 1
4+
date: '2026-02-26'
5+
author: Raven Tait, Splunk
6+
status: production
7+
type: Anomaly
8+
description: The following analytic detects suspicious data chunking activities that involve the use of split or dd, potentially indicating an attempt to evade detection by breaking large files into smaller parts. Attackers may use this technique to bypass size-based security controls, facilitating the covert exfiltration of sensitive data. By monitoring for unusual or unauthorized use of these commands, this analytic helps identify potential data exfiltration attempts, allowing security teams to intervene and prevent the unauthorized transfer of critical information from the network.
9+
data_source:
10+
- osquery
11+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process IN ("dd *","*split *") by Processes.dest Processes.original_file_name Processes.parent_process_id Processes.process Processes.process_exec Processes.process_guid Processes.process_hash Processes.process_id Processes.process_current_directory Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `macos_data_chunking_filter`'
12+
how_to_implement: This detection uses osquery and endpoint security on MacOS. Follow the link in references, which describes how to setup process auditing in MacOS with endpoint security and osquery. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the data models.
13+
known_false_positives: Administrator or network operator can use this application for automation purposes. Please update the filter macros to remove false positives.
14+
references:
15+
- https://osquery.readthedocs.io/en/stable/deployment/process-auditing/
16+
drilldown_searches:
17+
- name: View the detection results for - "$user$" and "$dest$"
18+
search: '%original_detection_search% | search user = "$user$" dest = "$dest$"'
19+
earliest_offset: $info_min_time$
20+
latest_offset: $info_max_time$
21+
- name: View risk events for the last 7 days for - "$user$" and "$dest$"
22+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
23+
earliest_offset: $info_min_time$
24+
latest_offset: $info_max_time$
25+
rba:
26+
message: A file was split on $dest$ by $user$
27+
risk_objects:
28+
- field: user
29+
type: user
30+
score: 49
31+
- field: dest
32+
type: system
33+
score: 49
34+
threat_objects: []
35+
tags:
36+
analytic_story:
37+
- MacOS Post-Exploitation
38+
asset_type: Endpoint
39+
mitre_attack_id:
40+
- T1030
41+
product:
42+
- Splunk Enterprise
43+
- Splunk Enterprise Security
44+
- Splunk Cloud
45+
security_domain: endpoint
46+
tests:
47+
- name: True Positive Test
48+
attack_data:
49+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1030/osquery_data_chunking/osquery.log
50+
source: osquery
51+
sourcetype: osquery:results
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: MacOS Gatekeeper Bypass
2+
id: 2c9346f3-bbeb-48ce-8411-fc13d09d83a5
3+
version: 1
4+
date: '2026-02-26'
5+
author: Raven Tait, Splunk
6+
status: production
7+
type: TTP
8+
description: Detects known MacOS security bypass techniques that may be used to enable malicious code execution. Specifically monitors for attempts to remove the com.apple.quarantine attribute using xattr, or to disable Gatekeeper protections via spctl --master-disable, both of which can allow untrusted or malicious applications to execute without standard system safeguards.
9+
data_source:
10+
- osquery
11+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process = "*xattr*" AND Processes.process = "*com.apple.quarantine*") OR (Processes.process = "*spctl*" AND Processes.process = "*master-disable*") by Processes.dest Processes.original_file_name Processes.parent_process_id Processes.process Processes.process_exec Processes.process_guid Processes.process_hash Processes.process_id Processes.process_current_directory Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`| `macos_gatekeeper_bypass_filter`'
12+
how_to_implement: This detection uses osquery and endpoint security on MacOS. Follow the link in references, which describes how to setup process auditing in MacOS with endpoint security and osquery. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the data models.
13+
known_false_positives: Administrators or power users may need to disable Gatekeeper to install unsigned tools.
14+
references:
15+
- https://osquery.readthedocs.io/en/stable/deployment/process-auditing/
16+
drilldown_searches:
17+
- name: View the detection results for - "$user$" and "$dest$"
18+
search: '%original_detection_search% | search user = "$user$" dest = "$dest$"'
19+
earliest_offset: $info_min_time$
20+
latest_offset: $info_max_time$
21+
- name: View risk events for the last 7 days for - "$user$" and "$dest$"
22+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
23+
earliest_offset: $info_min_time$
24+
latest_offset: $info_max_time$
25+
rba:
26+
message: Attempt to bypass gatekeeper protections on $dest$ by $user$
27+
risk_objects:
28+
- field: user
29+
type: user
30+
score: 55
31+
- field: dest
32+
type: system
33+
score: 55
34+
threat_objects: []
35+
tags:
36+
analytic_story:
37+
- MacOS Privilege Escalation
38+
- MacOS Post-Exploitation
39+
- MacOS Persistence Techniques
40+
asset_type: Endpoint
41+
mitre_attack_id:
42+
- T1553.001
43+
product:
44+
- Splunk Enterprise
45+
- Splunk Enterprise Security
46+
- Splunk Cloud
47+
security_domain: endpoint
48+
tests:
49+
- name: True Positive Test
50+
attack_data:
51+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1553.001/osquery_gatekeeper/osquery.log
52+
source: osquery
53+
sourcetype: osquery:results
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: MacOS Hidden Files and Directories
2+
id: 51c43b7b-e406-45d2-9bad-5c67f07e6528
3+
version: 1
4+
date: '2026-02-26'
5+
author: Raven Tait, Splunk
6+
status: production
7+
type: Anomaly
8+
description: The following analytic detects suspicious creation of hidden files and directories, which may indicate an attacker's attempt to conceal malicious activities or unauthorized data. Hidden files and directories are often used to evade detection by security tools and administrators, providing a stealthy means for storing malware, logs, or sensitive information. By monitoring for unusual or unauthorized creation of hidden files and directories, this analytic helps identify potential attempts to hide or unauthorized creation of hidden files and directories, and helps identify potential attempts to hide malicious operations, enabling security teams to uncover and address hidden threats effectively.
9+
data_source:
10+
- osquery
11+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process="*chflags *" AND Processes.process="* hidden*") OR (Processes.process="*xattr *" AND Processes.process="* -c *") by Processes.dest Processes.original_file_name Processes.parent_process_id Processes.process Processes.process_exec Processes.process_guid Processes.process_hash Processes.process_id Processes.process_current_directory Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `macos_hidden_files_and_directories_filter`'
12+
how_to_implement: This detection uses osquery and endpoint security on MacOS. Follow the link in references, which describes how to setup process auditing in MacOS with endpoint security and osquery. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the data models.
13+
known_false_positives: Power users or developers utilizing build tools or CI/CD tools could trigger this activity.
14+
references:
15+
- https://osquery.readthedocs.io/en/stable/deployment/process-auditing/
16+
drilldown_searches:
17+
- name: View the detection results for - "$user$" and "$dest$"
18+
search: '%original_detection_search% | search user = "$user$" dest = "$dest$"'
19+
earliest_offset: $info_min_time$
20+
latest_offset: $info_max_time$
21+
- name: View risk events for the last 7 days for - "$user$" and "$dest$"
22+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
23+
earliest_offset: $info_min_time$
24+
latest_offset: $info_max_time$
25+
rba:
26+
message: Attempt to hide files on $dest$ by $user$
27+
risk_objects:
28+
- field: user
29+
type: user
30+
score: 35
31+
- field: dest
32+
type: system
33+
score: 35
34+
threat_objects: []
35+
tags:
36+
analytic_story:
37+
- MacOS Persistence Techniques
38+
asset_type: Endpoint
39+
mitre_attack_id:
40+
- T1564.001
41+
product:
42+
- Splunk Enterprise
43+
- Splunk Enterprise Security
44+
- Splunk Cloud
45+
security_domain: endpoint
46+
tests:
47+
- name: True Positive Test
48+
attack_data:
49+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1564.001/osquery_hidden_files/osquery.log
50+
source: osquery
51+
sourcetype: osquery:results
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: MacOS Kextload Usage
2+
id: 9d680775-84a6-4625-a8ea-8182b9427ce4
3+
version: 1
4+
date: '2026-02-26'
5+
author: Raven Tait, Splunk
6+
status: production
7+
type: TTP
8+
description: Detects execution of the kextload command on macOS systems. The kextload utility is used to manually load kernel extensions (KEXTs) into the macOS kernel, which can introduce privileged code at the kernel level. While legitimate for driver installation and system administration, misuse may indicate attempts to install unauthorized, malicious, or persistence-enabling kernel extensions.
9+
data_source:
10+
- osquery
11+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = "kextload" by Processes.dest Processes.original_file_name Processes.parent_process_id Processes.process Processes.process_exec Processes.process_guid Processes.process_hash Processes.process_id Processes.process_current_directory Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `macos_kextload_usage_filter`'
12+
how_to_implement: This detection uses osquery and endpoint security on MacOS. Follow the link in references, which describes how to setup process auditing in MacOS with endpoint security and osquery. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the data models.
13+
known_false_positives: Administrators installing new drivers could use this application.
14+
references:
15+
- https://osquery.readthedocs.io/en/stable/deployment/process-auditing/
16+
drilldown_searches:
17+
- name: View the detection results for - "$user$" and "$dest$"
18+
search: '%original_detection_search% | search user = "$user$" dest = "$dest$"'
19+
earliest_offset: $info_min_time$
20+
latest_offset: $info_max_time$
21+
- name: View risk events for the last 7 days for - "$user$" and "$dest$"
22+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
23+
earliest_offset: $info_min_time$
24+
latest_offset: $info_max_time$
25+
rba:
26+
message: Possible kernel extension loaded on $dest$ by $user$
27+
risk_objects:
28+
- field: user
29+
type: user
30+
score: 55
31+
- field: dest
32+
type: system
33+
score: 55
34+
threat_objects: []
35+
tags:
36+
analytic_story:
37+
- MacOS Privilege Escalation
38+
- MacOS Persistence Techniques
39+
asset_type: Endpoint
40+
mitre_attack_id:
41+
- T1543
42+
product:
43+
- Splunk Enterprise
44+
- Splunk Enterprise Security
45+
- Splunk Cloud
46+
security_domain: endpoint
47+
tests:
48+
- name: True Positive Test
49+
attack_data:
50+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1543/osquery_ketxload/osquery.log
51+
source: osquery
52+
sourcetype: osquery:results

0 commit comments

Comments
 (0)