Skip to content

Windows driver to execute arbitrary usermode code (essentially same vulnerability as capcom.sys)

License

Notifications You must be signed in to change notification settings

online-9/ShellcodeDriver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShellcodeDriver

Windows driver to execute arbitrary usermode code (essentially same vulnerability as capcom.sys)

Functionality

The driver takes an ioctl with a pointer to a user-land function (or shellcode). It disables SMEP, calls the function and passes a pointer to the MmGetSystemRoutineAddress as an argument.

https://github.com/zerosum0x0/ShellcodeDriver/blob/master/shellcodedriver/shellcodedriver.c#L80

Exploitation

If you want to get SYSTEM, you can use the following functions to copy a system processes token to your current process. The whole point of MmGetSystemRoutineAddress is these function pointers are simple to obtain.

  • PsGetCurrentProcessId
  • PsLookupProcessByProcessId
  • ObDereferenceObject
  • PsReferencePrimaryToken
  • PsDereferencePrimaryToken

About

Windows driver to execute arbitrary usermode code (essentially same vulnerability as capcom.sys)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 87.6%
  • C++ 12.4%