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

Bugfix for ESC8 Check #227

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Conversation

brokenvhs
Copy link
Contributor

Expected Behavior:
In environments with multiple web enrollment endpoints, the ESC8 vulnerability is only shown for the specific endpoint it was identified on.

Observed Behavior:
In environments with multiple CAs with web enrollment endpoints, if one CA has a vulnerable endpoint and the others do not, ESC8 shows up for all of the endpoints checked after it in the Foreach-Object loop.

Reproducing:
Setup two CAs, one with a vulnerable CA and one with a non-vulnerable CA. The Non-vulnerable CA should be alphabetically after the vulnerable CA so that it ends up after the vulnerable CA in the looping of $ADCSObject

Cause:
Currently, the $CAEnrollmentEndpoint array is in the begin{} block in the Set-AdditionalCAProperty function. Objecs in the begin{} block are scoped for the entire function.

Moving the instantiation to the Foreach-Object loop where the Enrollment Endpoints in $ADCSObject are being iterated solves the issue. This creates a new, empty array for each CA rather than re-using the previous array. I believe this is the desired behavior.

…p iterating on the pKIEnrollmentService objects.
@jakehildreth
Copy link
Owner

Thanks for the PR! I'll take a look at this sometime soon, maybe tonight.

Copy link
Owner

@jakehildreth jakehildreth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@jakehildreth jakehildreth merged commit 667ff38 into jakehildreth:testing Jan 25, 2025
4 of 5 checks passed
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.

2 participants