Fix container gMSA creation by authorizing CCG Virtual Accounts#51
Merged
winkingturtle-vmw merged 1 commit intodevelopfrom May 4, 2026
Merged
Fix container gMSA creation by authorizing CCG Virtual Accounts#51winkingturtle-vmw merged 1 commit intodevelopfrom
winkingturtle-vmw merged 1 commit intodevelopfrom
Conversation
This commit consolidates and cleans up the previous fixes for TNZ-97051 and TNZ-97067. Reasoning: 1. TNZ-97051 addressed a Local Privilege Escalation (LPE) by restricting COM+ activation to specific accounts, but TNZ-97067 incorrectly assumed that `ccg.exe` invokes the plugin strictly as `NT AUTHORITY\SYSTEM`. 2. In reality, CCG impersonates the dynamically generated CCG Virtual Account for the container (e.g., `CCG Virtual Account Domain\CCG Account X` with SID `S-1-5-95-X`). 3. Since dynamically generated virtual accounts cannot be added to static COM+ roles at install time, we must rely on a built-in group they inherit. All Container Virtual Accounts inherently possess the `NT AUTHORITY\SERVICE` (S-1-5-6) token. 4. Microsoft's standard implementation for Azure Key Vault gMSA plugins explicitly authorizes both `NT AUTHORITY\SYSTEM` and `NT AUTHORITY\SERVICE`. Security Management: - We ensure `ApplicationAccessChecksEnabled` is set to `$true` on the COM+ app so DCOM enforces these restrictions. - We restrict activation exclusively to the "SYSTEM" role, which is populated ONLY with `NT AUTHORITY\SYSTEM` and `NT AUTHORITY\SERVICE`. - This fully remediates the LPE vulnerability because standard unprivileged users are explicitly denied DCOM access, while still allowing the dynamically generated CCG Virtual Accounts to fetch credentials and successfully spin up containers. - The unnecessary attempts to assign the unresolvable `NT SERVICE\ccg` to a "CCG" role have been removed. Co-authored-by: Cursor <cursoragent@cursor.com>
ameowlia
approved these changes
May 4, 2026
This file contains hidden or 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
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.
Summary
This commit consolidates and cleans up the previous fixes for TNZ-97051 and TNZ-97067.
Reasoning:
ccg.exeinvokes the plugin strictly asNT AUTHORITY\SYSTEM.CCG Virtual Account Domain\CCG Account Xwith SIDS-1-5-95-X).NT AUTHORITY\SERVICE(S-1-5-6) token.NT AUTHORITY\SYSTEMandNT AUTHORITY\SERVICE.Security Management:
ApplicationAccessChecksEnabledis set to$trueon the COM+ app so DCOM enforces these restrictions.NT AUTHORITY\SYSTEMandNT AUTHORITY\SERVICE.NT SERVICE\ccgto a "CCG" role have been removed.Backward Compatibility
Breaking Change? No