Microsoft Defender for Cloud
Cloud and workloads

Remediate machine vulnerabilities

In brief

The article updates scanning prerequisites, changes the review workflow to use Recommendations > Vulnerabilities with filtering and resource grouping, and adds an Azure Resource Graph query for software update recommendations.

What Defender admins need to know

Administrators following the procedure should use the updated navigation and can use the included query to export machine vulnerability findings.

Summaries are generated from the documentation change itself.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Remediate machine vulnerabilities

The Defender for Servers plan in Microsoft Defender for Cloud provides agentless and agent-based vulnerability scanning forscans protected machines usingfor vulnerabilities. It supports both agentless and agent-based scanning through Microsoft Defender Vulnerability Management.

Requirement Details
Plan For agentless vulnerability scanning, enable Defender for Servers Plan 2 must be enabled, and turn on agentless scanning must be on in the plan.

For agent-based scanning with the Microsoft Defender for Endpoint agent,scanning, enable Defender for Servers Plan 1 or Defender for Servers Plan 2 must be enabled, and turn on Defender for Endpoint integration must be enabled.integration.
Agentless scanning Review the prerequisitesReview the prerequisites for agentless scanning.
Agent-based scanning Review the prerequisites for Defender for Endpoint integration in Defender for Servers.

View scan findings

To view vulnerability assessment findings (from all of your configured scanners)review and remediate identified vulnerabilities:machine vulnerability findings:

  1. FromIn Defender for Cloud's menu, open theCloud, go to Recommendations page..

  2. Select Vulnerabilities to view vulnerability recommendations.

  3. Use the recommendation Machines should have vulnerability findings resolved.

    Defender for Cloud shows findings for all VMs inavailable filters to scope the selected subscriptions. Findings are ordered by severity.

    :::image type="content" source="media/remediate-vulnerability-findings-vm/vulnerabilities-should-be-remediated.png" alt-text="The findings from your vulnerability assessment solutions for all selected subscriptions." lightbox="media/remediate-vulnerability-findings-vm/vulnerabilities-should-be-remediated.png":::results to the resources you want to review.

  4. To filterreview vulnerability findings for a specific resource, select Group by one VM, open the "Affected resources" sectionresource, and then select the VM you want. You can also select a VM from the resource health view to see all relevant recommendations for that resource.

    Defender for Cloud shows the findings for that VM, ordered by severity.

  5. To learn more about a specific vulnerability, select it.Select an individual vulnerability recommendation to review its details.

  6. :::image type="content" source="media/remediate-vulnerability-findings-vm/vulnerability-details.png" alt-text="Details pane for a specific vulnerability." lightbox="media/remediate-vulnerability-findings-vm/vulnerability-details.png":::

    The details pane includesReview the following vulnerability information:recommendation details, including:

    • Links to all relevant CVEs (where available)The affected resource
    • Relevant CVEs, when available
    • Remediation steps
    • Any moreAdditional reference pagesinformation, when available
  7. To remediate athe finding, follow the remediation steps fromguidance for the details pane.selected recommendation.

Export the results

Export vulnerability assessment results with Azure Resource Graph. Azure Resource Graph gives you quick access to resource data across cloud environments. You can filter, group, and sort resultsuse Azure Resource Graph to query informationand export machine vulnerability findings across Azure subscriptions from the portal or programmatically.your environment.

For full instructions and a sample ARG query, see theThe following Tech Community post: Exporting vulnerability assessment results in Microsoft Defender for Cloudquery returns individual software update recommendations for Azure virtual machines:

securityresources
| where type == "microsoft.security/assessments"
| where properties.resourceDetails.ResourceType =~ "microsoft.compute/virtualmachines"
| where properties.metadata.recommendationCategory == "SoftwareUpdate"
| extend DisplayName = tostring(properties.displayName)
| extend Severity = tostring(properties.metadata.severity)
| extend DetectedVersions = tostring(properties.additionalData.DetectedSoftwareVersions)
| extend FixedVersion = tostring(properties.additionalData.FixedVersion)
| extend CvesDetails = parse_json(tostring(properties.additionalData.CvesDetails))
| mv-expand CveDetail = CvesDetails
| extend CveId = tostring(CveDetail.CveId)
| project DisplayName, Severity, DetectedVersions, FixedVersion, CveId

The following example joins software update and service upgrade recommendations with CVE details so you can export the assessment and the extended CVE information together:

securityresources
| where type == "microsoft.security/assessments"
| where properties.metadata.recommendationCategory in ("SoftwareUpdate", "ServiceUpgrade")
| extend CvesDetails = parse_json(tostring(properties.additionalData.CvesDetails))
| mv-expand CveDetails = CvesDetails
| extend CveId = tostring(CveDetails.CveId)
| where isnotempty(CveId)
| project Assessment = tostring(properties.displayName), CveId, CveDetails
| join kind=inner (
    securityresources
    | where type =~ "microsoft.security/cvedetails"
    | extend CveId = tostring(properties.cveId)
    | project CveId, CveExtendedDetails = properties
) on CveId
| project Assessment, CveId, CveDetails, CveExtendedDetails

For more information about migrating Azure Resource Graph queries to individual recommendations, see Transition from grouped to individual recommendations.

Next steps