A forum for reverse engineering, OS internals and malware analysis 

Forum for discussion about kernel-mode development.
 #25028  by kerpow
 Sat Jan 24, 2015 10:39 am
Thought this may help some.

Contents of .bat Attachments;

CreateDriverCertificate - Creates a certificate that can be installed, verifying out driver in Test Mode
CreateDriverService - Creates a service from which we can load our driver
DeleteDriverService - Deletes the service we created that handles the load operation of our driver
DisableTestMode - Returns OS back to default mode when we no longer need to load our driver
EnableTestMode - Enables Test Mode so we can load our driver without PatchGuard issues
LoadDriver - Loads the driver via the service
SignDriver - Signs the driver

Guide

+ Assuming your OS is not in Test Mode currently!
+ Move your driver to the same folder where the .bat files are located!
  • * Open cmd prompt as Administrator and guide to the folder containing the above files
    * type "EnableTestMode.bat" (Without quotes) and reboot your computer when you receive the success notification
After Reboot you should see Test Mode in the bottom right of your Desktop
  • * Open cmd prompt as Administrator and guide to the folder containing the above files
    * type "CreateCertificate.bat" (Without quotes) and you will see a certificate is created
    * Double-click the certificate and install this manually to TrustedRootCertificationAuthorities by following prompts
You should receive a notification stating the certificate was created successfully
  • * type "SignDriver.bat" (Without quotes) and you should see a message confirming success
    * type "CreateDriverService.bat" (Without quotes) and this will create the service to load our driver from
    * type "LoadDriver.bat" (Without quotes) and the driver should show STATE 4 = RUNNING
You have succesfully loaded your driver

Each time you reboot you only need to execute "LoadDriver.bat" (Without quotes) as the service and certificate will remain stored so the process becomes very simple. If you re-compile your driver or change names this process will need to reset.

You can amend the .bat files so they become unique to you, this should be straight forward.

Enjoy!
Attachments
Files
(470.2 KiB) Downloaded 75 times