What it does. Audit Azure Blob and ADLS storage accounts for public access exposure, weak Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).
Install
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill detecting-azure-storage-account-misconfigurations, or copy the skill folder into ~/.claude/skills/detecting-azure-storage-account-misconfigurations/.
- Raw file:
curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/detecting-azure-storage-account-misconfigurations/SKILL.md
SKILL.md (verbatim)
name: detecting-azure-storage-account-misconfigurations
description: Audit Azure Blob and ADLS storage accounts for public access exposure, weak
or long-lived SAS tokens, missing encryption at rest, disabled HTTPS-only traffic,
and outdated TLS versions, using the azure-mgmt-storage Python SDK to generate a
risk-scored report. Use when assessing an Azure subscription's storage accounts for
misconfiguration, building cloud security posture checks, or investigating a suspected
data exposure via public blob access.
domain: cybersecurity
subdomain: cloud-security
tags:
- Azure
- storage-accounts
- blob-storage
- ADLS
- SAS-tokens
- encryption
- public-access
- cloud-misconfiguration
- azure-mgmt-storage
version: '1.0'
author: mahipal
license: Apache-2.0
nist_ai_rmf:
- MEASURE-2.7
- MAP-5.1
- MANAGE-2.4
atlas_techniques:
- AML.T0070
- AML.T0066
- AML.T0082
nist_csf:
- PR.IR-01
- ID.AM-08
- GV.SC-06
- DE.CM-01
mitre_attack:
- T1530
- T1078.004
- T1619
- T1580
Detecting Azure Storage Account Misconfigurations
Overview
Azure Storage accounts are a frequent target for attackers due to misconfigured public access, long-lived SAS tokens, missing encryption, and outdated TLS versions. This skill uses the azure-mgmt-storage Python SDK with StorageManagementClient to enumerate all storage accounts in a subscription, inspect their security properties, list blob containers for public access settings, and generate a risk-scored audit report identifying critical misconfigurations.
When to Use
- When investigating security incidents that require detecting azure storage account misconfigurations
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Python 3.9+ with
azure-mgmt-storage, azure-identity
- Azure service principal with Reader role on target subscription
- Environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID
Key Detection Areas
- Public blob access —
allow_blob_public_access enabled on storage account or individual containers set to Blob/Container access level
- HTTPS enforcement —
enable_https_traffic_only disabled, allowing unencrypted HTTP traffic
- Minimum TLS version — accounts accepting TLS 1.0 or TLS 1.1 instead of minimum TLS 1.2
- Encryption at rest — storage service encryption not enabled or missing customer-managed keys
- Network rules — default action set to Allow instead of Deny, exposing storage to all networks
- SAS token risks — account-level SAS with overly broad permissions or excessive lifetime
Output
JSON report with per-account findings, severity ratings (Critical/High/Medium/Low), and remediation recommendations aligned with CIS Azure Benchmark controls.
Other files in this skill
references/api-reference.md (verbatim)
Azure Storage Account Misconfiguration Detection Reference
SDK Installation
pip install azure-mgmt-storage azure-identity
StorageManagementClient Initialization
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="<subscription-id>"
)
Key Operations
List All Storage Accounts
for account in client.storage_accounts.list():
print(account.name, account.location, account.kind)
Get Storage Account Properties
account = client.storage_accounts.get_properties(
resource_group_name="myResourceGroup",
account_name="mystorageaccount"
)
List Blob Containers
containers = client.blob_containers.list(
resource_group_name="myResourceGroup",
account_name="mystorageaccount"
)
for container in containers:
print(container.name, container.public_access)
Security Properties to Audit
| Property |
Secure Value |
Risk if Misconfigured |
allow_blob_public_access |
False |
Critical — data exposed to internet |
enable_https_traffic_only |
True |
High — credentials sent in cleartext |
minimum_tls_version |
TLS1_2 |
High — vulnerable to downgrade attacks |
encryption.services.blob.enabled |
True |
High — data at rest unencrypted |
encryption.key_source |
Microsoft.Keyvault |
Low — Microsoft-managed keys less controlled |
network_rule_set.default_action |
Deny |
High — storage open to all networks |
encryption.require_infrastructure_encryption |
True |
Low — no double encryption |
Container Public Access Levels
| Level |
Description |
Risk |
None |
Private, no public access |
Safe |
Blob |
Anonymous read for blobs only |
High |
Container |
Anonymous read for container and blobs |
Critical |
Azure CLI Equivalents
# List storage accounts
az storage account list --query "[].{name:name, publicAccess:allowBlobPublicAccess, httpsOnly:enableHttpsTrafficOnly, minTls:minimumTlsVersion}" -o table
# Check specific account
az storage account show -n mystorageaccount -g myResourceGroup
# List containers with access level
az storage container list --account-name mystorageaccount --query "[].{name:name, publicAccess:properties.publicAccess}" -o table
# Disable public blob access
az storage account update -n mystorageaccount -g myResourceGroup --allow-blob-public-access false
# Set minimum TLS
az storage account update -n mystorageaccount -g myResourceGroup --min-tls-version TLS1_2
CIS Azure Benchmark Controls
| Control |
Description |
| 3.1 |
Ensure 'Secure transfer required' is enabled |
| 3.7 |
Ensure default network access rule is set to deny |
| 3.8 |
Ensure 'Trusted Microsoft Services' is enabled |
| 3.10 |
Ensure storage logging is enabled for Blob service |
| 3.12 |
Ensure storage account access keys are periodically regenerated |
Environment Variables
| Variable |
Description |
AZURE_SUBSCRIPTION_ID |
Target Azure subscription |
AZURE_CLIENT_ID |
Service principal application ID |
AZURE_TENANT_ID |
Azure AD tenant ID |
AZURE_CLIENT_SECRET |
Service principal secret |
Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.