6

I'm working on an app (Written in C#) that have a setting to run on KIOSK mode. I've just an challenge here which is disabling Ctrl+Alt+Del combination Event.

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.

7
  • Possible duplicate stackoverflow.com/questions/6408443/… Mar 17, 2012 at 16:18
  • If it's in Kiosk mode, can't you ensure that the hardware provided is missing one or all of the Ctrl, Alt or Del keys (assuming there's a keyboard at all)
    – Richard Ev
    Mar 17, 2012 at 16:19
  • @RichardEv , I didn't got it completely dear Richard but if your goal is disabling hardware or something like it, it isn't possible. if your goal is privation of keyboard, it isn't possible too.
    – mrArmg
    Mar 17, 2012 at 16:24
  • @Jason Evans, the link to Q#4234242 could work since it involves remapping the keys, before the OS gets a change to process them semantically. The other one involving global hooks won't work. Mar 17, 2012 at 16:37

6 Answers 6

10

CTRL+ALT+DEL is the secure attention sequence of Windows NT (and its derivatives like 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.

One security issue it addresses is that of a false login screen: consider a screen that looks exactly like the normal Windows login screen. 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). 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. If a user program could intercept the SAS, it wouldn't be worth anything.

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. I'm sure there are keyboard filter drivers-- or something to intercept that sequence-- that are designed for kiosk use.

2
  • Deat Smith, my point is not the login screen. on windows7 runtime, if you press Ctrl+Alt+Del you'll see a screen that allows you to log of, Lock the Computer, Change the password, etc .... I want to disable this options
    – mrArmg
    Mar 18, 2012 at 6:35
  • 1
    If someone was sowing a false login screen and you hit CTRL+ALT+DEL it would bring up that log off, lock, etc screen instead of staying there. That way you would know that the fake screen was fake. If a program could disable that from happening, you wouldn't be able to tell a fake login screen from a real one. Mar 18, 2012 at 20:44
2

It is not possible to capture CTRL+ALT+DEL, it is so by design in all Windows systems. 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.

I guess to capture CTRL+ALT+DEL you would need to write a device driver of some sorts.

Edit: Also see This answer. I did not try it, but the question is fairly similar.

1

Although it is sort of possible, it is not an easy task and not something that can be done in C#. This Article will show you how to disable CTRL+ALT+DEL using group policy editor. 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).

2
  • Group Policy will change the Registry Keys, I'm sure about that. but I couldn't find the right key to handle with.
    – mrArmg
    Mar 18, 2012 at 6:40
  • HKCU\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System\DisableTaskMgr = dword:1
    – Icemanind
    Mar 18, 2012 at 21:15
0

It is possible to pick up the CTRL+ALT+DEL combination, but not to disable it.
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.

0

It is possible to block CTRL+ALT+DEL combination. 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

  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. If your process has administrative privilege, you can suspend winlogon.exe. Hence, it cannot process the hotkey and nothing will happen if the user presses CTRL+ALT+DEL.

Please check this out: C++ code to disable CTRL+ALT+DEL.

-1

You will need to do some P/Invoke, in user32.dll, there's a method called SystemParametersInfo, check out these resources for more info

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

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

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.