The Windows Driver Kit (WDK) 8

 

 

 

 

 

Drivers and Services

 

Installing and executing a driver is quite a bit different than running a "normal" program from the command line. There is no concept of running a new process because a driver is a kernel module which lives permanently inside the system. Two steps are required to get a driver installed:

 

  1. Registering the driver as a system service, and then
  2. Starting the driver.

 

This is usually the area that confuses people who are not used to working with drivers. A driver is treated by Windows as a regular service which can be started and stopped just like any other service. The Windows component that controls all this is called the Service Control Manager (SCM) which you have learned in the other topic (Windows Service). This component exposes an API which can be used to register, unregister, and start & stop drivers and regular Win32 services. Actually, registering a driver and starting it can be a little confusing if you've not done it before. However for beginners, there are several tools that can be used to automate these processes. For example:

  1. osrloader - osrloadervxx

  2. Windows RootKit - InstDrv, an advanced loader

 

This handy tool allows you to register, start, stop and unregister drivers, all from a single GUI. The following Figure shows InstDrv tool

 

WDK registering and installing Windows device driver: Using InstDrv

 

In this tutorial we will use osrloader version 3.0. Launch the executable.

 

WDK registering and installing Windows device driver: The osrloader

 

 

 

WDK registering and installing Windows device driver: Unblocking the unsigned Windows application

 

Click the Browse button and set the path to the hello.sys file.

 

WDK registering and installing Windows device driver: Running the osrloader

 

 

WDK registering and installing Windows device driver, osrloader: selecting the Windows driver file

 

 

 

 

< Windows Driver Kit (WDK) 7 | Windows Driver Kit (WDK) Programming | Win32 Programming | Windows Driver Kit (WDK) 9 >