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/06/22"
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 = ["auditbeat-*", "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
29
30## Setup
31
32If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
33"""
34references = [
35 "https://posts.specterops.io/saving-your-access-d562bf5bf90b",
36 "https://github.com/D00MFist/PersistentJXA",
37]
38risk_score = 47
39rule_id = "48d7f54d-c29e-4430-93a9-9db6b5892270"
40severity = "medium"
41tags = ["Domain: Endpoint", "OS: macOS", "Use Case: Threat Detection", "Tactic: Persistence", "Data Source: Elastic Defend"]
42timestamp_override = "event.ingested"
43type = "eql"
44
45query = '''
46process where host.os.type == "macos" and event.type == "start" and process.parent.name == "ScreenSaverEngine"
47'''
48
49
50[[rule.threat]]
51framework = "MITRE ATT&CK"
52[[rule.threat.technique]]
53id = "T1546"
54name = "Event Triggered Execution"
55reference = "https://attack.mitre.org/techniques/T1546/"
56[[rule.threat.technique.subtechnique]]
57id = "T1546.002"
58name = "Screensaver"
59reference = "https://attack.mitre.org/techniques/T1546/002/"
60
61
62
63[rule.threat.tactic]
64id = "TA0003"
65name = "Persistence"
66reference = "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.
Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested
and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested
to @timestamp for this rule to work.
References
Related rules
- Attempt to Enable the Root Account
- Authorization Plugin Modification
- Bash Shell Profile Modification
- Creation of Hidden Launch Agent or Daemon
- Creation of Hidden Login Item via Apple Script