Azure AD Privileged Role Assigned to Service Principal
Detection of privileged role assignments to service principals in Azure AD, which can lead to unauthorized access and privilege escalation within Azure environments.
Triage facts
Revision 2- Evidence
- Unknown
- Severity
- High
- Sources
- 2 public sources
- Freshness
- Revision 2Jan 3, 12:00 UTC
- Detection
- 3 rules
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
This brief focuses on the detection of privileged role assignments to service principals within Azure Active Directory (AD). The activity is significant because attackers can exploit service principals with elevated permissions to gain unauthorized access to Azure resources. This can lead to privilege escalation, data compromise, and disruption of critical infrastructure. This activity is detected using Azure AD AuditLogs. Defenders should monitor this behavior to prevent abuse of service principals for malicious purposes. The described activity aligns with tactics observed by multiple threat actors, including NOBELIUM Group and Scattered Lapsus$ Hunters, who are known to target cloud environments for privilege escalation.
Attack Chain
- The attacker gains initial access to an Azure AD tenant, potentially through compromised credentials or other means.
- The attacker identifies a service principal within the Azure AD tenant that can be leveraged for privilege escalation.
- The attacker uses an account with sufficient privileges to assign a privileged role to the identified service principal.
- The "Add member to role" operation is executed, modifying the service principal's roles in Azure AD.
- The attacker leverages the service principal with the newly assigned privileged role to access sensitive Azure resources.
- The service principal authenticates to Azure services using its assigned credentials or certificates.
- The service principal performs actions allowed by the privileged role, such as accessing sensitive data, modifying configurations, or creating new resources.
- The attacker maintains persistence by ensuring the service principal retains its privileged role.
Impact
Successful exploitation allows attackers to gain elevated access to Azure resources, potentially leading to the compromise of sensitive data, disruption of critical infrastructure, and unauthorized modification of Azure configurations. This can result in significant financial losses, reputational damage, and legal liabilities for affected organizations. The number of affected victims and sectors can vary depending on the attacker's objectives and the scope of the compromised Azure environment.
Recommendation
- Deploy the provided Sigma rules to your SIEM to detect anomalous role assignments to service principals (see rule: "Azure AD Privileged Role Assigned to Service Principal").
- Review and audit existing role assignments for service principals in Azure AD to identify and remediate any unnecessary or excessive privileges.
- Implement multi-factor authentication (MFA) for all user accounts, including those used to manage Azure AD, to prevent unauthorized access and privilege escalation.
- Monitor Azure AD AuditLogs for suspicious activity related to service principal management and role assignments (data_source: Azure Active Directory Add member to role).
- Investigate any alerts generated by the Sigma rule and determine whether the role assignment was legitimate or malicious.
- Filter as needed based on known legitimate administrative tasks (see: known_false_positives).
Detection coverage 3
Azure AD Privileged Role Assigned to Service Principal
highDetects the assignment of privileged roles to service principals in Azure AD.
Azure AD Service Principal Role Assignment by Unusual User
mediumDetects Azure AD Service Principal role assignments performed by users who do not typically perform such actions.
Azure AD Privileged Role Assigned to Service Principal - High Volume
mediumDetects a high volume of privileged role assignments to service principals in a short period, potentially indicating malicious activity.
Detection queries are available on the platform. Get full rules →