Some additional functionality such as monitoring features or quick scanning of system environment is implemented using proprietary Kaspersky drivers. The drivers are delivered in the KAV SDK package.
For example, drivers are used to hook file operations or to intercept network traffic. When scanning of the system memory is performed, the presence of the File Monitor driver (klif.sys) is mandatory for successful detection and disinfection of some types of malware.
Drivers from the KAV SDK setup package may come into a conflict with third-party anti-virus products and security applications. Under such conditions, please contact your Technical Account Manager for appropriate recommendations.
32-bit versions of KAV SDK are distributed with both 32-bit and 64-bit drivers (operate on x64 Windows platforms). The 32-bit drivers operate on x86 Windows platforms while 64-bit drivers are installed only when the 32-bit KAV SDK is installed on a 64-bit operating system. In this case user mode subsystem of KAV SDK runs in a 32-bit space and the kernel mode part runs in the native 64-bit address space.
Please note that 64-bit native versions of KAV SDK are distributed without drivers. Following technologies depend on drivers and are not supported in native 64-bit builds of KAV SDK:
kaveScanCriticalArea function)Drivers provide the key functionality for the KAV SDK product necessary to neutralize complex threats. For example, detection and disinfection of sophisticated rootkits and bootkits such as Sinowal is only possible when kl1 driver is started.
When working with such types of threats, make sure you first do quick system scan using QSCAN technology before performing other types of scan. This will help to neutralize malware that, when loaded into system memory, can hide its presence in other system areas such as boot sectors.
Proprietary driver stack used in KAV SDK has been re-imagined (starting from builds 8.3.x.x) to incorporate changes necessary to fully support for driver model changes and features delivered in Microsoft Windows 8, and further optimize built-in driver chain. Changes are also targeted on delivering smooth support for networking implemented by Modern apps delivered with Microsoft Store in Windows 8. In KAV SDK 8.5.x.x we brought a new set of application level drivers for network interception that analyze network connections, and a dedicated monitoring driver that handles calls to system functions.
Renovated driver infrastructure
KAV SDK 8.5.x.x introduces a new driver ecosystem with the klhk and kltdf/klwtp drivers. The klhk allows to handle malicious attempts to exploit core operating system capabilities. The kltdf/klwtp drivers allow your product to organize a proxy-less sink system that handles network events on the application level. These architectural changes make a set of previously required drivers unnecessary.
When integrating KAV SDK 8.5.x.x or later, please note that obsolete network drivers can only be removed from the system and cannot be updated.
Obsolete drivers have been replaced by the new kltdf/klwtp. The obsolete drivers cannot be installed using the UDInstaller tool.
Functionality provided by these drivers is covered by kltdf/klwtp drivers each specific to the target platform. For example, if you are migrating to KAV SDK components versions 8.5.x.x or later, following obsolete drivers must be removed from your system:
klim5klim5_mklim6knepskltdiklwfpDriver stack
Сurrent KAV SDK version is used with the following drivers:
klif—Kaspersky core driver implementing essential functionality of File Monitor.The driver allows the File Monitor component to monitor file and registry operations. Additionally, the driver handles other types of calls of system API such usage of window functions and attempts to manage processes.
This driver depends on the companion klflt and klhk drivers. The klflt driver manages system events for the user mode part of KAV library. At the runtime the library may dispatch a set of rules that specify events to what the library needs to subscribe. When a system event is raised, this driver looks through its event database to find if there is any KAV SDK component that subscribed to this event. If the raised event is known to be of the interest of one of the KAV SDK components, the klflt driver dispatches the event to the subscribed component.
The klflt driver installs automatically as part of installation procedure of the klif driver and does not require any actions on your part.
klhk—[mandatory] Kaspersky Hook driverYou must install klhk driver when working with klif driver. The klif driver depends on the klhk driver and will not start if this driver is not running.
The hook driver, a kernel device driver that is loaded at kernel initialization and monitors activity in System Service Descriptor Table (SSDT). The driver prohibits kernel service functions from being tampered with malware by processing service functions before they are called from any code.
The klhk driver is used by the klif driver for monitoring system activity. The klif driver uses klhk as a provider for events of externals calls of service functions. The Kaspersky Hook driver adheres to Normal error control flow so that system startup should continue on failure. Information about the intercepted events provided by klhk driver may be used by drivers that implement their own filtering.
klbg—[optional] Boot guard driver that is loaded by the kl1 driver from the system registry at the operating system's boot stage.This driver is optional and is not required for proper initialization of KAV SDK. The boot guard driver provides enhanced protection for boot-time threats.
klelam—Kaspersky Early Launch Antimalware (ELAM) driver that helps facilitate interception of malicious drivers on the pre-boot stage and harden early-boot components being launched first by operating system kernel.Kaspersky ELAM driver requires Windows 8 or a more recent platform.
The klelam driver starts yet before boot-start drivers are initialized by operating system thus allowing to take under control every subsequent driver that starts after klelam driver. This early-launch driver handles malware removal tasks created by QSCAN component during disinfection procedure performed by Advanced Disinfection within the last scanning session before computer has been restarted.
Due to its nature, the klelam driver starts even before the klbg driver can be launched by kl1 driver and further strengthens early-boot security. This approach allows to eliminate complex malware—such as rootkits—much more efficiently.
kl1—Helper driver with boot type 0 (SERVICE_BOOT_START) that loads klbg driver from system registry and provides anti-rootkit protection implemented in ARK modules provided with anti-malware database.kltdf—interception kernel mode driver that intercepts network connections via TDI interface.This application level network driver provides application data for Web Monitor and Mail Monitor components when working on Windows Vista and older operating systems. The kltdf driver filters application data from the network traffic and passes it to the specific monitor component.
Unlike the obsolete kltdi driver that passed all intercepted data to the local proxy, the kltdf driver uses proxy-less approach where packet data is extracted from the intercepted traffic and is delivered straight to the specific monitoring component without using proxy. Once handled by the target monitoring component, allowed legitimate traffic data is reinjected by the driver into into the initial traffic flow.
klwtp—interception kernel mode driver that intercepts network connections via WFP interface.This application level network driver provides application data for Web Monitor and Mail Monitor components when working on Windows 7 and later operating systems. The klwtp driver filters application data from the network traffic and passes it to the specific monitor component.
Unlike the obsolete klwfp driver that passed all intercepted data to the local proxy, the klwtp driver uses proxy-less approach where packet data is extracted from the intercepted traffic and is redirected straight to the specific monitoring component without using proxy. Once handled by the target monitoring component, allowed legitimate traffic data is reinjected by the driver into into the initial traffic flow.
Installing drivers
The KAV SDK drivers are installed by using UDInstaller tool. The UDInstaller tool provides means to install and remove drivers developed by Kaspersky Lab for KAV SDK. The KAV SDK package contains two versions of UDInstaller for 32-bit and 64-bit flavors of Windows operating system.
Syntax
For x86 platforms:
udinstaller32 <--install|--uninstall|--cleanup> <driver> [--verbose]
The --verbose parameter allows you to turn on driver installation logging. Logs will be written to the udinstaller.log file located the same directory as the utility.
For x64 platforms:
udinstaller64 <--install|--uninstall|--cleanup> <driver> [--verbose]
The driver installation tool supports the following switch parameters and arguments.
Driver platform dependency
Parameter |
Argument |
Description |
|---|---|---|
|
|
Installs the driver specified in the argument in the operating system. Type: parameters |
|
|
Removes the driver specified in the argument from the operating system. Type: parameter |
|
N/A |
Removes helper cleaning drivers—such as KLBG—from the system. Only for Windows 10. Use this option when you remove KAV SDK from the system, as to uninstall the product, or as a part of the upgrade procedure. Run udinstaller with the |
|
N/A |
Specifies the driver to be installed or removed. This argument parameter depends on the previous parameter. The following values are supported for this argument parameter when used with
|
|
N/A |
Turns on verbose output to provide more details during the installation or removal of the driver. Type: switch parameter |
Examples
To install KLIF driver for the x86-64 platform with verbose logging, run the following command:
udinstaller64 --install klif --verbose
Platform dependency
Each platform requires specific KAV SDK driver stack listed in the following table.
Driver platform dependency
Platform |
Driver stack |
|---|---|
|
|
|
|
|
|
Component dependency
Each component of the KAV SDK requires specific KAV SDK driver stack listed in the following table. Because some components do not require presence of all KAV SDK drivers, you may save on installing some drivers based on the information in this table.
Component dependency
Platform |
Driver stack |
|---|---|
|
|
|
|
|
|
|
|
|
|
Driver installation order
The drivers should be installed strictly in the defined order. Depending on the version of KAV SDK components you are using, different drivers are used and so is the installation order.
Use the following setup order when integrating KAV SDK 8.5.x.x or later.
klelamThe pre-boot klelam driver, which is provided for Windows 8 platform, can be installed at any time later, although it is recommended that you install this driver in the first place.
klhkklifklbgWhen the installation of the klbg driver finishes, the utility adds the '0x00000000' error code to the log file indicating that installing the klbg driver has finished successfully and no reboot is necessary.
kl1kltdf/klwtpInstall klwtp driver if you are installing KAV SDK on Microsoft Windows 7 or later, otherwise install kltdf driver.
For more information about driver platform compatibility, see Platform dependency section.
After the driver is installed it starts automatically.
Make sure to check the return code, which is returned by the UDInstaller at the end of driver installation procedure. The following codes may be returned:
0xffffffff—the driver is successfully installed and started.The klelam and klbg drivers do not support returning this code upon their successful setup.
0x0—the driver is successfully installed, but could not be started. This code may be returned, for example, when the old version of the driver was already started by the time the UDinstaller started installing the new version of the driver. Restart the operating system to finish installation of the updated driver.WinError.h header file and can be retrieved on Windows platform by using the GetLastError WinAPI function.After a driver is removed, you need to restart the system to finish the operation.
The UDInstaller tool supports automatic updating of outdated and obsolete drivers with the latest drivers. During the update procedure, the UDinstaller tool automatically removes the old drivers, without you having to remove the drivers manually (see restrictions below), and installs the new. When necessary, you can still manually remove drivers before running driver update.
Make sure to always restart your operating system after UDinstaller has finished the driver setup procedure, unless this is your first install and you are installing drivers on a fresh operating system that did not have any Kaspersky drivers installed before then. For more details on installing drivers in various scenarios, see section "Typical usage scenarios".