Summery

The clipboard provides access to a significant amount of information, such as the pasting of credentials and 2FA soft tokens, as well as the possibility to interact directly with the RDP session clipboard.

Exploitation

You can use the Invoke-Clipboard script to extract user clipboard data. After uploading Invoke-Clipboard.ps1 onto the host and importing it into the session, you can start the logger with Invoke-ClipboardLogger.

The script will start to monitor for entries in the clipboard and present them in the PowerShell session. We need to be patient and wait until we capture sensitive information.

User credentials could also be obtained with tools such like Pentesting/The Grimoire/Tools/Mimikatz, keyloggers as well as C2 frameworks such as Metasploit which contain built-in functions for keylogging.