Suspicious Finder Cache File Modification
Description
This rule detects potential malicious activity on macOS endpoints by identifying modifications to Finder-related cache files by suspicious processes. It targets adversarial techniques, such as those used by the XCSSET malware, where an attacker maintains persistence by modifying system configurations—like the Dock plist (com.apple.dock.plist)—to execute malicious code each time the Dock or Launchpad is launched. The rule triggers when a file modification event occurs, involving processes such as osascript, bash, sh, zsh, curl, or nscurl, or when the modifying process lacks a valid code signature or is untrusted.
Query · eql
file where event.action == "modification" and file.path like "/Users/*/Library/Caches/com.apple.finder/*" and
(process.name in ("osascript", "bash", "sh", "zsh", "curl", "nscurl") or
(process.code_signature.exists == false or process.code_signature.trusted == false)) and
not (process.executable like "/System/*" and file.name like ("Cache.db-shm", "Cache.db-wal"))