Elastic medium stable eql

Persistence via Folder Action Script

Detects modification of a Folder Action script. A Folder Action script is executed when the folder to which it is attached has items added or removed, or when its window is opened, closed, moved, or resized. Adversaries may abuse this feature to establish persistence by utilizing a malicious script.

View Source

Detection Logic

process where host.os.type == "macos" and event.type in ("start", "process_started") and process.parent.name == "com.apple.foundation.UserScriptService" and 
 ((process.name like~ ("osascript", "python*", "tcl*", "node", "perl", "ruby", "php")) or 
  (process.name in ("bash", "csh", "zsh", "sh") and process.args == "-c")) and 
 not process.args like ("/Users/*/Library/Scripts/*", "/Users/*/Library/Application Scripts/*", "/Library/Scripts/*")

Field Validations

Loading…

Comments (0)

Loading comments...