Screensaver Plist File Modified by Unexpected Process
Description
Identifies when a screensaver plist file is modified by an unexpected process. 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.
Query · eql
sequence with maxspan=30s
[file where event.action != "deletion" and
file.name like "com.apple.screensaver.*.plist" and
file.path like~ (
"/Users/*/Library/Preferences/ByHost/*",
"/Library/Managed Preferences/*",
"/System/Library/Preferences/*"
) and
/* Filter OS processes modifying screensaver plist files */
not process.executable like (
"/usr/sbin/cfprefsd",
"/usr/libexec/xpcproxy",
"/System/Library/CoreServices/ManagedClient.app/Contents/Resources/MCXCompositor",
"/System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClient"
) and
not Effective_process.executable in ("/usr/local/jamf/bin/jamf",
"/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon")]
[process where event.action == "exec" and
process.name == "killall" and process.args : "cfprefsd"]