-
Notifications
You must be signed in to change notification settings - Fork 431
New MacOS detections T1016 #3672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jwindley
wants to merge
7
commits into
splunk:develop
Choose a base branch
from
jwindley:macos-t1016
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+105
−2
Draft
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f8eac47
New MacOS detections T1016
jwindley 14e7189
Update macos_list_firewall_rules.yml
nasbench 7effc6f
New MacOS detections T1016
jwindley 9240b85
Address PR review comments
jwindley 9ece281
Merge branch 'macos-t1016' of https://github.com/jwindley/security_co…
nasbench 3dc5f80
small updates
nasbench b071422
Delete detections/endpoint/macos_system_network_configuration_discove…
nasbench File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: MacOS List Firewall Rules | ||
| id: f8db6e0b-55bb-40ca-bc85-2b3700adb0f8 | ||
| version: 1 | ||
| date: '2025-09-08' | ||
| author: Jamie Windley, Splunk | ||
| status: production | ||
| type: Anomaly | ||
| description: This analytic detects attempts to enumerate or verify the configuration of the macOS application firewall. Specifically, it monitors executions of `defaults read /Library/Preferences/com.apple.alf` and `/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate`. These commands provide insight into firewall status, allowed applications, and explicit authorization rules. While they are legitimate administrative operations, adversaries may leverage them to identify potential attack surfaces, determine whether the firewall is active, or enumerate allowed network flows. Monitoring for these commands, particularly when executed by non-administrative users or at unusual times, can provide early indication of reconnaissance activity on macOS endpoints | ||
| data_source: | ||
| - osquery | ||
| search: "| tstats `security_content_summariesonly` values(Processes.process) as process\ | ||
| \ values(Processes.parent_process) AS parent_process values(Processes.parent_process_exec)\ | ||
| \ AS parent_process_exec values(Processes.parent_process_id) AS parent_process_id\ | ||
| \ values(Processes.parent_process_name) AS parent_process_name values(Processes.parent_process_path)\ | ||
| \ AS parent_process_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes\ | ||
| \ where Processes.process IN (\"*defaults read /Library/Preferences/com.apple.alf*\"\ | ||
| \ \"*/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate*\") by Processes.action\ | ||
| \ Processes.dest Processes.process Processes.process_hash Processes.process_id Processes.process_name\ | ||
| \ Processes.process_path Processes.user Processes.vendor_product \n| `drop_dm_object_name(Processes)`\ | ||
| \ \n| `security_content_ctime(firstTime)` \n| `security_content_ctime(lastTime)`\n\ | ||
| | `macos_list_firewall_rules_filter`\n | `macos_list_firewall_rules_filter`" | ||
| how_to_implement: Collection of process execution events from macOS endpoints is required. This can be achieved using osquery’s `es_process_events` table, EndpointSecurity framework integrations, or an EDR platform capable of recording process command lines. Ensure that captured events include at least the process path, full command line, user context, and timestamp. | ||
| known_false_positives: These commands are frequently executed by system administrators or IT personnel during routine configuration checks, troubleshooting, or automated maintenance scripts. Security tools or monitoring agents may also query firewall status for inventory or compliance purposes. To reduce false positives, consider excluding events from known administrative accounts, trusted management systems, or scheduled maintenance jobs. | ||
| references: [] | ||
| drilldown_searches: | ||
| - name: View the detection results for - "$user$" and "$dest$" | ||
| search: '%original_detection_search% | search user = "$user$" AND dest = "$dest$"' | ||
| earliest_offset: $info_min_time$ | ||
| latest_offset: $info_max_time$ | ||
| - name: View risk events for the last 7 days for - "$user$" and "$dest$" | ||
| 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)`' | ||
| earliest_offset: $info_min_time$ | ||
| latest_offset: $info_max_time$ | ||
| rba: | ||
| message: MacOS firewall rules listed | ||
| risk_objects: | ||
| - field: dest | ||
| type: system | ||
| score: 6 | ||
| - field: user | ||
| type: user | ||
| score: 6 | ||
| threat_objects: [] | ||
| tags: | ||
| analytic_story: | ||
| - Network Discovery | ||
| asset_type: Endpoint | ||
| mitre_attack_id: | ||
| - T1016 | ||
| product: | ||
| - Splunk Enterprise | ||
| - Splunk Enterprise Security | ||
| - Splunk Cloud | ||
| security_domain: endpoint | ||
| cve: [] | ||
| tests: | ||
| - name: True Positive Test | ||
| attack_data: | ||
| - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1016/atomic_red_team/macos_net_discovery/macos_network_discovery.log | ||
| sourcetype: osquery:results | ||
jwindley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| source: local_vm | ||
65 changes: 65 additions & 0 deletions
65
detections/endpoint/macos_system_network_configuration_discovery.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: MacOS System Network Configuration Discovery | ||
| id: 66945806-0891-4055-952f-ea11b7bc54dd | ||
| version: 1 | ||
| date: '2025-09-08' | ||
| author: Jamie Windley | ||
| status: production | ||
| type: Anomaly | ||
| description: This analytic detects the execution of common network configuration discovery commands on macOS systems. Specifically, it focuses on instances of `netstat -ant`, `arp -a`, and `ifconfig`. These utilities are often used for legitimate troubleshooting, but they are also frequently leveraged by adversaries during the reconnaissance phase to enumerate network interfaces, identify active connections, and discover other hosts within the same broadcast domain. Monitoring for the use of these commands, particularly when executed by unexpected users or during unusual time periods, can provide early warning of potentially malicious activity. | ||
| data_source: | ||
| - osquery | ||
| search: "| tstats `security_content_summariesonly` values(Processes.process) as process\ | ||
| \ values(Processes.parent_process) AS parent_process values(Processes.parent_process_exec)\ | ||
| \ AS parent_process_exec values(Processes.parent_process_id) AS parent_process_id\ | ||
| \ values(Processes.parent_process_name) AS parent_process_name values(Processes.parent_process_path)\ | ||
| \ AS parent_process_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes\ | ||
| \ where Processes.process IN (\"netstat -ant\", \"arp -a\", \"ifconfig\") by Processes.action\ | ||
| \ Processes.dest Processes.process Processes.process_hash Processes.process_id Processes.process_name\ | ||
| \ Processes.process_path Processes.user Processes.vendor_product \n| `drop_dm_object_name(Processes)`\ | ||
| \ \n| `security_content_ctime(firstTime)` \n| `security_content_ctime(lastTime)`\n\ | ||
| | `macos_system_network_configuration_discovery_filter`\n | `macos_system_network_configuration_discovery_filter`" | ||
nasbench marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| how_to_implement: Collection of process execution events from macOS endpoints is required. This can be achieved using osquery’s `es_process_events` table, EndpointSecurity framework integrations, or an EDR platform capable of recording process command lines. Ensure that captured events include at least the process path, full command line, user context, and timestamp. | ||
| known_false_positives: These commands are commonly executed by system administrators, help desk personnel, monitoring agents, and diagnostic scripts as part of routine system maintenance. Security tools and network monitoring utilities may also invoke these commands for inventory or health check purposes. To reduce false positives, consider excluding events originating from trusted management hosts, known administrative accounts, or processes executed on a predictable schedule. | ||
| references: [] | ||
| drilldown_searches: | ||
| - name: View the detection results for - "$user$" and "$dest$" | ||
| search: '%original_detection_search% | search user = "$user$" AND dest = "$dest$"' | ||
| earliest_offset: $info_min_time$ | ||
| latest_offset: $info_max_time$ | ||
| - name: View risk events for the last 7 days for - "$user$" and "$dest$" | ||
| 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)`' | ||
| earliest_offset: $info_min_time$ | ||
| latest_offset: $info_max_time$ | ||
| rba: | ||
| message: MacOS system network configuration discovery command observed | ||
| risk_objects: | ||
| - field: dest | ||
| type: system | ||
| score: 6 | ||
| - field: user | ||
| type: user | ||
| score: 6 | ||
| threat_objects: [] | ||
| tags: | ||
| analytic_story: | ||
| - Network Discovery | ||
| asset_type: Endpoint | ||
| mitre_attack_id: | ||
| - T1016 | ||
| product: | ||
| - Splunk Enterprise | ||
| - Splunk Enterprise Security | ||
| - Splunk Cloud | ||
| security_domain: endpoint | ||
| cve: [] | ||
| tests: | ||
| - name: True Positive Test | ||
| attack_data: | ||
| - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1016/atomic_red_team/macos_net_discovery/macos_network_discovery.log | ||
| sourcetype: osquery:results | ||
| source: local_vm | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.