For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Component
Abuse Potential

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

  1. Open Azure Portal -> Automation Accounts.

  2. Select the target account -> Access control (IAM) -> Role assignments.

  3. Review Automation Contributor assignments.

  4. Check Identity blade for managed identity configuration.

Exploitation

Method 1: Create and Execute Malicious Runbook

Create a runbook that steals the managed identity token

Method 2: Extract Stored Credentials

Extract Stored Credentials

Method 3: Access Encrypted Variables

Access Encrypted Variables

Mitigation

  1. Minimize Automation Contributor assignments

    • Grant only to identities that need to manage automation.

    • Use Automation Operator for running existing runbooks without modification rights.

  2. Apply least privilege to Automation Account identities

    • Managed identities and Run As accounts should have minimal required permissions.

    • Avoid subscription-wide Contributor/Owner.

  3. Disable Run As accounts

    • Migrate to managed identities (Run As accounts are being deprecated).

  4. Enable diagnostic logging

    • Send Activity Log and Job Logs to Log Analytics.

  5. Use Private Endpoints

    • Restrict network access to Automation Accounts.

Detection

Use the Azure Portal:

  1. Open Azure Portal -> Automation Accounts -> select the target account.

  2. Go to Jobs to review all runbook executions, including start time, status, and initiator.

  3. Select a job -> All Logs to see detailed output and errors.

  4. Go to Activity log to review control plane operations (runbook creation, modification, publication).

  5. Filter by Operation name such as:

    • Create or Update an Azure Automation Runbook

    • Publish an Azure Automation Runbook

    • Create an Azure Automation Job

  6. Check Process Automation -> Runbooks for recently created or modified runbooks.

  7. Review Shared Resources -> Credentials and Variables for unauthorized additions.

References

Last updated

Was this helpful?