macOS: Unauthorized screensaver configuration modification
Adversaries can maintain persistence on macOS by modifying screensaver plist files to execute malicious .saver bundles, an activity detectable by monitoring for modifications by untrusted or script-based processes.
Triage facts
Revision 1- Applicability
- macOS
- Evidence
- Unknown
- Severity
- Medium
- Action
- Monitor or close
- Sources
- 3 public sources
- Freshness
- Revision 1Nov 2, 09:09 UTC
- Detection
- 1 rule
- Source quality
- A1Likely
Adversaries can establish persistence on macOS by deploying a malicious screensaver (.saver) bundle and modifying the associated screensaver preference (plist) files. This forces the system to execute the malicious bundle whenever the screensaver activates. Detection focuses on identifying modifications to com.apple.screensaver.*.plist files performed by unsigned, untrusted, or common script-based processes.
Attack Chain
- Attacker gains initial access to the macOS host.
- Attacker writes a malicious screensaver (.saver) bundle to a directory such as
~/Library/Screen Savers/. - Attacker uses an untrusted process or script interpreter (e.g.,
python,osascript,perl) to modify the screensaver preference plist. - The system, upon user inactivity or manual activation, triggers the
ScreenSaverEngine. - The screensaver engine loads the malicious .saver bundle.
- The malicious bundle executes arbitrary code under the context of the active user session.
Recommendation
- Deploy the provided detection logic to identify unauthorized modifications to screensaver preferences.
- Investigate any process modifying
com.apple.screensaver.*.plistfiles that lacks a valid code signature or is a known script interpreter. - Review the contents of
~/Library/Screen Savers/and/Library/Screen Savers/for unexpected or unsigned .saver bundles. - Verify that legitimate device management solutions or administrative scripts interacting with plist files are properly signed and identified as authorized.
Immediate actions
Deploy the screensaver plist modification detection rule
Threat Hunt
Search for unsigned or untrusted processes modifying plist files in Library/Preferences
Data: Process modification events
Mitigations
Enforce code signing for all binaries and scripts managing system settings
T1546.002
Gaps
- Telemetry visibility into screensaver module execution.
Detection coverage 1
Detect Unauthorized macOS Screensaver Plist Modification
mediumDetects unauthorized modification of screensaver plist files by untrusted or script-based processes
Detection queries are available on the platform. Get full rules →