turbot/azure_compliance

Control: 3.17 Ensure that `Allow Blob Anonymous Access` is set to `Disabled`

Description

The Azure Storage setting ‘Allow Blob Anonymous Access’ (aka "allowBlobPublicAccess") controls whether anonymous access is allowed for blob data in a storage account. When this property is set to True, it enables public read access to blob data, which can be convenient for sharing data but may carry security risks. When set to False, it disallows public access to blob data, providing a more secure storage environment.

If "Allow Blob Anonymous Access" is enabled, blobs can be accessed by adding the blob name to the URL to see the contents. An attacker can enumerate a blob using methods, such as brute force, and access them.

Exfiltration of data by brute force enumeration of items from a storage account may occur if this setting is set to 'Enabled'.

Additional consideration may be required for exceptional circumstances where elements of a storage account require public accessibility. In these circumstances, it is highly recommended that all data stored in the public facing storage account be reviewed for sensitive or potentially compromising data, and that sensitive or compromising data is never stored in these storage accounts.

Remediation

From Azure Console

  1. Open the Storage Accounts blade.
  2. Click on a Storage Account.
  3. In the storage account menu pane, under the Settings section, click Configuration.
  4. Under Allow Blob Anonymous Access, select Disabled.

Repeat these steps for each Storage Account.

From Azure Powershell

For every storage account in scope, run the following:

$storageAccount = Get-AzStorageAccount -ResourceGroupName
"<yourResourceGroup>" -Name "<yourStorageAccountName>"
$storageAccount.AllowBlobPublicAccess = $false
Set-AzStorageAccount -InputObject $storageAccount

Default Value

Disabled

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cis_v210_3_17

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.cis_v210_3_17 --share

SQL

This control uses a named query:

storage_account_blob_containers_public_access_private

Tags