All hands-on labs

Premium Hands-on labintermediatered teamAzure

Azure Key Vault Privilege Escalation

In this lab, you will enumerate an Azure environment to find a Key Vault using a legacy access-policy model, and leverage a management-plane permission to grant yourself access to a secret you shouldn't be able to see. Then, you'll use the recovered credential to read a restricted document and capture the flag. Finally, you'll learn how to prevent this PrivEsc attack.

  • 9 guided tasks
  • Capture the flag

Scenario

An app deployed by another team moved a sensitive storage credential into Key Vault last week to make compliance happy, but they used the wrong permission model. That means the deployment identity has far more control over the vault than it should.

Before we change anything, we need to know how bad it really is. Sign in as that deployment identity and demonstrate what an attacker would be able to do with this configuration. Then report back with recommendations on how to fix the issue.

- Your manager

What you will learn

  • Use the Azure CLI in your own terminal to enumerate a Key Vault and the roles assigned to your identity
  • Identify a weakness in the legacy access-policy permission model
  • Grant your own identity secret access and retrieve the stored credential
  • Use the recovered credential to read a restricted document and capture the flag
Hands-on lab

Azure Key Vault Privilege Escalation

Included in Cybr Premium.