New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Exploit For CVE-2021-21551 (Dell DBUtil_2_3 IOCTL) #15190
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is still a work in progress but the initial requirements are falling into place.
smcintyre-r7
added
docs
module
rn-modules
release notes for new or majorly enhanced modules
labels
May 12, 2021
wvu
reviewed
May 12, 2021
Windows 10x64_2004
Windows 2016
Windows 7
|
Also, since I saw there were changes to 2021_1732, I verified that still works:
|
Release NotesNew module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an exploit for CVE-2021-21551 which is an IOCTL that is provided by the DBUtil_2_3.sys driver distributed by Dell that can be abused to perform kernel-mode memory read and write operations. This uses the same token upgrade technique as the exploit I wrote for CVE-2021-1732 so I moved some of the code into a new include directory so the boilerplate can be reduced in the future (defining NTDLL functions all the time is tedious).
As I understand it if the driver is present and loaded the system is vulnerable. The module will attempt to open a handle to it to verify that it's vulnerable. The exploit however needs to be run from within at least a Medium integrity process in order to use
NtQuerySystemInformation
to leak the address ofnt!_EPROCESS
. The user does not need to have any permissions however, this just can't be used as a sandbox escape for that reason. Additionally, due to the token upgrade technique, offsets need to be known for the specific version of Windows that is being targeted. Currently, the same values are being used from CVE-2021-1732 which I tested on every version of Windows between 1803 and 20H2 inclusive. In a future revision (or depending on the time to land this one) I plan on adding the necessary offsets for additional versions of Windows. Update: I've added the offsets for alot more targets, they're all listed in the module docs. I pulled all of the offsets from the Vergilius project and validated most of them through exploitation. Server 2016 and Server 2019 share their build numbers and_EPROCESS
structure definition with their Windows 10 counterparts.In my experience with this vulnerability, it's pretty reliable however it is kernel mode so it's possible it could induce a crash. Notably if a read or write address is invalid, the system will immediately BSOD.
Verification
List the steps needed to make sure this thing works
use exploit/windows/local/cve_2021_21551_dbutil_memmove
SESSION
andPAYLOAD
optionsrun
Demo