Azure Storage provides cloud storage for blobs (files), files, queues, and tables. Like AWS S3, misconfigured Azure Storage is a goldmine for attackers - public blob containers have leaked everything from database backups to PII. Understanding Azure storage security is crucial for both offense and defense.
Azure storage has multiple access mechanisms: access keys (full control), SAS tokens (scoped, temporary), Azure AD authentication, and anonymous public access. Each creates different attack and defense opportunities.
Blob Storage = Azure's S3
Azure Blob Storage is analogous to AWS S3 - object storage with containers (like buckets) and blobs (like objects). Similar misconfigurations lead to similar breaches.
Azure Storage Structure
Storage Discovery
Exploiting Misconfigured Storage
Check All Container Access Levels
A storage account can have multiple containers with different access levels. One public container in a sea of private ones can still leak critical data. Enumerate all containers.
SAS Token Attacks
Long-lived SAS Tokens
SAS tokens often have very long expiration times ("we'll rotate them later"). A leaked SAS token from years ago might still be valid. Always test found tokens regardless of when they were created.
Storage Account Key Exploitation
Account Keys = Root Access
Storage account keys provide full access to ALL data in the storage account. They cannot be scoped or restricted. Treat exposed account keys as a critical incident.
Authenticated Enumeration
Azure Storage Defenses
Azure Storage Attack Methodology
Azure Storage Security Assessment
1
DiscoveryEnumerate storage account names via DNS brute force, MicroBurst, subdomain enumeration.
2
Public Access CheckTest each discovered account for public containers. Try listing and downloading anonymously.
3
SAS Token HuntingSearch code, configs, logs for SAS tokens. Test found tokens for validity and permissions.
4
Key DiscoveryLook for storage account keys in code, configs, Azure automation accounts, Key Vault.
5
Data ExtractionDownload accessible data. Search for credentials, PII, backups, configuration files.
6
PersistenceIf write access exists, consider uploading webshells, modifying config files, or planting backdoors.
Knowledge Check
Challenges
Key Takeaways
- Azure Blob Storage is like AWS S3 - public containers are a major breach source
- Storage account keys provide FULL access - treat as critical secrets
- SAS tokens often have excessive permissions and long expiration times
- Container-level public access allows listing; Blob-level only allows direct access
- Use az storage with --auth-mode login for Azure AD auth instead of keys
- Disable public blob access at the account level for defense