18

Is it possible for a third party app to access macOS's clipboard content? I am asking in relation to copy & paste sensitive data such as passwords and sensitive file content.

0

2 Answers 2

20

No security for data that is in one of the system clipboards is possible by design. This appears to be changing with 2020 features in publicly announced betas where Apple potentially will notify us each time an app copies content out of the clipboard. Some very common apps appear to be abusing the privilege and even if your password manager clears the contents quickly, this could easily be abused to steal keystrokes and passwords or other sensitive data.

The macOS clipboard is a public billboard open to all processes. Clipboard is the mechanism to let all apps read / modify shared data.

Practically you can Either restrict your set of apps installed to those you trust with the data you put in the clipboard or don't restrict sensitive content by never placing it into the clipboard so that the least trusted app only gets data you can permit it to see / log / capture / exfiltrate.

From here, the rabbit hole for developers and security minded people using macOS begins with an overview of secure text input options within programs to prevent key loggers in addition to pasteboard snoopers from grabbing secure input:

There are some things you can do, however, to mitigate this. Freely available and trustworthy software can show you event taps, key loggers, exfiltration and just communication attempts so you can catch a program that might do things you don’t expect.

ReiKey and LuLu are two I would start with to secure yourself and thereby your clipboard contents.

14
  • 3
    @SargeBorsch That's what password managers are for, generally. I expect there are safe password managers for Mac OS; though I also expect that applications with the same or higher level of permissions could intercept their methods as well.
    – Luaan
    Commented Apr 20, 2017 at 12:58
  • 6
    @SargeBorsch - Even unintentional security flaws go unnoticed in open source, much less actual malicious backdoors and trojans. The notion that any old user is capable of inspecting the code of any nontrivial piece of software they use, then build it on their machine once it's known to be safe - after doing so for the compiler, of course - is flat out ridiculous, and contradictory to actual practice. (I.e. using package repositories with signed packages, meaning you implicitly trust a distribution's contributors to take care of this for you.)
    – millimoose
    Commented Apr 20, 2017 at 19:36
  • 4
    @SargeBorsch: See Ken Thompson's incredibly brilliant (and frightening) Turing Award acceptance speech / lecture and the discussion thereof on the wiki. Commented Apr 21, 2017 at 0:19
  • 1
    @JörgWMittag how is that related to password managers? Are you trying to prove that since OS, CPU, compilers, etc may be hacked, the quality/availability of other software's source code doesn't matter? Commented Apr 23, 2017 at 15:54
  • 1
    @Wowfunhappy A plain text password means you have to secure physical access to your Mac and trust all apps that read the clipboard. If your threat model is you don't trust your apps and your access - you need to use UBIKEY or multi factor auth and assume the password will leak. Everything is a risk and if it's wide open depends on your specific threat model.
    – bmike
    Commented Nov 27, 2018 at 21:28
7

Any process with sufficient permissions can read your clipboard at any time, and you can't easily prevent this. Security is always a trade-off with usability, and this is the choice that most (but not all) OSes take when implementing the clipboard.

Some apps that store sensitive data (e.g. 1Password) implement a timeout such that any information you copy out of that application is cleared from the clipboard a short time later. If you'd like to do something like that globally, you could look at the answers to this previous question for ideas.

1
  • 1
    Great point that by clearing known sensitive content on a timer, you limit the time frame where a less trusty process can be launched and snoop on text from the clipboard. This also lessens the risk someone would walk away from a computer and have the password to paste hours later into twitter or other social media.
    – bmike
    Commented Apr 21, 2017 at 2:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .