Git Product home page Git Product logo

uefivarmonitor's Introduction

UefiVarMonitor

The sample runtime DXE driver (UEFI driver) monitoring access to the UEFI variables by hooking the runtime service table in C and Rust.

This project was developed to provide a small sample of a runtime driver.

UefiVarMonitor uefi-var-monitor

Rust implementation was made solely for author's learning.

Projects Overview

  • UefiVarMonitorDxe

    The UEFI runtime driver that hooks GetVariable and SetVariable runtime services, and logs the use of them into serial output. Written in less than 300 lines of C code.

  • uefi-var-monitor

    Nearly equivalent implementation of UefiVarMonitorDxe in Rust. Unsafe, unsafe everywhere.

  • UefiVarMonitorExDxe

    The enhanced version of UefiVarMonitorDxe allowing a Windows driver to register an inline callback of the above runtime services. This can also be used to alter parameters and block those calls.

  • UefiVarMonitorExClient

    The sample Windows driver registering a callback with UefiVarMonitorExDxe.

Building

  • UefiVarMonitorDxe and UefiVarMonitorExDxe

    1. Set up edk2 build environment
    2. Copy UefiVarMonitorPkg as edk2\UefiVarMonitorPkg
    3. On the edk2 build command prompt, run the below command:
      > edksetup.bat
      > build -t VS2019 -a X64 -b NOOPT -p UefiVarMonitorPkg\UefiVarMonitorPkg.dsc -D DEBUG_ON_SERIAL_PORT
      
      Or on Linux or WSL,
      $ . edksetup.sh
      $ build -t GCC5 -a X64 -b NOOPT -p UefiVarMonitorPkg/UefiVarMonitorPkg.dsc -D DEBUG_ON_SERIAL_PORT
      
  • uefi-var-monitor

    1. Install the nightly rust compiler. Below is an example on Linux, but it is largely the same on Windows.
      $ sudo snap install rustup --classic
      $ rustup default nightly
      $ rustup component add rust-src
      
    2. Build the project.
      $ cd uefi-var-monitor
      $ cargo build
      
  • UefiVarMonitorExClient

    This is a standard Windows driver. VS2019 and WDK 10.0.18362 or later are required.

Credits

  • Thank you @x1tan for modernalized xcargo-less build.

uefivarmonitor's People

Contributors

fengjixuchui avatar tandasat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.