macOS Finder Sync Plugin Persistence via Pluginkit
This rule detects suspicious Finder Sync plugin registrations on macOS, where adversaries abuse the pluginkit process to establish persistence by repeatedly executing malicious payloads.
Finder Sync plugins extend the functionality of macOS Finder, allowing users to modify the user interface. Adversaries may abuse this feature by adding a rogue Finder Plugin to repeatedly execute malicious payloads for persistence. The pluginkit command is used to manage these plugins. This rule identifies suspicious plugin registrations by monitoring the pluginkit process and filtering out known safe applications, flagging unusual activity to help analysts spot potential threats. Legitimate applications like Google Drive, Boxcryptor, Adobe Creative Cloud, Microsoft OneDrive, Insync, and Box can utilize these plugins, so identifying malicious use is critical.
Attack Chain
- The user installs a malicious application or unknowingly executes a script that contains instructions to install a malicious Finder Sync plugin.
- The malicious application or script executes the
pluginkitcommand with the-e,use, and-iflags to register a new Finder Sync plugin. pluginkitregisters the malicious plugin, adding it to the system’s list of available Finder extensions.- The Finder process detects the newly registered plugin and loads it.
- The malicious plugin executes its payload, which could involve running arbitrary code or modifying the Finder interface.
- The plugin’s code is designed to maintain persistence, potentially re-executing after system restarts or user logins.
- The malicious plugin establishes a connection to a command-and-control server for further instructions.
Impact
Successful exploitation leads to persistent execution of malicious code on macOS systems. Attackers can maintain unauthorized access, steal sensitive information, or perform other malicious activities. The rule helps detect and prevent such persistence mechanisms, reducing the risk of long-term compromise. While the number of victims is unknown, targeted sectors could include any environment where macOS is prevalent, such as creative industries or software development.
Recommendation
- Enable Elastic Defend and ensure it’s configured to monitor process execution events to activate the detections (setup guide in rule description).
- Deploy the provided Sigma rules to detect suspicious
pluginkitexecutions and tune for your environment. - Investigate any alerts generated by the Sigma rules, focusing on the parent processes and plugin identifiers involved.
- Block known malicious parent processes (python, node, osascript, bash, sh, zsh) when spawning
pluginkitwith-e -i usearguments based on identified incidents.
Detection coverage 2
Detect Finder Sync Plugin Registration via Pluginkit
mediumDetects Finder Sync plugins being registered using the pluginkit command, a common technique for persistence on macOS.
Pluginkit Process Spawning from Suspicious Parent Processes
mediumDetects pluginkit executions that are spawned from suspicious parent processes like Python, Node.js, or shell scripts without a valid code signature, indicating potential malicious activity related to Finder Sync plugin manipulation on macOS.
Detection queries are available on the platform. Get full rules →