Giter Club home page Giter Club logo

hsevd-arbitraryoverwrite's Introduction

    __  __           __   _____           
   / / / /___ ______/ /__/ ___/__  _______
  / /_/ / __ `/ ___/ //_/\__ \/ / / / ___/
 / __  / /_/ / /__/ ,<  ___/ / /_/ (__  ) 
/_/ /_/\__,_/\___/_/|_|/____/\__, /____/  
                            /____/        
			Extreme Vulnerable Driver
							Exploits

HackSys Extreme Vulnerable Driver - ArbitraryOverwrite Exploit

Arbitrary Overwrite exploit; which exploits a vulnerable function within the HEVD Kernel driver and let us overwrite arbitrary data within Kernelland.

How does this exploit work:

  • First allocate a RWX memory page in which we host our Shellcode.
  • Copy our Token Stealing Shellcode into the executable memory page and create a new pointer (double pointer) which points to our Payload address. This is necessary because the vulnerable function dereferences a double pointer.
  • Get a Handle to the HacksysExtremeVulnerableDriver device.
  • Now we need to find the memory address of the HalDispatchTable (+ 4 Bytes) in Kernelland which we want to overwrite with the double pointer to our Payload.
  • To do this, we use the undocumented NtQuerySystemInformation() function within ntdll.dll (Native API) to find the Base address of the running kernel image and load the same kernel image in Userland, so we can calculate the address of the HalDispatchTable.
  • Our write target in Kernelland will be the address of nt!HalDispatchTable+4, which will be called when we run the NtQueryIntervalProfile() function from Userland (KeQueryIntervalProfile() syscall in Kernelland).
  • Now that we have both addresses, we can construct a Arbitrary Overwrite buffer and use the DeviceIoControl() function with the IOCTL code of our device/function to send the buffer to the driver in Kernelspace.
  • Then we run the NtQueryIntervalProfile() function to trigger Payload execution in Kernelland and let the Shellcode replace the token handle of the exploit process with the token handle of PID 4.
  • Finally we create a new cmd.exe process using this System Token which pops us a System shell ;)

Runs on:

This exploits only works on Windows 7 x86 SP1 (Version 6.1.7601).

Compile Exploit:

This project is written in C and can be compiled within Visual Studio.

Load Vulnerable Driver:

The HEVD driver can be downloaded from the HackSys Team Github page and loaded with the OSR Driver loader utility.

hsevd-arbitraryoverwrite's People

Contributors

cn33liz avatar

Watchers

James Cloos avatar Kurt De Greeff 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.