Clipboard is Exposed in Lock Screen
I learned of a new Windows vulnerability on Security Now (Episode 600). The clipboard is available even after you lock your computer. This allows anyone to get that data. Microsoft does not consider this to be a bug since physical access is required. Listen to the Security Now show for the details on how to access the clipboard from the lock screen.
But it is easy to clear your clipboard automatically. Run the command below. And you can do this via the task scheduler.
- cmd /c echo off |clip
Some site say to double quote the echo command. But the cmd shell does not like quotes with pipes. Using single quotes, double quotes, special characters, and escaping such items always confuses me. I much prefer the UNIX shell where I can easily troubleshoot commands.
Clear Clipboard on Windows Lock
Launch the 'Task Scheduler'. And then follow the steps below.
Create a New Task
First click 'Create Task...". See the screen show below.
Create Task - General Tab
Now name your new task whatever you desire. And optionally provide a description of your new task. Then go to the 'Triggers' tab.
Create Task - Triggers Tab
Now click "New..." to add a new trigger.
On the 'New Trigger' screen select 'On workstation lock' from the 'Begin the task:' drop down box. And then click "OK".
Your 'Triggers' tab should look like the following screen. Obviously the name of your computer and ID will be different. Click on the 'Actions' tab.
Create Task - Actions Tab
By default this screen will be blank. Click on 'New...' to add a new action.
Fill out the 'New Action' screen as shown below.
- Action: = Start a program (Default action)
- Program/script: = cmd.exe
- Add arguments (optional): = /c echo off | clip
- Start in (optional): = C:\Windows\System32
- Once done - Click "OK"
Ignore the 'Conditions' & 'Settings' Tabs
You can ignore the 'Conditions' and 'Settings' tabs. Just click "OK" to exit the create task screen. Now test your new task to ensure it is working properly.
Testing the New Task
In the left hand column click on 'Task Scheduler Library' to get to the root location of all your scheduled tasks. In the middle column scroll to your newly created task name. In this instance it is the first in the list and is named 'Clear Clipboard on Lock'. See the screen shot below.
Copy some text into your clipboard. Open notepad and paste it once to ensure you have some text to paste. Then on the 'Task Scheduler' window click 'Run' in the lower right hand column. This is under 'Selected Item'. Then try to paste again in notepad. It should not work. Close the 'Task Scheduler' window.
The next step is to copy something else into your clipboard. Lock your computer by typing 'Win+L'. Then type in your password and see if your clipboard is empty.