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

Azure - AzAddSecret to ServicePrincipals is often false positive #681

Open
EnriqueHernandezL opened this issue Jun 23, 2023 · 0 comments
Open
Labels

Comments

@EnriqueHernandezL
Copy link

Describe the bug
There are a bunch of ServicePrincipals in all Azure Tenants that correspond to AppRegistrations that live in Tenants of Microsoft. These ServicePrincipals could, according to Bloodhound, be abused for a standard Application Admin - to - Global Admin privesc. This is however not true, since it is impossible to authenticate as a ServicePrincipal if its AppRegistration lives in a foreign tenant.

The situation gets specially bad when someone uses PIM for Subscription IAM-Roles. In this case Azure gives the PIM ServicePrincipal a "User Access Administrator" Role in that subscription, and Bloodhound thinks that the Application Admins can own the Subscription now, which is not the case.

To Reproduce
Steps to reproduce the behavior:

  1. Pick a ServicePrincipal of a Microsoft App (such as MS Graph, PIM, Azure Portal, etc) and give it a Credential (password or cert). It works, but you can not use it to authenticate as the SP.
  2. Collect the data for Bloodhound and search for Paths from Application-Admin to the SP. Bloodhound thinks that the Application Admin can authenticate as the SP, just like the ones that correspond to AppRegistration in the analysed Tenant (for which that works).

Expected behavior
Bloodhound should not show the AzAddSecret Edges to ServicePrincipals whose respective AppRegs are not in the analysed tenant.

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

No branches or pull requests

1 participant