GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mathisvickie/CVE-2021-21551: arbitrary kernel read/write in dbutil_2_3.sys, Proof of Concept Local Privilege Escalation to nt authority/system

This repository was archived by the owner on Nov 17, 2021. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
CVE-2021-21551.c
CVE-2021-21551.c
 
 
README.md
README.md
 
 
dbutil_2_3.c
dbutil_2_3.c
 
 
dbutil_2_3.sys
dbutil_2_3.sys
 
 
pic.png
pic.png
 
 

Repository files navigation

CVE-2021-21551

Simple PoC for exploiting CVE-2021-21551 for LPE by spawning system cmd.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21551

An issue was discovered in signed dell windows driver (dbutil_2_3.sys) which may lead to compromisation of whole local system. Driver's ioctl dispatch routine lacks of validation of user supplied buffer.

IOCTL

Anyone can create handle and issue ioctl requests to these ioctl codes which break windows security model:

  • 0x9b0c1f40 - arbitrary physical memory read
  • 0x9b0c1f44 - arbitrary physical memory write
  • 0x9b0c1ec4 - arbitrary kernel memory read
  • 0x9b0c1ec8 - arbitrary kernel memory write
  • 0x9b0c1ecc - controlled parameters to MmFreeContiguousMemorySpecifyCache call
  • 0x9b0c1ec0 - controlled parameters to MmAllocateContiguousMemorySpecifyCache call
  • 0x9b0c1f00 & 0x9b0c1f8c & 0x9b0c1f88 & 0x9b0c1f84 & 0x9b0c1f80 - access to some ports

Compiling PoC

This PoC exploits 0x9b0c1ec4/0x9b0c1ec8 ioctl codes for arbitrary kernel memory read/write respectively. Firstly it locates PsInitialSystemProcess in kernel to get system token and then it writes this token to current process EPROCESS struct. Before compiling update your EPROCESS offsets to avoid BSOD using https://www.vergiliusproject.com/

DWORD EPROCESS_ActiveProcessLinks = 0x2e8;
DWORD EPROCESS_Token = 0x348;

Use visual studio to compile (requires windows header). Ntdll SDK header: https://github.com/mathisvickie/segy-software/blob/main/external/ntdll.h

Running

Tested on:

  • Windows 8
  • Windows 10 2004
  • Windows 10 20H2

Successful exploit will run system cmd. If you get bugcheck PAGE_FAULT_IN_NONPAGED_AREA then the offsets are probably incorrect. Sample output: 404

About

arbitrary kernel read/write in dbutil_2_3.sys, Proof of Concept Local Privilege Escalation to nt authority/system

Topics

cvecve-2021-21551dbutildelldell-driverdriverexploitkernelkernel-driverlocal-privilege-escalationpocprivilege-escalationproof-of-conceptwindows

Resources

Readme
Activity

Stars

59 stars

Watchers

1 watching

Forks

14 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.