Skip to content

Spare Key⚓︎

Difficulty:
Direct link: Spare Key

Objective⚓︎

Request

Help Goose Barry near the pond identify which identity has been granted excessive Owner permissions at the subscription level, violating the principle of least privilege.

Barry

Screenshot 2026-04-20 192645

Solution⚓︎

Barry asked me to use the Azure CLI to find the admin accidentally uploaded infrastructure config file.

The terminal session introduced the challenge and the Azure CLI environment.

Screenshot 2026-04-20 192722

The first task was to list available resource groups using the command:

List resource groups
1
az group list -o table

The output showed the resource groups available in the subscription.

Screenshot 2026-04-20 192855

Task 2 was to list storage accounts in the neighborhood resource group using the command:

List storage accounts in rg-the-neighborhood
1
az storage account list --resource-group rg-the-neighborhood -o table

The results showed the different storage accounts in the resource group.

Screenshot 2026-04-20 193348

Apparently, there is a website in one of the storage accounts.

The next task was to check the blob service properties for each storage account. The first storage account's blob service properties were checked using:

Show blob service properties
1
az storage blob service-properties show --account-name neighborhoodhoa --auth-mode login

This revealed that there is a website enabled for the account.

Screenshot 2026-04-20 193603

The next task was to list containers in the neighborhoodhoa storage account with the command:

List containers
1
az storage container list --account-name neighborhoodhoa --auth-mode login

The container list showed a $web container.

Screenshot 2026-04-20 193902

Task 5 was to list blobs in the $web container using the command:

List blobs in $web
1
az storage blob list --account-name neighborhoodhoa --container-name '$web' --output table --auth-mode login

The blob list included iac/terraform.tfvars. Screenshot 2026-04-20 194239

The next task was to download the tfvars file and review its contents with the command:

Download terraform.tfvars
1
az storage blob download --account-name neighborhoodhoa --container-name '$web' --name iac/terraform.tfvars --file /dev/stdout --auth-mode login | less

The download of the tfvars file shows that the file contains sensitive information.

Screenshot 2026-04-20 195103

Screenshot 2026-04-20 195133

The challenge was completed after the finding. I typed finished as required to complete the objective.

Screenshot 2026-04-20 195210

The objective was added to the achievements list.

Screenshot 2026-05-26 020735

Response⚓︎

Barry

There it is. A SAS token with read-write-delete permissions, publicly accessible. At least someone around here knows how to do a proper security audit.