Solved

blocking alt+ctrl+del

Posted on 2003-10-30
13
7,359 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_
  • 3
  • 2
  • 2
  • +6
13 Comments
 
LVL 5

Expert Comment

by:fantasy1001
Comment Utility
There is NO WAY to block alt+ctrl+del!

Thanks,
~ fantasy ~
0
 
LVL 53

Expert Comment

by:Dhaest
Comment Utility
0
 
LVL 9

Expert Comment

by:bhagyesht
Comment Utility
make window indentify your program as a screensaver.
http://www.experts-exchange.com/Hardware/Q_10231761.html
0
 
LVL 7

Expert Comment

by:OHDev2004
Comment Utility
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
Comment Utility
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
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:rabi9634
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
uh,sorry. I was thinking this was a vb question.
0
 
LVL 28

Expert Comment

by:vinnyd79
Comment Utility
0
 
LVL 9

Expert Comment

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

Accepted Solution

by:
cybermoonlight earned 50 total points
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now