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

AZ_GET_CERTIFICATES

Summary

Forestall ACL Alias

AZ_GET_CERTIFICATES

Azure Alias

Get Certificates (Key Vault Data Plane)

Affected Object Types

Key Vaults

Exploitation Certainty

Certain

Permission

Key Vault data-plane permission certificates/get - either via Key Vault access policy or Azure RBAC role Key Vault Certificates User or Key Vault Certificate User

Description

AZ_GET_CERTIFICATES represents the ability to read certificates from an Azure Key Vault. This is a data-plane permission that allows retrieval of certificate objects (and their associated private keys, if exportable) stored in the vault.

Key Vault certificates are used for:

  • Service principal authentication - certificates used as credentials for Entra ID applications.

  • TLS/SSL certificates - for web apps, API gateways, and other services.

  • Code signing certificates.

  • Encryption certificates - S/MIME, document encryption.

The most dangerous scenario is when certificates are used as service principal credentials. Exporting such a certificate allows an attacker to authenticate as the service principal and inherit all its permissions, including potentially privileged API permissions or Azure RBAC roles.

Identification

PowerShell (Az Module)

Azure Portal

  1. Open Azure Portal -> navigate to the target Key Vault.

  2. Go to Access policies -> review policies that include Get under Certificate permissions.

  3. Alternatively, go to Access control (IAM) -> review assignments for certificate-related roles.

Exploitation

Step 1 - Grant Yourself Certificate Access (as Key Vault Contributor)

Step 2 - Read and Export Certificates

Read Key Vault certificates with PowerShell

Via PowerZure

  • Get-AzureKeyVaultContent

  • Export-AzureKeyVaultContent

Mitigation

  1. Restrict certificate access policies

    • Go to Azure Portal -> target Key Vault -> Access policies.

    • Remove get permission from any principal that does not need to read certificates.

  2. Mark certificates as non-exportable

    • When creating certificates, set the private key as not exportable to prevent extraction.

  3. Switch to Azure RBAC model

    • Use granular RBAC roles for certificate access control.

  4. Use managed identities instead of certificates

    • Prefer managed identities over certificate-based service principal authentication where possible.

  5. Enable diagnostic logging

    • Go to Key Vault -> Diagnostic settings -> enable AuditEvent logging.

Detection

Use the Azure Portal:

  1. Open Azure Portal -> target Key Vault.

  2. Open Monitoring -> Metrics and review certificate operation activity for unusual spikes in CertificateGet, CertificateList, or related secret retrieval operations.

  3. Open Activity log and review management-plane changes to access policies, role assignments, or vault configuration around the same timeframe.

  4. Open Diagnostic settings and confirm AuditEvent logging is enabled for future investigations.

  5. Open Access control (IAM) and Access policies to review identities with certificate read permissions.

References

Last updated

Was this helpful?