Restricted restart and shutdown on Windows 8

When scanning with Advanced Disinfection on a Windows 8 platform, additional restrictions are taken by KAV Engine to prohibit computer restarts or shutdowns initiated externally outside of the process incorporating the KAV Engine.

The KAV Engine prevents external processes from interactively initiating computer shutdown or restart by modifying list of privileges of the access token for every external process.

An external process is any process that does not incorporate the KAV Engine within.

Any user account interactively logged into Windows needs the SeShutdownPrivilege security privilege be present in the privilege list of its access token. This privilege is the right associated with the particular user account or group. Such association is done via access token that is created by Windows and is copied to each process started on behalf of this particular user or group. The right allows the given user account or group to perform system shutdown or restart. Any function from Windows API performing shutdown or restart operations on the system requires access token to have the SeShutdownPrivilege security privilege in its list of security privileges.

As a security measure, during the Advanced Disinfection procedure, the KAV SDK revokes the SeShutdownPrivilege security privilege from access tokens of every external process rendering it impossible to shutdown or restart the local computer externally. This is necessary to eliminate any attempts of malware to interfere with actions performed by KAV SDK at Advanced Disinfection cleanup stage. Only the process that shares the address space with KAV Engine and has the Advanced Disinfection module loaded in its memory can initiate system shutdown or restart during the Advanced Disinfection procedure.

To invoke system restart from your application, you are required to send the CLBK_REBOOT callback return value from your application to KAV Engine via the dedicated callback function.

Managing computer restarts and shutdown during Advanced Disinfection

The following scenario may be considered when it is necessary to restart or shutdown the system when the EVENT_REBOOTNEEDED event with the dwParam1 parameter is set to KRT_REQUIRED is returned from the KAV Engine to the callback handler function of your application at the end of the Advanced Disifnection cleanup procedure.

Please note that the system restart initiated by KAV Engine upon receiving the restart request from your application is performed forcibly so that all unsaved data will be lost and every non-closed application will be forcibly closed by the system. Make sure to notify the end-user about the need to save data before sending the restart request to KAV Engine.

  1. Your application requested scanning and accepted starting of Advanced Disinfection mode.
  2. The KAV Engine finishes the Advanced Disinfection procedure and notifies your application of the necessary system restart or shutdown by setting the dwEvent parameter of your callback function to EVENT_REBOOTNEEDED and defining the dwParam1 callback option with the value of KRT_REQUIRED.
  3. [optional] Your application may save necessary data or initiate closing of files or applications that were opened by the time Advanced Disinfection was fired up. This will help to prevent these files and applications from being forcibly closed by KAV Engine when restart or shutdown is initiated by KAV SDK.
  4. Return the request to restart the system from your application to KAV Engine by returning the CLBK_REBOOT code to the callback function.
  5. The KAV Engine will forcibly restart the operating system.
Page top