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