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"
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 to mount a Server Message Block (SMB) network share. Adversaries may
13use valid accounts to interact with a remote network share using SMB.
14"""
15from = "now-9m"
16index = ["auditbeat-*", "logs-endpoint.events.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Attempt to Mount SMB Share via Command Line"
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"""
24references = ["https://www.freebsd.org/cgi/man.cgi?mount_smbfs", "https://ss64.com/osx/mount.html"]
25risk_score = 21
26rule_id = "661545b4-1a90-4f45-85ce-2ebd7c6a15d0"
27severity = "low"
28tags = ["Elastic", "Host", "macOS", "Threat Detection", "Lateral Movement"]
29timestamp_override = "event.ingested"
30type = "eql"
31
32query = '''
33process where host.os.type == "macos" and event.type in ("start", "process_started") and
34 (
35 process.name : "mount_smbfs" or
36 (process.name : "open" and process.args : "smb://*") or
37 (process.name : "mount" and process.args : "smbfs") or
38 (process.name : "osascript" and process.command_line : "osascript*mount volume*smb://*")
39 ) and
40 not process.parent.executable : "/Applications/Google Drive.app/Contents/MacOS/Google Drive"
41'''
42
43
44[[rule.threat]]
45framework = "MITRE ATT&CK"
46[[rule.threat.technique]]
47id = "T1021"
48name = "Remote Services"
49reference = "https://attack.mitre.org/techniques/T1021/"
50[[rule.threat.technique.subtechnique]]
51id = "T1021.002"
52name = "SMB/Windows Admin Shares"
53reference = "https://attack.mitre.org/techniques/T1021/002/"
54
55
56
57[rule.threat.tactic]
58id = "TA0008"
59name = "Lateral Movement"
60reference = "https://attack.mitre.org/tactics/TA0008/"
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.