process where host.os.type == "macos" and event.type in ("start", "process_started") and
(
process.name == "mount_smbfs" or
(process.name == "open" and process.args like~ "smb://*") or
(process.name == "mount" and process.args like~ "smbfs") or
(process.name == "osascript" and process.command_line : "osascript*mount volume*smb://*")
) and
not process.parent.executable like "/Applications/Google Drive.app/Contents/MacOS/Google Drive"
Install detection rules in Elastic Security
Detect Attempt to Mount SMB Share via Command Line in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).