Unexpected Child Process of macOS Screensaver Engine
editUnexpected Child Process of macOS Screensaver Engine
editIdentifies when a child process is spawned by the screensaver engine process, which is consistent with an attacker’s malicious payload being executed after the screensaver activated on the endpoint. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.
Rule type: eql
Rule indices:
- logs-endpoint.events.process*
Severity: medium
Risk score: 47
Runs every: 5m
Searches indices from: now-9m (Date Math format, see also Additional look-back time)
Maximum alerts per execution: 100
References:
Tags:
- Domain: Endpoint
- OS: macOS
- Use Case: Threat Detection
- Tactic: Persistence
- Data Source: Elastic Defend
- Resources: Investigation Guide
- Noise: Low
- Performance: Normal
- Rule Type: Event Correlation (EQL)
- Platform: macOS
Version: 113
Rule authors:
- Elastic
Rule license: Elastic License v2
Investigation guide
editTriage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating Unexpected Child Process of macOS Screensaver Engine
ScreenSaverEngine is the macOS process that starts and manages the active screensaver. Screensavers are packaged as .saver bundles; on macOS 10.15 and later, third-party modules are loaded by the legacyScreenSaver helper rather than directly inside ScreenSaverEngine. A malicious .saver bundle configured as the active screensaver can run arbitrary code every time the screensaver activates. This rule alerts on any process whose parent is ScreenSaverEngine, which is uncommon in normal operation.
Possible investigation steps
-
Review the child process details (
process.executable,process.command_line,process.code_signature.*) and determine whether it is a known component of a legitimate screensaver. - Analyze the descendant processes of the child for suspicious behavior, such as script interpreters, downloads of payloads from remote servers, or network connections to unusual destinations.
-
Identify the active screensaver for the user by reviewing the
com.apple.screensaver.*.plistfiles under~/Library/Preferences/ByHost/and the module path they reference. On macOS 14 and later, the screensaver selection may also be stored in~/Library/Application Support/com.apple.wallpaper/Store/Index.plist. -
Review process activity of
legacyScreenSaveron the same host around the alert time, as code from third-party screensaver modules runs under that process on recent macOS versions. -
Locate the
.saverbundle in use (commonly under~/Library/Screen Savers/or/Library/Screen Savers/) and check its code signature, creation time, origin, and contents. -
Review recent file events for the creation of
.saverbundles or modification of screensaver plist files, and identify the process that performed them. -
Review other alerts for the same
host.idanduser.nameto identify how the screensaver was delivered and whether other persistence mechanisms were added.
False positive analysis
- Some third-party screensavers legitimately launch helper processes. Verify the screensaver is installed from a trusted source and that the child process is signed by the same vendor.
-
When the activity is confirmed benign, create an exception for the specific signed child executable rather than for all children of
ScreenSaverEngine.
Response and remediation
- Isolate the affected host from the network if the child process or screensaver is determined to be malicious.
- Terminate the malicious child process and its descendants.
-
Reset the active screensaver to a built-in Apple screensaver, and remove the malicious
.saverbundle after preserving a copy for analysis. - Revert any unauthorized changes to the screensaver plist files.
- Investigate how the malicious screensaver was delivered and remediate the initial access vector.
-
Escalate to the incident response team and search for the same
.saverbundle or child process on other macOS hosts.
Setup
editSetup
This rule requires data coming in from Elastic Defend.
Elastic Defend Integration Setup
Elastic 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.
Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the documentation.
The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
- 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.
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- 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. For more details on Elastic Agent configuration settings, refer to the helper guide.
- Click "Save and Continue".
- 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. For more details on Elastic Defend refer to the helper guide.
Rule query
editprocess where host.os.type == "macos" and event.type == "start" and process.parent.name == "ScreenSaverEngine"
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Persistence
- ID: TA0003
- Reference URL: https://attack.mitre.org/tactics/TA0003/
-
Technique:
- Name: Event Triggered Execution
- ID: T1546
- Reference URL: https://attack.mitre.org/techniques/T1546/
-
Sub-technique:
- Name: Screensaver
- ID: T1546.002
- Reference URL: https://attack.mitre.org/techniques/T1546/002/