Framework/Configurations/SVT/Services/VirtualMachine.json
{
"FeatureName": "VirtualMachine", "Reference": "aka.ms/azsktcp/virtualmachine", "IsMaintenanceMode": false, "Controls": [ { "ControlID": "Azure_VirtualMachine_Deploy_Latest_OS_Version", "Description": "Virtual Machine should have latest OS version installed", "Id": "VirtualMachine110", "ControlSeverity": "Medium", "Automated": "Yes", "MethodName": "CheckOSVersion", "Rationale": "Being on the latest OS version significantly reduces risks from security design issues and security bugs that may be present in older versions.", "Recommendation": "Run command 'Update-AzVM -ResourceGroupName {resourceGroupName} -VM (Get-AzVM -ResourceGroupName {resourceGroupName} -Name {vmName})' . Run 'Get-Help Update-AzVM -full' for more help.", "Tags": [ "SDL", "TCP", "Automated", "Deploy", "Windows", "Linux", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_Enable_Antimalware", "Description": "Antimalware must be enabled with real time protection on Virtual Machine", "Id": "VirtualMachine130", "ControlSeverity": "High", "Automated": "Yes", "MethodName": "CheckAntimalwareStatus", "Rationale": "Enabling antimalware protection minimizes the risks from existing and new attacks from various types of malware. Microsoft Antimalware provide real-time protection, scheduled scanning, malware remediation, signature updates, engine updates, samples reporting, exclusion event collection etc.", "Recommendation": "To install antimalware, Go to Azure Portal --> VM Properties --> Extensions --> Add 'Microsoft Antimalware' --> Enable Real-Time Protection and Scheduled Scan --> Click Ok. If antimalware is already present on VM, validate and resolve endpoint protection recommendations in ASC. Refer: https://docs.microsoft.com/en-us/azure/security-center/security-center-install-endpoint-protection, https://docs.microsoft.com/en-us/azure/security/azure-security-antimalware", "Tags": [ "SDL", "TCP", "Automated", "Config", "Windows", "Linux", "SOX", "SI", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_Config_Enable_NSG", "Description": "NSG must be configured for Virtual Machine", "Id": "VirtualMachine140", "ControlSeverity": "Medium", "Automated": "Yes", "MethodName": "CheckNSGConfig", "Rationale": "Restricting inbound and outbound traffic via NSGs limits the network exposure of a VM by reducing the attack surface.", "Recommendation": "Refer: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/endpoints-in-resource-manager, https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-nsg-arm-ps", "Tags": [ "SDL", "TCP", "Automated", "Config", "Windows", "Linux", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_NetSec_Justify_PublicIPs", "Description": "Public IPs on a Virtual Machine should be carefully reviewed", "Id": "VirtualMachine150", "ControlSeverity": "High", "Automated": "Yes", "MethodName": "CheckPublicIP", "Rationale": "Public IPs provide direct access over the internet exposing the VM to attacks over the public network. Hence each public IP on a VM must be reviewed carefully.", "Recommendation": "Go to Azure Portal --> VM Settings --> Networking --> Network Interfaces --> <Select NIC> --> IP Configurations --> <Select IP Configs with Public IP> --> Click 'Disabled' --> Save. Refer: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-public-ip-address ", "Tags": [ "SDL", "TCP", "Automated", "NetSec", "Windows", "Linux", "ERvNet", "VirtualMachine", "FilterDatabricks" ], "Enabled": true, "DataObjectProperties": [ "PublicIpAllocationMethod", "IpConfiguration", "Id", "DnsSettings" ] }, { "ControlID": "Azure_VirtualMachine_DP_Enable_Disk_Encryption", "Description": "Disk encryption must be enabled on both OS and data disks for Windows Virtual Machine", "Id": "VirtualMachine160", "ControlSeverity": "High", "Automated": "Yes", "MethodName": "CheckDiskEncryption", "Rationale": "Using this feature ensures that sensitive data is stored encrypted at rest. This minimizes the risk of data loss from physical theft and also helps meet regulatory compliance requirements. In the case of VMs, both OS and data disks may contain sensitive information that needs to be protected at rest. Hence disk encryption must be enabled for both.", "Recommendation": "Refer: https://docs.microsoft.com/en-us/azure/security-center/security-center-disk-encryption?toc=%2fazure%2fsecurity%2ftoc.json. Note: After enabling disk encryption, it takes some time for changes to reflect in Azure Security Center (ASC). Thus, if you scan immediately, the control may still fail even though the VM itself shows as encrypted. Please wait a few hours to ascertain the fix.", "Tags": [ "SDL", "TCP", "Automated", "DP", "Windows", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_ASC_OS_Vulnerabilities", "Description": "Virtual Machine must be in a healthy state in Azure Security Center", "Id": "VirtualMachine171", "ControlSeverity": "High", "Automated": "Yes", "MethodName": "CheckASCVMSecurityBaselineStatus", "Rationale": "Azure Security Center raises alerts (which are typically indicative of resources that are not compliant with some baseline security protection). It is important that these alerts/actions are resolved promptly in order to eliminate the exposure to attacks.", "Recommendation": "Refer: https://docs.microsoft.com/en-us/azure/security-center/security-center-remediate-os-vulnerabilities", "Tags": [ "SDL", "TCP", "Automated", "Audit", "Windows", "Linux", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_Missing_OS_Patches", "Description": "Virtual Machine must have all the required OS patches installed.", "Id": "VirtualMachine172", "ControlSeverity": "High", "Automated": "Yes", "MethodName": "CheckASCVMMissingPatchingStatus", "Rationale": "Un-patched VMs are easy targets for compromise from various malware/trojan attacks that exploit known vulnerabilities in operating systems and related software.", "Recommendation": "Refer: https://docs.microsoft.com/en-us/azure/security-center/security-center-apply-system-updates . It takes 24 hours to reflect the latest status at ASC.", "Tags": [ "SDL", "TCP", "Automated", "Audit", "Windows", "SOX", "SI", "Linux", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_ASC_Recommendations", "Description": "Virtual Machine must implement all the flagged ASC recommendations.", "Id": "VirtualMachine173", "ControlSeverity": "High", "Automated": "Yes", "MethodName": "CheckASCVMRecommendations", "Rationale": "Azure Security Center provide various security recommendations for resources that are not compliant with some baseline security protection. It is important that these recommendations are resolved promptly in order to eliminate the exposure to attacks.", "Recommendation": "First, examine the detailed AzSK log file for this VM to find out the specific recommendations this control is currently failing for. Review the ASC documentation for those recommendations and implement the suggested fixes. (Note: Not all ASC recommendations are flagged by AzSK. So the first step is critical.). Refer: https://docs.microsoft.com/en-us/azure/security-center/security-center-virtual-machine-recommendations", "Tags": [ "SDL", "TCP", "Automated", "Audit", "Windows", "Linux", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_Audit_Enable_Diagnostics", "Description": "Diagnostics (IaaSDiagnostics extension on Windows; LinuxDiagnostic extension on Linux) must be enabled on Virtual Machine", "Id": "VirtualMachine180", "ControlSeverity": "Medium", "Automated": "Yes", "MethodName": "CheckVMDiagnostics", "Rationale": "Diagnostics logs are needed for creating activity trail while investigating an incident or a compromise.", "Recommendation": "Go to Azure Portal --> VM Properties --> Diagnostics settings --> Enable guest-level-monitoring. Refer: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/azure-diagnostics", "Tags": [ "SDL", "TCP", "Automated", "Audit", "Windows", "Linux", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_NetSec_Dont_Open_Management_Ports", "Description": "Do not leave management ports open on Virtual Machines", "Id": "VirtualMachine190", "ControlSeverity": "Critical", "Automated": "Yes", "MethodName": "CheckOpenPorts", "Rationale": "Open remote management ports expose a VM/compute node to a high level of risk from internet-based attacks that attempt to brute force credentials to gain admin access to the machine.", "Recommendation": "Go to Azure Portal --> VM Settings --> Networking --> Inbound security rules --> Select security rule which allows management ports (e.g. RDP-3389, WINRM-5985, SSH-22) --> Click 'Deny' under Action --> Click Save.", "Tags": [ "SDL", "TCP", "Automated", "NetSec", "Windows", "Linux", "OwnerAccess", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_Enable_Vuln_Solution", "Description": "Vulnerability assessment solution should be installed on VM", "Id": "VirtualMachine200", "ControlSeverity": "Medium", "Automated": "Yes", "MethodName": "CheckVulnAgentStatus", "Rationale": "Known OS/framework vulnerabilities in a system can be easy targets for attackers. An attacker can start by compromising a VM/container with such a vulnerability and can eventually compromise the security of the entire network. A vulnerability assessment solution can help to detect/warn about vulnerabilities in the system and facilitate addressing them in a timely manner.", "Recommendation": "To install vulnerability assessment solution, please refer: https://docs.microsoft.com/en-us/azure/security-center/security-center-vulnerability-assessment-recommendations", "Tags": [ "SDL", "TCP", "Automated", "Config", "Windows", "Linux", "SI", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_Deploy_GuestConfig_Extension", "Description": "Guest Configuration extension must be deployed to the VM using Azure Policy assignment", "Id": "VirtualMachine210", "ControlSeverity": "Medium", "Automated": "Yes", "MethodName": "CheckGuestConfigExtension", "Rationale": "Installing Guest configuration extension on VM allows you to run In-Guest Policy on the VM, making it possible to monitor system and security policies for compliance checks in the VM.", "Recommendation": "This control checks that the VM meets the following criteria: [a] Guest Configuration Extension is installed and provisioned successfully, [b] 'SystemAssigned' managed identity (MSI) is enabled for the VM. Both, the required Guest Configuration extension and a system-assigned MSI, will be automatically deployed and configured when the machine is in scope for an Azure Policy assignment that includes definitions in the Guest Configuration category.", "Tags": [ "SDL", "TCP", "Automated", "Config", "Windows", "Linux", "SI", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_GuestConfig_Policy_Health", "Description": "Guest config extension should report compliant status for all in-guest policies.", "Id": "VirtualMachine220", "ControlSeverity": "Medium", "Automated": "Yes", "MethodName": "CheckGuestConfigPolicyStatus", "Rationale": "In-guest policies cover various native (data-plane) security requirements for a VM. A VM that is compliant to these requirements has a lower overall exposure to getting compromised.", "Recommendation": "Run Get-AzVMGuestPolicyStatus -ResourceGroupName <VM Resource group name> -VMName <VM Name> to get further details like Compliance reason, last check time etc. and ensure that the issues are resolved.", "Tags": [ "SDL", "TCP", "Automated", "Config", "Windows", "Linux", "SI", "ERvNet", "VirtualMachine" ], "Enabled": true }, { "ControlID": "Azure_VirtualMachine_SI_Deploy_Required_Extension", "Description": "All VM extensions required as per your Org policy must be deployed to the VM", "Id": "VirtualMachine230", "ControlSeverity": "Medium", "Automated": "Yes", "MethodName": "CheckRequiredExtensions", "Rationale": "One or more extensions may be required for maintaining data plane security hygiene and visibility for all Azure VMs in use at an Org. It is important to ensure all required extensions are installed and in healthy provisioning state.", "Recommendation": "Please look at the detailed AzSK scan logs to determine missing or unhealthy extensions and fix them using command: Set-AzVMExtension -ResourceGroupName '<VM Resource Group Name}>' -VMName '<VM Resource Name>' -Name '<Extension Name>' -Publisher '<Publisher>' -Type '<ExtensionType>'", "Tags": [ "SDL", "TCP", "Automated", "Config", "Windows", "Linux", "SI", "ERvNet", "VirtualMachine" ], "Enabled": true } ] } |