AZ_AUTOMATION_CONTRIBUTOR
Summary
Forestall ACL Alias
AZ_AUTOMATION_CONTRIBUTOR
Azure Alias
Automation Contributor (Azure RBAC)
Affected Object Types
Automation Accounts
Exploitation Certainty
Certain
Azure RBAC Role
Automation Contributor (f353d9bd-d4a6-484e-a77a-8050b599b867) - manage Automation resources except RunAs accounts
Custom Role Actions:
Microsoft.Automation/automationAccounts/*
Description
AZ_AUTOMATION_CONTRIBUTOR represents the Azure RBAC Automation Contributor role assignment. This role grants full control over Azure Automation Accounts, enabling:
Create/modify runbooks - write arbitrary PowerShell or Python code.
Publish and execute runbooks - run code under the Automation Account's identity.
Access credentials and variables - read stored credentials and encrypted variables.
Manage schedules and webhooks - configure automated execution.
The key abuse vector is that runbooks execute under the Automation Account's managed identity or Run As account, which often has:
Contributor or Owner at subscription scope for management operations.
Access to Key Vaults, VMs, and other resources.
Network connectivity to internal resources.
Runbooks
Execute arbitrary code as Automation identity
Credentials
Extract stored usernames/passwords
Variables
Access encrypted configuration data
Run As Certificate
Impersonate service principal
Managed Identity
Access Azure resources
Identification
PowerShell (Az Module)
Azure CLI
Azure Portal
Open Azure Portal -> Automation Accounts.
Select the target account -> Access control (IAM) -> Role assignments.
Review Automation Contributor assignments.
Check Identity blade for managed identity configuration.
Exploitation
Method 1: Create and Execute Malicious Runbook

Method 2: Extract Stored Credentials

Method 3: Access Encrypted Variables

Mitigation
Minimize Automation Contributor assignments
Grant only to identities that need to manage automation.
Use Automation Operator for running existing runbooks without modification rights.
Apply least privilege to Automation Account identities
Managed identities and Run As accounts should have minimal required permissions.
Avoid subscription-wide Contributor/Owner.
Disable Run As accounts
Migrate to managed identities (Run As accounts are being deprecated).
Enable diagnostic logging
Send Activity Log and Job Logs to Log Analytics.
Use Private Endpoints
Restrict network access to Automation Accounts.
Detection
Use the Azure Portal:
Open Azure Portal -> Automation Accounts -> select the target account.
Go to Jobs to review all runbook executions, including start time, status, and initiator.
Select a job -> All Logs to see detailed output and errors.
Go to Activity log to review control plane operations (runbook creation, modification, publication).
Filter by Operation name such as:
Create or Update an Azure Automation RunbookPublish an Azure Automation RunbookCreate an Azure Automation Job
Check Process Automation -> Runbooks for recently created or modified runbooks.
Review Shared Resources -> Credentials and Variables for unauthorized additions.
References
Last updated
Was this helpful?