Skip to content
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

DSE bypass not working on 20H2 after KB5003173 update #6

Closed
mihaly044 opened this issue May 13, 2021 · 9 comments
Closed

DSE bypass not working on 20H2 after KB5003173 update #6

mihaly044 opened this issue May 13, 2021 · 9 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@mihaly044
Copy link

mihaly044 commented May 13, 2021

The latest Windows update for 20H2 that is KB5003173, breaks the functionality of the DSE bypass.

Steps to reproduce:

  • Upgrade your OS to the newest version available
  • Run KDU as follows: kdu.exe -dse 0
  • Observe the unchanged code integrity options value

KDU will report success in despite of the code integrity options value hasn't been altered. Hence, NtLoadDriver will report STATUS_INVALID_IMAGE_HASH.
I have also checked it using NtQuerySystemInformation(SystemCodeIntegrityInformation... and here's the output of that:

CODEINTEGRITY_OPTION_TESTSIGN=FALSE
CODEINTEGRITY_OPTION_UMCI_ENABLED=FALSE
CODEINTEGRITY_OPTION_UMCI_AUDITMODE_ENABLED=FALSE
CODEINTEGRITY_OPTION_UMCI_EXCLUSIONPATHS_ENABLED=FALSE
CODEINTEGRITY_OPTION_TEST_BUILD=FALSE
CODEINTEGRITY_OPTION_PREPRODUCTION_BUILD=FALSE
CODEINTEGRITY_OPTION_DEBUGMODE_ENABLED=FALSE
CODEINTEGRITY_OPTION_FLIGHT_BUILD=FALSE
CODEINTEGRITY_OPTION_FLIGHTING_ENABLED=FALSE
CODEINTEGRITY_OPTION_HVCI_KMCI_ENABLED=FALSE
CODEINTEGRITY_OPTION_HVCI_KMCI_AUDITMODE_ENABLED=FALSE
CODEINTEGRITY_OPTION_HVCI_KMCI_STRICTMODE_ENABLED=FALSE
CODEINTEGRITY_OPTION_HVCI_IUM_ENABLED=TRUE

CodeIntegrityOptions=0x2001

I suspect the memory location of the target variable has changed.

@mihaly044 mihaly044 changed the title DSE bypass not working on 2H2 after KB5003173 update DSE bypass not working on 20H2 after KB5003173 update May 13, 2021
@hfiref0x
Copy link
Owner

Yes, CI.DLL now uses Microsoft WIL extensively. It numerous calls at CiInitialize ruins previous algorithm of CipInitialize lookup.

ci

@mihaly044
Copy link
Author

Thanks, @hfiref0x !
I think I have got it working thanks to your accurate information.
I'll make a PR later today after I'm done testing.

@hfiref0x
Copy link
Owner

hfiref0x commented May 14, 2021

Thanks, but no need. I'm planning to rewrite this part completely.

@hfiref0x
Copy link
Owner

hfiref0x commented May 14, 2021

The code for DSE manipulations are from DSEFix in mostly unmodified state. It turns out it also has some very ancient bug which one I likely added when I was moving this repository to the github from kernelmode.info. This also will be fixed.

@hfiref0x hfiref0x added bug Something isn't working enhancement New feature or request labels May 14, 2021
@hfiref0x hfiref0x self-assigned this May 14, 2021
hfiref0x added a commit that referenced this issue May 14, 2021
Address issue #6
@Narumiii
Copy link

I can confirm after the commit it still dones't work

@Narumiii
Copy link

image

@hfiref0x
Copy link
Owner

hfiref0x commented May 15, 2021

There has been no commits in master branch. Try exe from dev111 instead (https://github.com/hfiref0x/KDU/blob/v111/Bin/kdu.exe). If it still fails to work then upload your Windows\system32\CI.DLL somewhere (not on github) and post here a link to it.

hfiref0x added a commit that referenced this issue May 15, 2021
Address issue #6
@Narumiii
Copy link

Narumiii commented May 15, 2021

Sorry my fault you are right these version works, anyways if needed here is my CI.dll, by the way many thanks to you for your effort and work on kernel research https://anonfiles.com/R5R9r2w3u6/ci_dll

@hfiref0x
Copy link
Owner

Thanks, I've checked your file. KDU from dev111 should work fine with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants