Solved

blocking alt+ctrl+del

Posted on 2003-10-30
13
7,370 Views
Last Modified: 2013-11-13
hi
  any one know that how can i block alt+ctrl+del
using vc++(API).and how can i get adminstrator access in kernal mode using windows
0
Comment
Question by:arehman_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +6
13 Comments
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9648825
There is NO WAY to block alt+ctrl+del!

Thanks,
~ fantasy ~
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 9648881
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9649212
make window indentify your program as a screensaver.
http://www.experts-exchange.com/Hardware/Q_10231761.html
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 7

Expert Comment

by:OHDev2004
ID: 9649231
There is a way of blocking access to the Task Manager ;
it's by using the windows registry ,, so u can access the windows registry within your app
and add this item as following :

you should check for this Key :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
if any of the above Keys don't exists , just create it ,
(because by default the last key "System" does not exists)

then add an Dword Item with the following name "DisableTaskMgr"
with a value of "1"      '(dword:00000001)
0
 
LVL 7

Expert Comment

by:OHDev2004
ID: 9649260
by the way ,,, in case u don't know the way to access the windows registry ,,:


(1) from windows : click Start ,, Run ,, then type REGEDIT.exe
(2) from within ur Program : you must call Api Functions to access and write to the registry ,,
     i know these functions but for Vb not in vc++ ,, but u'll find it every where

0
 
LVL 2

Expert Comment

by:Peter Skov
ID: 9650106
A quick Googlesearch for
Disable "ctrl-alt-del"

gave me 15900 hits. On the first page, though, this link occurs:
http://forums.free2code.net/view.php?tid=579

It seems there are ways to do it after all.

Peter
0
 
LVL 1

Expert Comment

by:rabi9634
ID: 9651139
I'll assume you want to block a specific function.  If you explore the registry a bit more, you can add or disable specific functions in the Task Manager.. (or in the little Windows Security box that comes up in W2K).  
0
 
LVL 24

Expert Comment

by:R_Rajesh
ID: 9651735
to block specific function click start->run type gpedit.msc you will find local coumputer policy here goto userconfiguration->administrativetemplates->system->ctrl+alt+del option you can disable various features by setting values on the right hand pane. browse through other sections aswell you may find something usefil

this ofcourse does not work on win98, in 98 as  bhagyesht mentioned you can set screensaver running to true.

also check this out
http://www.codeproject.com/useritems/preventclose.asp
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 9654917
The only way to disable ctrl-alt del on an NT based OS is to write a replacement msgina.dll which cannot be done in VB.
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 9654929
uh,sorry. I was thinking this was a vb question.
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 9654959
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9655358
vinny: not vb but vc ("using vc++(API).")
0
 
LVL 2

Accepted Solution

by:
cybermoonlight earned 50 total points
ID: 9662009
Vinny is correct in saying that to disable ctrl-alt-del on windowsNT based OS's, you must write a replacement GINA dll stub. This must be done   in c as vb cannot create standard dll's. But it is a simple concept, all you have to code is a simple extansion, whose function is to prevent the SAS sequence being passed on to the winlogon process, that hooks into the existing GINA in order to process other events. To get the OS to call this dll you must change the filepath in the registry
check thislink forloadsofinfo on replacingtheGINA
http://www.microsoft.com/windows2000/docs/msgina.doc

this is an example i found while searching through google ..search phrase : GINA Winlogon CTRL-ALT-DEL

-------------------------------- mygina.c --------------------------------
#include <windows.h>
#include <winwlx.h>

struct {
      HMODULE hDll;
      BOOL (WINAPI *WlxNegotiate)();
      BOOL (WINAPI *WlxInitialize)();
      VOID (WINAPI *WlxDisplaySASNotice)();
      int (WINAPI *WlxLoggedOutSAS)();
      BOOL (WINAPI *WlxActivateUserShell)();
      int (WINAPI *WlxLoggedOnSAS)();
      VOID (WINAPI *WlxDisplayLockedNotice)();
      int (WINAPI *WlxWkstaLockedSAS)();
      BOOL (WINAPI *WlxIsLockOk)();
      BOOL (WINAPI *WlxIsLogoffOk)();
      VOID (WINAPI *WlxLogoff)();
      VOID (WINAPI *WlxShutdown)();
      BOOL (WINAPI *WlxScreenSaverNotify)();
      BOOL (WINAPI *WlxStartApplication)();
      BOOL (WINAPI *WlxNetworkProviderLoad)();
} MsGina;

BOOL WINAPI WlxNegotiate(DWORD dwWinlogonVersion, PDWORD pdwDllVersion)
{
      MsGina.hDll = LoadLibrary("msgina.dll");
      if(MsGina.hDll == NULL) return FALSE;

      MsGina.WlxActivateUserShell = GetProcAddress(MsGina.hDll, "WlxActivateUserShell");
      MsGina.WlxDisplayLockedNotice = GetProcAddress(MsGina.hDll, "WlxDisplayLockedNotice");
      MsGina.WlxDisplaySASNotice = GetProcAddress(MsGina.hDll, "WlxDisplaySASNotice");
      MsGina.WlxInitialize = GetProcAddress(MsGina.hDll, "WlxInitialize");
      MsGina.WlxIsLockOk = GetProcAddress(MsGina.hDll, "WlxIsLockOk");
      MsGina.WlxIsLogoffOk = GetProcAddress(MsGina.hDll, "WlxIsLogoffOk");
      MsGina.WlxLoggedOnSAS = GetProcAddress(MsGina.hDll, "WlxLoggedOnSAS");
      MsGina.WlxLoggedOutSAS = GetProcAddress(MsGina.hDll, "WlxLoggedOutSAS");
      MsGina.WlxLogoff = GetProcAddress(MsGina.hDll, "WlxLogoff");
      MsGina.WlxNegotiate = GetProcAddress(MsGina.hDll, "WlxNegotiate");
      MsGina.WlxScreenSaverNotify = GetProcAddress(MsGina.hDll, "WlxScreenSaverNotify");
      MsGina.WlxShutdown = GetProcAddress(MsGina.hDll, "WlxShutdown");
      MsGina.WlxStartApplication = GetProcAddress(MsGina.hDll, "WlxStartApplication");
      MsGina.WlxWkstaLockedSAS = GetProcAddress(MsGina.hDll, "WlxWkstaLockedSAS");

      return MsGina.WlxNegotiate(dwWinlogonVersion, pdwDllVersion);
}

BOOL WINAPI WlxInitialize(
      LPWSTR lpWinsta,
      HANDLE hWlx,
      PVOID pvReserved,
      PVOID pWinlogonFunctions,
      PVOID *pWlxContext)
{
      return MsGina.WlxInitialize(
            lpWinsta,
            hWlx,
            pvReserved,
            pWinlogonFunctions,
            pWlxContext);
}

VOID WINAPI WlxDisplaySASNotice(PVOID pWlxContext)
{
      MsGina.WlxDisplaySASNotice(pWlxContext);
}

int WINAPI WlxLoggedOutSAS(
      PVOID pWlxContext,
      DWORD dwSasType,
      PLUID pAuthenticationId,
      PSID pLogonSid,
      PDWORD pdwOptions,
      PHANDLE phToken,
      PWLX_MPR_NOTIFY_INFO pNprNotifyInfo,
      PVOID *pProfile)
{
      return MsGina.WlxLoggedOutSAS(
            pWlxContext,
            dwSasType,
            pAuthenticationId,
            pLogonSid,
            pdwOptions,
            phToken,
            pNprNotifyInfo,
            pProfile);
}

BOOL WINAPI WlxActivateUserShell(
      PVOID pWlxContext,
      PWSTR pszDesktopName,
      PWSTR pszMprLogonScript,
      PVOID pEnvironment)
{
      return MsGina.WlxActivateUserShell(
            pWlxContext,
            pszDesktopName,
            pszMprLogonScript,
            pEnvironment);
}

int WINAPI WlxLoggedOnSAS(PVOID pWlxContext, DWORD dwSasType, PVOID pReserved)
{
      HANDLE hMutex;

      if(dwSasType == WLX_SAS_TYPE_CTRL_ALT_DEL) {
            hMutex = OpenMutex(MUTANT_QUERY_STATE, FALSE, "mygina mutex");
            if(hMutex != NULL) {
                  CloseHandle(hMutex);
                  return WLX_SAS_ACTION_NONE;
            }
      }

      return MsGina.WlxLoggedOnSAS(pWlxContext, dwSasType, pReserved);
}

VOID WINAPI WlxDisplayLockedNotice(PVOID pWlxContext)
{
      MsGina.WlxDisplayLockedNotice(pWlxContext);
}

int WINAPI WlxWkstaLockedSAS(PVOID pWlxContext, DWORD dwSasType)
{
      return MsGina.WlxWkstaLockedSAS(pWlxContext, dwSasType);
}

BOOL WINAPI WlxIsLockOk(PVOID pWlxContext)
{
      return MsGina.WlxIsLockOk(pWlxContext);
}

BOOL WINAPI WlxIsLogoffOk(PVOID pWlxContext)
{
      return MsGina.WlxIsLogoffOk(pWlxContext);
}

VOID WINAPI WlxLogoff(PVOID pWlxContext)
{
      MsGina.WlxLogoff(pWlxContext);
}

VOID WINAPI WlxShutdown(PVOID pWlxContext, DWORD ShutdownType)
{
      MsGina.WlxShutdown(pWlxContext, ShutdownType);
}

BOOL WINAPI WlxScreenSaverNotify(PVOID pWlxContext, BOOL *pSecure)
{
      return MsGina.WlxScreenSaverNotify(pWlxContext, pSecure);
}

BOOL WINAPI WlxStartApplication(
      PVOID pWlxContext,
      PWSTR pszDesktopName,
      PVOID pEnvironment,
      PWSTR pszCmdLine)
{
      return MsGina.WlxStartApplication(pWlxContext, pszDesktopName, pEnvironment, pszCmdLine);
}

BOOL WINAPI WlxNetworkProviderLoad(PVOID pWlxContext, PWLX_MPR_NOTIFY_INFO pNprNotifyInfo)
{
      return MsGina.WlxNetworkProviderLoad(pWlxContext, pNprNotifyInfo);
}

-------------------------------- mygina.def --------------------------------
EXPORTS
      WlxActivateUserShell
      WlxDisplayLockedNotice
      WlxDisplaySASNotice
      WlxInitialize
      WlxIsLockOk
      WlxIsLogoffOk
      WlxLoggedOnSAS
      WlxLoggedOutSAS
      WlxLogoff
      WlxNegotiate
      WlxScreenSaverNotify
      WlxShutdown
      WlxStartApplication
      WlxWkstaLockedSAS

This should give you all the info you need in order to solve your problem. Thanks

Mark
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Part One of the two-part Q&A series with MalwareTech.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question