01 Run account list command (Windows/macOS/Linux) with custom output filters to list the IDs of the cloud subscriptions available in your Azure cloud account:
az account list
--query '[*].id'
02 The command output should return the requested subscription identifiers (IDs):
[
"abcdabcd-1234-abcd-1234-abcdabcdabcd",
"abcd1234-abcd-1234-abcd-abcd1234abcd"
]
03 Run account set command (Windows/macOS/Linux) with the ID of the Azure cloud subscription that you want to examine as the identifier parameter to set the selected subscription to be the current active subscription (the command does not produce an output):
az account set
--subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
04 Run storage account list command (Windows/macOS/Linux) with custom output filters to describe the identifier (name) of each storage account provisioned in the selected subscription:
az storage account list
--query '[*].name'
05 The command output should return the requested storage account names:
[
"project5storageaccount",
"cloudaistorageaccount"
]
06 Run storage account file-service-properties show command (Windows/macOS/Linux) with the name of the Azure Storage account that you want to examine as the identifier parameter and custom output filters to describe the SMB protocol version(s) enabled for the Azure File Shares within the selected Storage account:
az storage account file-service-properties show
--account-name project5storageaccount
--query '{SMBVersions:protocolSettings.smb.versions}'
07 The command output should return the SMB protocol version(s) enabled for your File Shares:
{
"SMBVersions": "SMB2.1;SMB3.0;SMB3.1.1;"
}
If the
storage account file-service-properties show command output returns
null for the
"SMBVersions" property, the security profile is set for maximum compatibility, therefore, SMB 3.1.1 is not the only SMB protocol version enabled for your File Shares. If the command output does not return only
SMB3.1.1 for
"SMBVersions", as shown in the example above, SMB 3.1.1 is not the only SMB protocol version enabled for your File Shares. As a result, the File Shares in the selected Azure Storage account are using outdated and potentially vulnerable SMB protocol versions.
08 Repeat steps no. 6 and 7 for each Azure Storage account provisioned in the selected subscription.
09 Repeat steps no. 3 – 8 for each subscription available in your Microsoft Azure cloud account.