text code block:process where host.os.type == "macos" and event.type == "start" and event.action == "exec" and process.name == "pbpaste" and process.args_count == 1 and (process.parent.name in ("node", "osascript") or process.parent.name like "python*") and not process.parent.executable like "/Users/*/.pyenv/versions/*/bin/python3*"
Install detection rules in Elastic Security
Detect Pbpaste Execution via Unusual Parent Process in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).