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

Fix bug in extended right dacl check #177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nurfed1
Copy link
Contributor

@nurfed1 nurfed1 commented Oct 26, 2023

Hi,

I noticed a few bugs in the extended right checks used by ESC1.

First, the code would incorrectly report templates as vulnerable when any active directory right other than the ExtendedRight was set for the Certificate-Enrollment attribute.
E.g. I encountered an environment where for some unknown reason the domain users group had "WriteProperty" rights on the Certificate-Enrollment attribute. While this looked exiting, as far as I understand this is not exploitable.

Secondly, the code currently does not detect All-Extended-Rights. This check will never success because all-extended-rights is an ACCESS_ALLOWED ace and the code currently doesn't add those to the "extended_rights" list.

I know there are still other edge cases because deny aces are ignored, but this should at least fix some small issues.

I tested this PR against a number of different setups and as far as I can tell there are no issues. I have a few tests in powershell that I could share if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant