Skip to content

dig-sec/kernel_driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Build the Project

Kernel Driver Project

This project is a kernel driver that provides functionality for [insert purpose here].

Prerequisites

Before building and installing the driver, make sure you have the following:

Set up the Environment

To set up the environment variables for the WDK, follow these steps:

call "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\setenv.bat" x64

Build the Project

To build the project, run the following command:

cargo build --release

Generate a signing certificate

To create a signing certificate for your application, you can use the following steps:

  1. Open a command prompt and navigate to the directory where you want to generate the certificate.

  2. Run the following command to generate a self-signed certificate:

makecert -r -pe -n "CN=Your Certificate Name" -ss My -sr LocalMachine -a sha256 -sky signature -cy end -sv MyCertificate.pvk MyCertificate.cer
This command will generate a private key file (`MyCertificate.pvk`) and a certificate file (`MyCertificate.cer`).
  1. Import the certificate into the certificate store by running the following command:
certutil -addstore My MyCertificate.cer
This will import the certificate into the "Personal" certificate store.
  1. Export the certificate with the private key by running the following command:
pvk2pfx -pvk MyCertificate.pvk -spc MyCertificate.cer -pfx MyCertificate.pfx
This will generate a PFX file (`MyCertificate.pfx`) that contains both the private key and the certificate.
  1. You can now use the generated certificate (MyCertificate.pfx) to sign your driver using the signtool utility as mentioned in the previous section.

Remember to keep the private key file (MyCertificate.pvk) and the PFX file (MyCertificate.pfx) secure.

For more information on certificate generation and management, refer to the Microsoft documentation.

Sign the Driver

To install the driver on modern Windows systems, it must be signed. Follow these steps:

  1. Obtain a code-signing certificate.
  2. Use the signtool utility provided by the WDK to sign your driver:
signtool sign /v /s My /n "Your Certificate Name" /t http://timestamp.verisign.com/scripts/timestamp.dll path\to\your\driver.sys

Install the Driver

To install the driver, follow these steps:

  1. Use sc to create a new service for your driver:
sc create kernel_driver type= kernel binPath= path\to\your\driver.sys
  1. Start the driver service:
sc start kernel_driver

For more information, refer to the WDK documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages