Skip to content

Using CVE-2021-40449 to manual map kernel mode driver

License

Notifications You must be signed in to change notification settings

FarmEquipment69/voidmap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

voidmap

A very simple driver manual mapper that exploits CVE-2021-40449 to get arbitrary function executed at a given address with a single given argument. It's based on an expoit PoC CallbackHell. Tested on Windows 10 Pro For Workstations 1809 17763.379 (64-bit), but realistically anything around that time should be supported.

It does the following:

  • Disables SMEP (and possibly SMAP) by rewriting cr4 register value
  • Jumps into usermode code that manual maps the desired driver
  • Enables SMEP (and possibly SMAP) again

There are two main problems with this approach:

  • Manual mapped driver will be in a pool allocated by ExAllocatePool. If you want to use this for anything more serious you should consider finding a better way of memory allocation so it can't be dumped so easily.
  • There is no easy way to read the original cr4 value which means that I had to hardcode the value that was there on my system. While it should be the same for most modern CPUs, you should still double-check that the value is correct.

Video:

IMAGE ALT TEXT HERE

About

Using CVE-2021-40449 to manual map kernel mode driver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%