← All Binaries

pbpaste

Retrieves the contents of the clipboard (a.k.a. pasteboard) and writes them to the standard output (stdout). The utility is often used for creating new files with the clipboard content or for piping clipboard contents to other commands. It can also be used in shell scripts that may require clipboard content as input.

Path
/usr/bin/pbpaste
Author
Brendan Chamberlain (@infosecB)
Created
2023-04-11

Example Use Cases 1

Use pbpaste to collect sensitive clipboard data #

A pbpaste bash loop can continuously collect clipboard contents every x minutes and write contents to a file (or another location). This may allow an attacker to gather user credentials or collect other sensitive information.

while true; do echo $(pbpaste) >> loot.txt; sleep 10; done

Detections

Resources