Microsoft Azure offers a robust security feature that includes cloud vulnerability scanning, ensuring secure deployments for its users. This feature is designed to identify potential vulnerabilities in cloud resources, such as virtual machines, networks, and storage.
Azure Security Center provides cloud vulnerability assessment and remediation, helping users identify and fix vulnerabilities before they can be exploited. Azure Security Center also offers continuous monitoring and threat protection.
Azure's cloud vulnerability scanning is a key component of its security features, providing users with a clear view of their cloud resources' security posture. This feature helps users prioritize remediation efforts based on risk and severity.
Automate At-Scale Deployments
You can automate deployment at scale of the integrated scanner using various tools. One method is to use Azure Resource Manager, which is available from the Azure portal's view recommendation logic. The remediation script includes the relevant ARM template you can use for your automation.
Azure Policy is another option, specifically the custom policy definition called Configure machines to receive a vulnerability assessment provider. This policy will deploy Defender for Cloud's integrated Qualys vulnerability scanner to all non-compliant Azure VMs and Azure Arc-enabled servers.
You can also use PowerShell Script, which can be used to deploy the extension for all unhealthy virtual machines and can be automated using Azure Automation for installation on new resources. The script finds all unhealthy machines discovered by the recommendation and executes an Azure Resource Manager call.
Additionally, you can use Azure Logic Apps, which leverages workflow automation to trigger the installation of the agent whenever a new security recommendation is generated for a resource.
Here are the methods you can use to automate deployment at scale:
- Azure Resource Manager
- Azure Policy (Configure machines to receive a vulnerability assessment provider)
- PowerShell Script
- Azure Logic Apps
- REST API (by making a PUT request to the specified URL)
These methods can help you automate deployment at scale and streamline your vulnerability scanning process.
Implementation and Integration
To implement and integrate Microsoft Azure's cloud vulnerability scan, you'll need to enable Defender for Cloud's integrated Qualys vulnerability scanner. This can be done by manually choosing non-compliant machines and deploying Qualys through the remediation step of the Machines should have a vulnerability assessment solution recommendation in Defender for Cloud page in Azure portal.
However, a more automated approach is available using Azure Policy. A built-in policy definition called Configure machines to receive a vulnerability assessment provider can deploy Defender for Cloud's integrated Qualys vulnerability scanner to all non-compliant Azure VMs and Azure Arc-enabled servers. This policy can also be used to deploy Microsoft Defender Vulnerability Management.
With Azure Policy, you can create a user-assigned identity with Security Admin role assignment and a policy assignment on the subscription level to ensure all resources are evaluated by the policy. This will trigger an initial remediation task to detect non-compliant machines and deploy Qualys extension to them.
Integration Process
The integration process is where the magic happens. It's where your Azure and hybrid machines get connected to Defender for Cloud and start receiving vulnerability assessments.
To get started, you'll need to open the Azure portal and navigate to Defender for Cloud. From there, you can open the Recommendations page and select the recommendation "Machines should have a vulnerability assessment solution."
You'll then see a list of unhealthy machines that need a vulnerability assessment solution. Select the ones you want to remediate and choose the recommended option, "Deploy integrated vulnerability scanner", and proceed.
The scanner extension will be installed on all the selected machines within a few minutes, and scanning will begin automatically as soon as it's successfully deployed.
Here's a quick rundown of the deployment process:
- Deploy - Microsoft Defender for Cloud monitors your machines and provides recommendations to deploy the Qualys extension on your selected machine/s.
- Gather information - The extension collects artifacts and sends them for analysis in the Qualys cloud service in the defined region.
- Analyze - Qualys' cloud service conducts the vulnerability assessment and sends its findings to Defender for Cloud.
- Report - The findings are available in Defender for Cloud.
It's worth noting that the scanning environment where disks are analyzed is regional, volatile, isolated, and highly secure. Disk snapshots and data unrelated to the scan aren't stored longer than is necessary to collect the metadata, typically a few minutes.
Azure Container Registry and AKS
Azure Container Registry and AKS are closely tied together. Azure Container Registry is a managed Docker container registry service that stores and manages container images.
To use AKS, you need to first create an Azure Container Registry instance. This allows you to store and manage your container images in a secure and scalable way.
You can then use the Azure CLI or Azure portal to create an AKS cluster and link it to your container registry. This enables you to deploy your containerized applications to the cluster.
The container registry provides a secure way to store and manage your container images, and AKS provides a managed Kubernetes service for deploying and managing your containerized applications.
By using Azure Container Registry and AKS together, you can easily deploy and manage your containerized applications in the cloud.
Scan Triggers and Basics
You can trigger a scan for image vulnerabilities in Azure Container Registries in two ways: one-time triggering and continuous rescan triggering.
One-time triggering allows you to scan images immediately, while continuous rescan triggering ensures that images are rescanned to update their vulnerability reports when new vulnerabilities are published.
Azure Container Registries notifies Defender for Cloud when images are deleted, and removes the vulnerability assessment for deleted images within one hour, with some rare cases taking up to three days for deletion of associated vulnerabilities.
Scan Triggers
Scan Triggers are an essential part of keeping your cloud environment secure. They determine when a vulnerability scan is triggered.
You can trigger a scan one-time, which is useful for initial scans or when you've made significant changes to your environment. On the other hand, continuous rescan triggering is required to ensure images that have been previously scanned for vulnerabilities are rescanned to update their vulnerability reports in case a new vulnerability is published.
Azure Container Registries notifies Defender for Cloud when images are deleted, and removes the vulnerability assessment for deleted images within one hour. In some rare cases, Defender for Cloud might not be notified on the deletion, and deletion of associated vulnerabilities in such cases might take up to three days.
Here are the scan triggers in a nutshell:
- One-time triggering
- Continuous rescan triggering
Image Scanning Basics
Image scanning is a crucial step in identifying vulnerabilities in your container images. It's a process that happens automatically when you enable container vulnerability assessment for Azure powered by Microsoft Defender Vulnerability Management.
Defender for Cloud automatically discovers all container registries, repositories, and images, including those created before or after enabling this capability. This means you don't have to manually configure anything.
New images are added to the catalog of images Defender for Cloud maintains, and queued for scanning immediately. You'll receive notifications whenever a new image is pushed to an Azure Container Registry.
Image scan results are updated based on registry scan, and are refreshed every 24 hours. For customers using Agentless discovery for Kubernetes, the refresh time for inventory in this recommendation is once every seven hours.
Frequently Asked Questions
How do I enable vulnerability assessment in Azure?
To enable vulnerability assessment in Azure, go to the Security heading and select Defender for Cloud, then enable the express configuration of vulnerability assessment. Confirm the change to activate vulnerability assessment.
Is Microsoft Defender for cloud a vulnerability scanner?
Microsoft Defender for Cloud is not a standalone vulnerability scanner, but rather a feature that's part of its protection for servers and other PaaS resources. It's designed to scan for vulnerabilities on specific, supported operating systems.
Sources
- https://learn.microsoft.com/en-us/azure/defender-for-cloud/deploy-vulnerability-assessment-vm
- https://kristhecodingunicorn.com/post/scan-azurevm-azurearc-acr-with-defender-and-qualys/
- https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-agentless-data-collection
- https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/built-in-vulnerability-assessment-for-vms-in-microsoft-defender/ba-p/1577947
- https://learn.microsoft.com/en-us/azure/defender-for-cloud/agentless-vulnerability-assessment-azure
Featured Images: pexels.com