5

The "clipboard" buffer might contain sensitive information (like passwords, or private messages sent to or received from other people) cut/copied previously, that, wenn accidentally pasted into a wrong window, can leak this sensitive information.

This can very well happen by accident when a users attempts to cut/copy something, and believes that the cut/copy operation succeeded, when it in fact didn't. When pasting the buffer content, it would unintentionally be content from a previous cut/copy operation.

Password managers like KeePass provide a functionality where the clipboard buffer is cleared automatically after a predefined timout, so that passwords cannot be pasted by accident.

Do common desktop operating systems (Windows, Mac OS and Linux) provide a way of configuring such a clipboard timeout globally?

Alternatively, which third party tool provides this functionality?

  • it would be trivial to create such a tool in any language that has a clipboard interface. – dandavis Oct 4 '16 at 18:13
  • @dandavis Probably, but that makes me wonder why no-one bothered doing so. – tmh Oct 5 '16 at 18:20
2

Sadly as far as know there is no such feature as "clipboard timeout". I miss this too :(.

Actually, the current evolution of end-users desktop environment seems to go the opposite way, with so-called "clipboard managers" enabled by default which store the history of the nth latest clipboard values, thus heavily reducing effectiveness of password managers' clipboard clearing feature (clipboard current value will be cleared, but the password will remain accessible and readable in clear form in the clipboard manager history...).

The only technical workaround I know is to run a system-specific command at regular interval which will clear the current value of the clipboard (command which may not be even available by default, at least on Linux, and therefore require a specific installation). As ugly as it can be, but I did not found anything better.

Otherwise, you have no other choice than train yourself to consider the copy/paste operation as a potentially risky operation and double check what you are doing (and of course get rid of these awful clipboard manager software!).

  • "The only technical workaround I know is to run a system-specific command at regular interval which will clear the current value of the clipboard" -- I guess it would be more convenient if the clipboard was cleared x minutes after last usage, not in regular intervals. Otherwise we'd risk losing clipboard content right after a cut/copy operation. – tmh Oct 5 '16 at 18:17
2

That's why a good password manager like KeyPass is far better than a copy/paste solution from an encrypted text file. At least on Windows, it can avoid to use the clipboard and directly simulate key stroke inputs in the application window. So you can instruct it to send the following sequence (its default one)

c h a r a c t e r s _ o f _ l o g i n Tab p a s s w o r d Return

after positioning the cursor in the proper field. That way nothing ever went in the clipboard.

If you must use the clipboard, and have no clipboard manager installed, each new copied value replaces the previous one, so you should consistently copy a dummy text after a copy/paste of sensitive information.

If you have a smart clipboard manager that remembers many values, you should just not use the clipboard for sensitive information...

  • "copy a dummy text after a copy/paste" -- that's actually what I'm doing after almost every copy/paste. This lead me to asking the question in the first place: Did anyone think of automating that "clipboard reset"? – tmh Oct 5 '16 at 18:15
  • 1
    You'd also need to make sure the dummy text is at least as large as the sensitive content you are clearing, to protect against cold-boot attacks. – John Blatz Oct 5 '16 at 21:45
1

For Mac OS, this discussion offers some script-based approaches: https://apple.stackexchange.com/questions/55146/is-there-an-easy-way-to-clear-empty-the-clipboard

For Windows, ClipTTL is a simple freeware utility that clears the clipboard after a given time: https://www.wilderssecurity.com/threads/clipwipe-a-tiny-system-wide-clipboard-wiper.389092/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.