| ID | Technique | Tactic |
|---|---|---|
| T1135 | Network Share Discovery | Discovery |
Detection: MacOS Network Share Discovery
Description
Identifies execution of network share enumeration commands (smbutil, showmount) that can be leveraged by adversaries to discover accessible SMB and NFS resources, supporting internal reconnaissance and potential lateral movement.
Search
1
2| tstats `security_content_summariesonly`
3 count min(_time) as firstTime
4 max(_time) as lastTime
5
6from datamodel=Endpoint.Processes where
7
8Processes.process IN ("*showmount *", "*smbutil *")
9
10by Processes.dest Processes.original_file_name Processes.parent_process_id
11 Processes.process Processes.process_exec Processes.process_guid
12 Processes.process_hash Processes.process_id
13 Processes.process_current_directory Processes.process_name
14 Processes.process_path Processes.user
15 Processes.user_id Processes.vendor_product
16
17
18| `drop_dm_object_name(Processes)`
19
20| `security_content_ctime(firstTime)`
21
22| `security_content_ctime(lastTime)`
23
24| `macos_network_share_discovery_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Osquery Results | Other | 'osquery:results' |
'osquery' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| macos_network_share_discovery_filter | search * |
macos_network_share_discovery_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Risk Event | True |
Implementation
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 must be deployed across your indexers and universal forwarders in order to have the osquery data populate the data models.
Known False Positives
Administrators may utilize these tools occasionaly for troubleshooting.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message:
Network share information enumerated on $dest$ by $user$ via $process$
| Risk Object | Risk Object Type | Risk Score | Threat Objects |
|---|---|---|---|
| dest | system | 20 | process |
| user | user | 20 | process |
References
-
https://osquery.readthedocs.io/en/stable/deployment/process-auditing/
-
https://leopard-adc.pepas.com/documentation/Darwin/Reference/ManPages/man8/showmount.8.html
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | osquery |
osquery:results |
| Integration | ✅ Passing | Dataset | osquery |
osquery:results |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub | Version: 2