Test ABAC conditions for bypasses

AuthorizationExploitation

Written with a model's help from “Modern Adventures in Azure Privilege Escalation” by Thomas Elling on NetSPI Technical Blog. Read the writeup before relying on it.

When testing Azure roles with Attribute Based Access Control (ABAC) conditions, look for conditions that constrain delegation of privileged permissions. Check if the condition only matches on specific actions, such as Microsoft.Authorization/roleAssignments/write, and if it uses comparison operators like GuidNotEquals to block certain roles. Test if a custom role can be created with arbitrary permissions, such as * or Microsoft.Authorization/roleAssignments/write, and if the constrained role can be used to assign the custom role to a principal, effectively bypassing the ABAC condition. This can be done by sending a request to create a custom role with the desired permissions and then using the constrained role to assign the custom role to a principal. If the custom role is assigned successfully, it may indicate a bypass of the ABAC condition.

Follow #abac or #azure for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.