How TeamViewer and other remote control software simulate the Alt-Ctr-Del keypress, also known as the Windows Secure Attention Sequence (SAS)?
- Many forums state that this is not possible, but the facts are against them. :)
- SendSAS function looks the most obvious answer, but that requires Group Policy changes, UIPI bypass, etc. so it's definitely not what that the run-only TeamViewer does.
- Another common suggestion is using the proprietary SasLibEx library, but that is discontinued and works only up to Windows Vista.
- An old Stackoverflow answer has a near miss, but it does not work with newer Windows
SendInput
does not work for Alt-Ctrl-Del, neither if it is sent towinsta0\winlogon
desktopPostMessage(HWND_BROADCAST, WM_HOTKEY, 0, MAKELONG( MOD_CONTROL | MOD_ALT, VK_DELETE));
- nope- WmsgSendMessage was tried on the next man's suggestion, it proved no better or different than SendSAS.
- Keyboard filter drivers could be a solution, but they need code signing and special privileges to install, and implementing them is neither for the faint hearted. I also verified with
driverquery
that the run-only Team Viewer does not install drivers.
So, any idea how others do it?
The Internals of SAS implementation gives a good overview of what it is happening behind the scenes.