Pbpaste Execution via Unusual Parent Process

Last updated 8 days ago on 2026-02-03
Created 12 days ago on 2026-01-30

About

Detects when an unusual parent process like Node.js, Python, or osascript executes the pbpaste binary to access clipboard data. This technique has been used by malware like OtterCookie to steal passwords and seed phrases from the clipboard.
Tags
Domain: EndpointOS: macOSUse Case: Threat DetectionTactic: CollectionData Source: Elastic DefendLanguage: eql
Severity
high
Risk Score
73
MITRE ATT&CK™

Collection (TA0009)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.process-*
Related Integrations

endpoint(external, opens in a new tab or window)

Query
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).