Coder Social home page Coder Social logo

uefi-sysctl's Introduction

What?

This is a UEFI runtime driver that creates a back door (of sorts) into the Windows kernel space, accessible by any privileged user process. It provides the following primary features:

  • EPROCESS and PEB pointer lookup
  • remote process memory manipulation โ€” read/write (including writing to write-protected pages), allocate/free, lock/unlock, query, protect
  • arbitrary HANDLE duplication and closure
  • direct page table entry substitution

The whole thing is meant to be somewhat stealthy, so as to avoid detection by various anti-virus and anti-cheat software.

How?

The driver is manually loaded at boot time from the UEFI shell, whereupon it hooks the SetVariable runtime service by overriding its prologue with a RET-based detour. When the system loads, the driver remains hidden in firmware memory, and its functionality can be accessed by calling NtSetSystemEnvironmentValueEx with specific magic arguments, which triggers the hook and traps the calling (user-mode) thread in kernel space. A second user thread then dispatches commands to the first one by using shared memory and a combination of spinlocks and NtAlertThreadByThreadId/NtWaitForAlertByThreadId for synchronization.


Included in client/ is everything needed to use the driver from a userland C++ program, including a memory manager class and a (conveniently pointer-sized) remote memory pointer class that automatically reads, caches, and writes memory in another process.

uefi-sysctl's People

Contributors

ffsgfy 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.