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 = "2024/05/21"
 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.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Unexpected Child Process of macOS Screensaver Engine"
20note = """## Triage and analysis
21
22- Analyze the descendant processes of the ScreenSaverEngine process for malicious code and suspicious behavior such
23as a download of a payload from a server.
24- Review the installed and activated screensaver on the host. Triage the screensaver (.saver) file that was triggered to
25identify whether the file is malicious or not.
26"""
27references = [
28    "https://posts.specterops.io/saving-your-access-d562bf5bf90b",
29    "https://github.com/D00MFist/PersistentJXA",
30]
31risk_score = 47
32rule_id = "48d7f54d-c29e-4430-93a9-9db6b5892270"
33setup = """## Setup
34
35This rule requires data coming in from Elastic Defend.
36
37### Elastic Defend Integration Setup
38Elastic 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.
39
40#### Prerequisite Requirements:
41- Fleet is required for Elastic Defend.
42- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
43
44#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
45- Go to the Kibana home page and click "Add integrations".
46- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
47- Click "Add Elastic Defend".
48- Configure the integration name and optionally add a description.
49- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
50- 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).
51- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
52- 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.
53For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
54- Click "Save and Continue".
55- 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.
56For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
57"""
58severity = "medium"
59tags = [
60    "Domain: Endpoint",
61    "OS: macOS",
62    "Use Case: Threat Detection",
63    "Tactic: Persistence",
64    "Data Source: Elastic Defend",
65]
66timestamp_override = "event.ingested"
67type = "eql"
68
69query = '''
70process where host.os.type == "macos" and event.type == "start" and process.parent.name == "ScreenSaverEngine"
71'''
72
73
74[[rule.threat]]
75framework = "MITRE ATT&CK"
76[[rule.threat.technique]]
77id = "T1546"
78name = "Event Triggered Execution"
79reference = "https://attack.mitre.org/techniques/T1546/"
80[[rule.threat.technique.subtechnique]]
81id = "T1546.002"
82name = "Screensaver"
83reference = "https://attack.mitre.org/techniques/T1546/002/"
84
85
86
87[rule.threat.tactic]
88id = "TA0003"
89name = "Persistence"
90reference = "https://attack.mitre.org/tactics/TA0003/"

Triage and analysis

  • Analyze the descendant processes of the ScreenSaverEngine process for malicious code and suspicious behavior such as a download of a payload from a server.
  • Review the installed and activated screensaver on the host. Triage the screensaver (.saver) file that was triggered to identify whether the file is malicious or not.

References

Related rules

to-top