Attempt to Mount SMB Share via Command Line

Identifies the execution of macOS built-in commands to mount a Server Message Block (SMB) network share. Adversaries may use valid accounts to interact with a remote network share using SMB.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2021/01/25"
 3integration = ["endpoint"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies the execution of macOS built-in commands to mount a Server Message Block (SMB) network share. Adversaries may
11use valid accounts to interact with a remote network share using SMB.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Attempt to Mount SMB Share via Command Line"
18references = ["https://www.freebsd.org/cgi/man.cgi?mount_smbfs", "https://ss64.com/osx/mount.html"]
19risk_score = 21
20rule_id = "661545b4-1a90-4f45-85ce-2ebd7c6a15d0"
21setup = """## Setup
22
23This rule requires data coming in from Elastic Defend.
24
25### Elastic Defend Integration Setup
26Elastic 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.
27
28#### Prerequisite Requirements:
29- Fleet is required for Elastic Defend.
30- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
31
32#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
33- Go to the Kibana home page and click "Add integrations".
34- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
35- Click "Add Elastic Defend".
36- Configure the integration name and optionally add a description.
37- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
38- 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).
39- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
40- 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.
41For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
42- Click "Save and Continue".
43- 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.
44For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
45"""
46severity = "low"
47tags = [
48    "Domain: Endpoint",
49    "OS: macOS",
50    "Use Case: Threat Detection",
51    "Tactic: Lateral Movement",
52    "Data Source: Elastic Defend",
53]
54timestamp_override = "event.ingested"
55type = "eql"
56
57query = '''
58process where host.os.type == "macos" and event.type in ("start", "process_started") and
59  (
60    process.name : "mount_smbfs" or
61    (process.name : "open" and process.args : "smb://*") or
62    (process.name : "mount" and process.args : "smbfs") or
63    (process.name : "osascript" and process.command_line : "osascript*mount volume*smb://*")
64  ) and
65  not process.parent.executable : "/Applications/Google Drive.app/Contents/MacOS/Google Drive"
66'''
67
68
69[[rule.threat]]
70framework = "MITRE ATT&CK"
71[[rule.threat.technique]]
72id = "T1021"
73name = "Remote Services"
74reference = "https://attack.mitre.org/techniques/T1021/"
75[[rule.threat.technique.subtechnique]]
76id = "T1021.002"
77name = "SMB/Windows Admin Shares"
78reference = "https://attack.mitre.org/techniques/T1021/002/"
79
80
81
82[rule.threat.tactic]
83id = "TA0008"
84name = "Lateral Movement"
85reference = "https://attack.mitre.org/tactics/TA0008/"

References

Related rules

to-top