Unexpected Child Process of macOS Screensaver Engine

Identifies 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.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2021/10/05"
  3integration = ["endpoint"]
  4maturity = "production"
  5updated_date = "2026/10/26"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies when a child process is spawned by the screensaver engine process, which is consistent with an attacker's
 11malicious payload being executed after the screensaver activated on the endpoint. An adversary can maintain persistence
 12on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to
 13execute code each time the screensaver is activated.
 14"""
 15from = "now-9m"
 16index = ["logs-endpoint.events.process*"]
 17language = "eql"
 18license = "Elastic License v2"
 19name = "Unexpected Child Process of macOS Screensaver Engine"
 20note = """## Triage and analysis
 21
 22> **Disclaimer**:
 23> 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.
 24
 25### Investigating Unexpected Child Process of macOS Screensaver Engine
 26
 27`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.
 28
 29### Possible investigation steps
 30
 31- 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.
 32- 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.
 33- Identify the active screensaver for the user by reviewing the `com.apple.screensaver.*.plist` files 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`.
 34- Review process activity of `legacyScreenSaver` on the same host around the alert time, as code from third-party screensaver modules runs under that process on recent macOS versions.
 35- Locate the `.saver` bundle in use (commonly under `~/Library/Screen Savers/` or `/Library/Screen Savers/`) and check its code signature, creation time, origin, and contents.
 36- Review recent file events for the creation of `.saver` bundles or modification of screensaver plist files, and identify the process that performed them.
 37- Review other alerts for the same `host.id` and `user.name` to identify how the screensaver was delivered and whether other persistence mechanisms were added.
 38
 39### False positive analysis
 40
 41- 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.
 42- When the activity is confirmed benign, create an exception for the specific signed child executable rather than for all children of `ScreenSaverEngine`.
 43
 44### Response and remediation
 45
 46- Isolate the affected host from the network if the child process or screensaver is determined to be malicious.
 47- Terminate the malicious child process and its descendants.
 48- Reset the active screensaver to a built-in Apple screensaver, and remove the malicious `.saver` bundle after preserving a copy for analysis.
 49- Revert any unauthorized changes to the screensaver plist files.
 50- Investigate how the malicious screensaver was delivered and remediate the initial access vector.
 51- Escalate to the incident response team and search for the same `.saver` bundle or child process on other macOS hosts.
 52"""
 53references = [
 54    "https://posts.specterops.io/saving-your-access-d562bf5bf90b",
 55    "https://github.com/D00MFist/PersistentJXA",
 56]
 57risk_score = 47
 58rule_id = "48d7f54d-c29e-4430-93a9-9db6b5892270"
 59setup = """## Setup
 60
 61This rule requires data coming in from Elastic Defend.
 62
 63### Elastic Defend Integration Setup
 64Elastic 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.
 65
 66#### Prerequisite Requirements:
 67- Fleet is required for Elastic Defend.
 68- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 69
 70#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
 71- Go to the Kibana home page and click "Add integrations".
 72- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 73- Click "Add Elastic Defend".
 74- Configure the integration name and optionally add a description.
 75- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
 76- 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).
 77- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 78- 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.
 79For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
 80- Click "Save and Continue".
 81- 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.
 82For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 83"""
 84severity = "medium"
 85tags = [
 86    "Domain: Endpoint",
 87    "OS: macOS",
 88    "Use Case: Threat Detection",
 89    "Tactic: Persistence",
 90    "Data Source: Elastic Defend",
 91    "Resources: Investigation Guide",
 92    "Noise: Low",
 93    "Performance: Normal",
 94    "Rule Type: Event Correlation (EQL)",
 95    "Platform: macOS",
 96]
 97timestamp_override = "event.ingested"
 98type = "eql"
 99
100query = '''
101process where host.os.type == "macos" and event.type == "start" and process.parent.name == "ScreenSaverEngine"
102'''
103
104
105[[rule.threat]]
106framework = "MITRE ATT&CK"
107[[rule.threat.technique]]
108id = "T1546"
109name = "Event Triggered Execution"
110reference = "https://attack.mitre.org/techniques/T1546/"
111[[rule.threat.technique.subtechnique]]
112id = "T1546.002"
113name = "Screensaver"
114reference = "https://attack.mitre.org/techniques/T1546/002/"
115
116
117
118[rule.threat.tactic]
119id = "TA0003"
120name = "Persistence"
121reference = "https://attack.mitre.org/tactics/TA0003/"

Triage 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.*.plist files 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 legacyScreenSaver on the same host around the alert time, as code from third-party screensaver modules runs under that process on recent macOS versions.
  • Locate the .saver bundle 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 .saver bundles or modification of screensaver plist files, and identify the process that performed them.
  • Review other alerts for the same host.id and user.name to 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 .saver bundle 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 .saver bundle or child process on other macOS hosts.

References

Related rules

to-top