0
  1. Does windows clipboard store copied Strings locally, or, as with files, does it only deal with pointers?

  2. If it does, is it possible to modify the clipboard to make a logfile of all Strings that are routed through it?

I would imagine this could be a dangerous tool against people who hide high entropy passwords somewhere deep in their system (maybe encrypted) and then just copy paste them where needed.

Kdawg
  • 167
  • 11

2 Answers2

0

It's certainly possible -- there are plenty of commercial keyloggers (this one, for example) that can log text copied to the clipboard.

You're absolutely right that this is a security risk.

Christian Ternus
  • 8,406
  • 24
  • 39
0

Yes, it looks like you can actually log everything that goes through the clipboard with the AddClipboardFormatListener API call: relevant SO question here. Simply pass the handle of your window in as the only parameter. The SetClipboardViewer function will also work for older versions of Windows.

This is certainly a security risk.

This Microsoft forum suggests that the clipboard is stored entirely in memory, and this part of MSDN talks about receiving a global memory handle on the clipboard.

Community
  • 1
  • 1
Millie Smith
  • 4,536
  • 2
  • 24
  • 60