-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdata.yaml
80 lines (69 loc) · 3.08 KB
/
data.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
metadata:
id: 61ab077c-fc0f-5920-8bcf-ccc037a4139b
name: Ensure Virtual Machines are utilizing Managed Disks
profile_applicability: '* Level 1'
description: |-
Migrate blob-based VHDs to Managed Disks on Virtual Machines to exploit the default features of this configuration.
The features include:
1) Default Disk Encryption
2) Resilience, as Microsoft will managed the disk storage and move around if underlying hardware goes faulty
3) Reduction of costs over storage accounts
rationale: |-
Managed disks are by default encrypted on the underlying hardware, so no additional encryption is required for basic protection.
It is available if additional encryption is required.
Managed disks are by design more resilient that storage accounts.
For ARM-deployed Virtual Machines, Azure Adviser will at some point recommend moving VHDs to managed disks both from a security and cost management perspective.
audit: |-
**From Azure Portal**
1. Using the search feature, go to `Virtual Machines`
2. Click the `Manage view` dropdown, then select `Edit columns`
3. Add `Uses managed disks` to the selected columns
4. Select `Save`
5. Ensure all virtual machines listed are using managed disks
**From PowerShell**
```
Get-AzVM | ForEach-Object {"Name: " + $_.Name;"ManagedDisk Id: " + $_.StorageProfile.OsDisk.ManagedDisk.Id;""}
```
Example output:
```
Name: vm1
ManagedDisk Id: /disk1/id
Name: vm2
ManagedDisk Id: /disk2/id
```
If the 'ManagedDisk Id' field is empty the os disk for that vm is not managed.
remediation: |-
**From Azure Portal**
1. Using the search feature, go to `Virtual Machines`
2. Select the virtual machine you would like to convert
3. Select `Disks` in the menu for the VM
4. At the top select `Migrate to managed disks`
5. You may follow the prompts to convert the disk and finish by selecting `Migrate` to start the process
**NOTE** VMs will be stopped and restarted after migration is complete.
**From PowerShell**
```
Stop-AzVM -ResourceGroupName $rgName -Name $vmName -Force
ConvertTo-AzVMManagedDisk -ResourceGroupName $rgName -VMName $vmName
Start-AzVM -ResourceGroupName $rgName -Name $vmName
```
impact: |-
There are additional costs for managed disks based off of disk space allocated. When converting to managed disks, VMs will be powered off and back on.
default_value: ''
references: |-
1. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks
2. https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-4-enable-data-at-rest-encryption-by-default
3. https://docs.microsoft.com/en-us/azure/virtual-machines/faq-for-disks
4. https://azure.microsoft.com/en-us/pricing/details/managed-disks/
section: Virtual Machines
version: '1.0'
tags:
- CIS
- AZURE
- CIS 7.2
- Virtual Machines
benchmark:
name: CIS Microsoft Azure Foundations
version: v2.0.0
id: cis_azure
rule_number: '7.2'
posture_type: cspm