简体   繁体   English

在 windows7 上禁用 Ctrl+Alt+Del 组合

[英]Disable Ctrl+Alt+Del Combination on windows7

I'm working on an app (Written in C#) that have a setting to run on KIOSK mode.我正在开发一个应用程序(用 C# 编写),它的设置可以在 KIOSK 模式下运行。 I've just an challenge here which is disabling Ctrl + Alt + Del combination Event.我在这里只是一个挑战,即禁用Ctrl + Alt + Del组合事件。

There is no right answer in the similar past posts.在过去的类似帖子中没有正确的答案。 Please let me know about the right action.请让我知道正确的操作。 Considering, my code is working with registry keys to disable/enable options, if you know any registry key,it will be more helpful.考虑到,我的代码正在使用注册表项来禁用/启用选项,如果您知道任何注册表项,它会更有帮助。

CTRL + ALT + DEL is the secure attention sequence of Windows NT (and its derivatives like Win7). CTRL + ALT + DEL是 Windows NT(及其衍生产品,如 Win7)的安全注意序列 It is the one key combination that is guaranteed to get the OS's attention.它是保证引起操作系统注意的一个组合键。 The whole point of the SAS is that it can't be intercepted or stopped by user programs. SAS 的全部意义在于它不能被用户程序拦截或停止。

One security issue it addresses is that of a false login screen: consider a screen that looks exactly like the normal Windows login screen.它解决的一个安全问题是虚假登录屏幕:考虑一个看起来与正常 Windows 登录屏幕完全相同的屏幕。 There's no way to tell that it's a fake just by looking at it.仅凭外观无法判断它是假的。 But, if you're in the habit of always pressing CTRL + ALT + DEL before logging in (there is an option to always require it for the legitimate screen), pressing the SAS on a false login screen will bring up task manager or the secure attention screen (with the log off, change password, etc options).但是,如果您习惯于在登录前始终按CTRL + ALT + DEL (有一个选项可以始终要求合法屏幕使用它),则在错误登录屏幕上按 SAS 将调出任务管理器或安全注意屏幕(带有注销、更改密码等选项)。 The real login screen doesn't do that;真正的登录屏幕不会这样做; it just stays there on the screen.它只是停留在屏幕上。 As long as the OS itself isn't replaced or compromised, CTRL + ALT + DEL will protect you from false login screens.只要操作系统本身没有被替换或受到损害, CTRL + ALT + DEL将保护您免受虚假登录屏幕的影响。 If a user program could intercept the SAS, it wouldn't be worth anything.如果用户程序可以拦截 SAS,它就没有任何价值。

The SAS was baked into the Windows NT design right from the beginning (it was in the first release in 1993), so getting around it won't be easy. SAS 从一开始就融入到 Windows NT 设计中(它是 1993 年的第一个版本),因此绕过它并不容易。 I'm sure there are keyboard filter drivers-- or something to intercept that sequence-- that are designed for kiosk use.我确信有键盘过滤器驱动程序——或拦截该序列的东西——是专为信息亭使用而设计的。

It is not possible to capture CTRL + ALT + DEL , it is so by design in all Windows systems.无法捕获CTRL + ALT + DEL ,在所有 Windows 系统中都是这样设计的。 This is a security issue, if the user hits CTRL + ALT + DEL , he or she should be certain that it is the operating system and not some application (possibly a password-catching trojan) that responds to it.这是一个安全问题,如果用户按下CTRL + ALT + DEL ,他或她应该确定是操作系统而不是某个应用程序(可能是密码捕获木马)响应它。

I guess to capture CTRL + ALT + DEL you would need to write a device driver of some sorts.我想要捕获CTRL + ALT + DEL,您需要编写某种设备驱动程序。

Edit: Also see This answer .编辑:另请参阅此答案 I did not try it, but the question is fairly similar.我没有尝试过,但问题非常相似。

Although it is sort of possible, it is not an easy task and not something that can be done in C#.尽管它有点可能,但这不是一件容易的事,也不是在 C# 中可以完成的事情。 This Article will show you how to disable CTRL + ALT + DEL using group policy editor.本文将向您展示如何使用组策略编辑器禁用CTRL + ALT + DEL To permanently disable the combination though, you will either need to write your own keyboard driver or write your own GINA stub (Graphical Identification and Authentication).但是,要永久禁用组合,您需要编写自己的键盘驱动程序或编写自己的 GINA 存根(图形识别和身份验证)。

It is possible to block CTRL + ALT + DEL combination.可以阻止CTRL + ALT + DEL组合。 However, you can't really disable it.但是,您无法真正禁用它。 As far as I know, there are two possible methods.据我所知,有两种可能的方法。

  1. Remapping the keyboard layout.重新映射键盘布局。 There is a registry binary key that allows you to remap keyboard layout:有一个注册表二进制键可让您重新映射键盘布局:
HKLM\System\CurrentControlSet\Control\Keyboard Layout\Scancode Map

Please check this out: Disabling Windows Hot Keys请查看: 禁用 Windows 热键

  1. This method can be dangerous, but I haven't noticed any side effects this method can cause.这种方法可能很危险,但我没有注意到这种方法可能导致的任何副作用。 The CTRL + ALT + DEL combination is handled by winlogon.exe. CTRL + ALT + DEL组合由 winlogon.exe 处理。 If your process has administrative privilege, you can suspend winlogon.exe.如果您的进程具有管理权限,您可以挂起 winlogon.exe。 Hence, it cannot process the hotkey and nothing will happen if the user presses CTRL + ALT + DEL .因此,它无法处理热键,如果用户按下CTRL + ALT + DEL不会发生任何事情。

Please check this out: C++ code to disable CTRL+ALT+DEL .请查看: 禁用 CTRL+ALT+DEL 的 C++ 代码

It is possible to pick up the CTRL + ALT + DEL combination, but not to disable it.可以选择CTRL + ALT + DEL组合,但不能禁用它。
I tried to disable it with SetWindowsHookEx and WH_KEYBOARD_LL and you can successfully get notified when CTRL + ALT + DEL is pressed, but you cannot do anything about it.我尝试使用SetWindowsHookExWH_KEYBOARD_LL禁用它,当按下CTRL + ALT + DEL时,您可以成功收到通知,但您无能为力。

You will need to do some P/Invoke, in user32.dll , there's a method called SystemParametersInfo , check out these resources for more info您将需要执行一些 P/Invoke,在user32.dll 中,有一个名为SystemParametersInfo的方法,请查看这些资源以获取更多信息

http://pinvoke.net/search.aspx?search=SystemParametersInfo&namespace=[All] http://pinvoke.net/search.aspx?search=SystemParametersInfo&namespace=[全部]

http://msdn.microsoft.com/en-us/library/windows/desktop/ms724947%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms724947%28v=vs.85%29.aspx

I did something similar a long while back, but no longer have the code, though I did find this (it's in vb6), but it shouldn't be too hard to get the idea and translate to .NET很久以前我做了类似的事情,但不再有代码,虽然我确实找到了这个(它在 vb6 中),但是理解这个想法并转换为 .NET 应该不会太难

http://www.developerfusion.com/code/1021/how-to-disable-ctrlaltdel/ http://www.developerfusion.com/code/1021/how-to-disable-ctrlaltdel/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM