技能 编程开发 Azure存储误配置审计

Azure存储误配置审计

v20260317
detecting-azure-storage-account-misconfigurations
使用 azure-mgmt-storage SDK 扫描 Azure Blob 与 ADLS 存储帐户,识别公开访问、宽松 SAS 令牌、缺失加密、未强制 HTTPS、TLS 版本过低以及网络规则默认放行等误配置,并生成带风险等级及修复建议的报告。
获取技能
319 次下载
概览

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.

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

  1. Public blob accessallow_blob_public_access enabled on storage account or individual containers set to Blob/Container access level
  2. HTTPS enforcementenable_https_traffic_only disabled, allowing unencrypted HTTP traffic
  3. Minimum TLS version — accounts accepting TLS 1.0 or TLS 1.1 instead of minimum TLS 1.2
  4. Encryption at rest — storage service encryption not enabled or missing customer-managed keys
  5. Network rules — default action set to Allow instead of Deny, exposing storage to all networks
  6. 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.

信息
Category 编程开发
Name detecting-azure-storage-account-misconfigurations
版本 v20260317
大小 9.31KB
更新时间 2026-03-18
语言