Elastic high stable eql
Persistence via Suspicious Launch Agent or Launch Daemon
Identifies the creation of a launch agent or daemon property list file containing abnormal or suspicious values. An adversary may establish persistence by installing a new launch agent or daemon which executes at login. This rule looks for plist files created in LaunchAgents/LaunchDaemons directories with paths commonly used by malware.
Detection Logic
file where host.os.type == "macos" and event.type != "deletion" and
file.extension == "plist" and
file.path like ("/Library/LaunchAgents/*", "/Library/LaunchDaemons/*",
"/Users/*/Library/LaunchAgents/*", "/System/Library/LaunchAgents/*",
"/System/Library/LaunchDaemons/*") and
(process.executable like ("/private/tmp/*", "/private/var/root/Library/*", "/var/tmp/*",
"/tmp/*", "/var/folders/*", "/Users/Shared/*", "/var/root/*",
"/Library/WebServer/*", "/Library/Graphics/*", "/Library/Fonts/*") or
process.name like~ ("python*", "osascript", "bash", "zsh", "sh", "curl", "nscurl", "wget", "java")) and
not process.executable like ("/System/*", "/Library/PrivilegedHelperTools/*") and
not (process.code_signature.signing_id in ("com.apple.vim", "com.apple.cat", "com.apple.cfprefsd",
"com.jetbrains.toolbox", "com.apple.pico", "com.apple.shove",
"com.sublimetext.4", "com.apple.ditto") and process.code_signature.trusted == true) and
not (file.path like ("/Library/LaunchDaemons/com.jumpcloud.*",
"/Library/LaunchAgents/com.jumpcloud.*",
"/Library/LaunchDaemons/com.wazuh.*",
"/Library/LaunchDaemons/com.zscaler.service.plist",
"/Library/LaunchAgents/com.microsoft.*") and
process.executable == "/bin/bash") Field Validations
Loading…
Comments (0)
Loading comments...