分享方式:


轉換至 Microsoft Defender 弱點管理

適用於雲端的 Microsoft Defender 會整合所有弱點評估解決方案,以利用 Microsoft Defender 弱點管理弱點掃描器。

Microsoft Defender 弱點管理會跨許多雲端原生使用案例整合,例如容器寄送和執行階段案例。 在這項變更的一部分,我們將淘汰由 Qualys 提供的內建弱點評估。

重要

由 Qualys 提供的適用於雲端的 Defender 容器弱點評量現已即將淘汰,將於 2024 年 3 月 1 日完成。

202 3 年 11 月 15 日之前,至少將一個適用於容器的 Defender 訂用帳戶上線的客戶,可以繼續使用由 Qualys 提供的容器弱點評估,直到 2024 年 3 月 1 日

如需變更的詳細資訊,請參閱適用於雲端的 Defender 統一由 Microsoft Defender 弱點管理所提供的弱點評估解決方案

如果您目前使用由 Qualys 支援的已建置弱點評估解決方案,請依照此頁面上的步驟開始規劃即將淘汰。

步驟 1:確認掃描已啟用

針對適用於容器的 Defender、適用於容器登錄的 Defender 和 Defender 雲端安全性狀態管理,預設會啟用由 Microsoft Defender 弱點管理所提供的容器弱點評估掃描。 停用的組織必須重新啟用其中一個方案中的無代理程式容器弱點評估切換。 這會自動反映任何已啟用上述計劃。

Screenshot of enabling “Agentless container vulnerability assessment” in settings.

如需啟用 Microsoft Defender 弱點管理掃描的詳細資訊,請參閱啟用由 Microsoft Defender 弱點管理所提供的弱點評估

步驟 2:停用 Qualys 建議

如果您的組織已準備好轉換至由 Microsoft Defender 弱點管理所提供的容器弱點評估掃描,且不再收到來自 Qualys 建議的結果,您可以繼續並停用 Qualys 掃描結果的建議報告。 以下是本指南中參考的建議名稱和評量金鑰。

Qualys 建議和評估金鑰

建議 描述 評量金鑰
Azure 容器登錄映像應該解決發現的弱點 (由 Qualys 提供) 容器映像弱點評定會掃描您的登錄,以判斷是否有安全性弱點,並公開每個映像的詳細結果。 解決這些弱點可以大幅改善容器的安全性狀態,並保護容器免於遭受攻擊。 dbd0cb49-b563-45e7-9724-889e799fa648
Azure 執行容器映像應該解決發現的弱點 (由 Qualys 提供) 容器映像弱點評定會掃描 Kubernetes 叢集上執行的容器映像,了解是否有任何安全性弱點,並公開每個映像的詳細發現。 解決這些弱點可以大幅改善容器的安全性狀態,並保護容器免於遭受攻擊。 41503391-efa5-47ee-9282-4eff6131462c

來自 Microsoft Defender 弱點管理的建議和評量金鑰

建議 描述 評量金鑰
Azure 登錄容器映像應已解決發現的弱點 (由 Microsoft Defender 弱點管理提供支援) - 預覽 容器映像弱點評量會掃描登錄中的常見已知弱點 (CVE),並提供每個映像的詳細弱點報告。 解決弱點可大幅改善您的安全性態勢,確保映像可安全使用再進行部署。 c0b7cfc6-3172-465a-b378-53c7ff2cc0d5
執行容器映像的 Azure 應已解決發現的弱點 (由 Microsoft Defender 弱點管理提供支援)   容器映像弱點評量會掃描登錄中的常見已知弱點 (CVE),並提供每個映像的詳細弱點報告。 此建議可讓您看見目前在 Kubernetes 叢集中執行的易受攻擊映像。 補救目前正在執行的容器映像中的弱點是改善安全性態勢的關鍵,可大幅降低容器化工作負載的受攻擊面。 c609cf0f-71ab-41e9-a3c6-9a1f7fe1b8d5

停用使用 Azure 商業雲端的 Qualys 建議

若要使用適用於雲端的 Defender UI 停用 Azure 商業雲端的上述 Qualys 建議:

  1. 在 Azure 入口網站中,瀏覽至 [適用於雲端的 Defender],然後開啟 [建議] 頁面。

    Screenshot showing Recommendations selection.

  2. 搜尋其中一個 Qualys 建議。

    Screenshot showing Search for one of the Qualys recommendations.

  3. 選擇建議,然後選取 [豁免]

    Screenshot showing how to select Exempt.

  4. 選取您想要豁免 Qualys 建議的管理群組或訂用帳戶。

    Screenshot showing the selection of the management group or subscriptions to exempt.

  5. 填寫其餘的詳細資料,然後選取 [建立]。 豁免最多需要等待 30 分鐘才會生效。

停用使用國家雲端的 Qualys 建議

若要使用適用於雲端的 Defender UI 停用上述國家雲端的 Qualys 建議 (由 21Vianet 運轉的 Azure Government 和 Azure):

  1. 移至 [環境設定],然後選取您想要停用建議的相關訂用帳戶。

    Screenshot showing how to select subscription in environment settings.

  2. 在 [設定] 窗格中,移至 [安全策略],然後選取方案指派。

    Screenshot of security policy settings.

  3. 搜尋 Qualys 建議,然後選取 [管理效果和參數]

    Screenshot of Qualys recommendation.

  4. 變更為停用

    Screenshot of disable button.

步驟 3:(選擇性) 更新 REST API 和 Azure Resource Graph 查詢

如果您目前透過 Azure Resource Graph (ARG) Rest API 或 Subassessment REST API 或 ARG 查詢,存取由 Qualyss 提供之容器弱點評估結果,您必須更新現有的查詢,以符合由 Microsoft Defender 弱點管理提供的新容器弱點評估所提供的新架構和/或 REST API。

下一節包含一些範例,可協助您了解 Qualys 支援供應項目的現有查詢應如何轉譯為與 Microsoft Defender 弱點管理所提供的對等查詢。

ARG 查詢範例

任何用於報告的 Azure Resource Graph 查詢都應該更新,以反映先前所列的 Microsoft Defender 弱點管理 assessmentKeys。 以下是可協助您轉換至 Microsoft Defender 弱點管理查詢的範例。

顯示狀況不良的容器映像

Qualys
securityresources
    | where type == "microsoft.security/assessments/subassessments"
    | extend assessmentKey = extract(".*assessments/(.+?)/.*",1,  id)
    | where assessmentKey == "dbd0cb49-b563-45e7-9724-889e799fa648"
    | project 
        Resource = tolower(extract(@'(?i)(.*?)/providers/Microsoft.Security/([^/]+)', 1, id)), 
        ResourceType = tolower(split(id,"/").[6]), 
        subscriptionId, 
        severity = properties.status.severity, 
        status = properties.status.code, 
        VulnId = properties.id, 
        description = properties.displayName, 
        patchable = properties.additionalData.patchable, 
        cve = properties.additionalData.cve, 
        Repo = properties.additionalData.repositoryName, 
        imageDigest = properties.additionalData.imageDigest
    | where status == 'Unhealthy' 
Microsoft Defender 弱點管理
securityresources
    | where type == "microsoft.security/assessments/subassessments"
    | extend assessmentKey = extract(".*assessments/(.+?)/.*",1,  id)
    | where assessmentKey == "c0b7cfc6-3172-465a-b378-53c7ff2cc0d5"
    | project 
        Resource = tolower(extract(@'(?i)(.*?)/providers/Microsoft.Security/([^/]+)', 1, id)), 
        ResourceType = tolower(split(id,"/").[6]), 
        subscriptionId, 
        severity = properties.additionalData.vulnerabilityDetails.severity, 
        status = properties.status.code, 
        VulnId = properties.id, 
        description = properties.description, 
        fixStatus = properties.additionalData.softwareDetails.fixStatus, 
        Repo = properties.additionalData.artifactDetails.repositoryName, 
        imageUri = properties.resourceDetails.id
    | where status == 'Unhealthy' 

顯示健康狀況的容器映像

Qualys
securityresources
    | where type == "microsoft.security/assessments/subassessments"
    | extend assessmentKey = extract(".*assessments/(.+?)/.*",1,  id)
    | where assessmentKey == "dbd0cb49-b563-45e7-9724-889e799fa648"
    | project 
        Resource = tolower(extract(@'(?i)(.*?)/providers/Microsoft.Security/([^/]+)', 1, id)), 
        ResourceType = tolower(split(id,"/").[6]), 
        subscriptionId, 
        status = properties.status.code, 
        Repo = properties.additionalData.repositoryName, 
        imageDigest = properties.additionalData.imageDigest
    | where status == 'Healthy'
Microsoft Defender 弱點管理
securityresources
    | where type == "microsoft.security/assessments/subassessments"
    | extend assessmentKey = extract(".*assessments/(.+?)/.*",1,  id)
    | where assessmentKey == "c0b7cfc6-3172-465a-b378-53c7ff2cc0d5"
    | project 
        Resource = tolower(extract(@'(?i)(.*?)/providers/Microsoft.Security/([^/]+)', 1, id)), 
        ResourceType = tolower(split(id,"/").[6]), 
        subscriptionId, 
        status = properties.status.code,
        Repo = properties.additionalData.artifactDetails.repositoryName, 
        imageUri = properties.resourceDetails.id
    | where status == 'Healthy' 

依嚴重性計算易受攻擊的映像

Qualys
securityresources
    | where type == "microsoft.security/assessments/subassessments"
    | extend assessmentKey = extract(".*assessments/(.+?)/.*",1,  id)
    | extend status = tostring(parse_json(properties).status.code)
    | extend severity = tostring(parse_json(properties).status.severity)
    | extend vulId=tostring((properties).id)
    | extend Resource = tolower(extract(@'(?i)(.*?)/providers/Microsoft.Security/([^/]+)', 1, id))
    | where assessmentKey == "dbd0cb49-b563-45e7-9724-889e799fa648"
    | where status == 'Unhealthy' 
    | distinct 
        vulId, 
        severity
    | summarize count=count() by tostring(severity)
Microsoft Defender 弱點管理
securityresources
    | where type == "microsoft.security/assessments/subassessments"
    | extend assessmentKey = extract(".*assessments/(.+?)/.*",1,  id)
    | extend severity = tostring(properties.additionalData.vulnerabilityDetails.severity)
    | extend status = tostring(parse_json(properties).status.code)
    | extend vulId=tostring((properties).id)
    | extend Resource = tolower(extract(@'(?i)(.*?)/providers/Microsoft.Security/([^/]+)', 1, id))
    | where assessmentKey == "c0b7cfc6-3172-465a-b378-53c7ff2cc0d5"
    | where status == 'Unhealthy' 
    | distinct 
        vulId, 
        severity
    | summarize count=count() by tostring(severity)

檢視 AKS 叢集上執行中易受攻擊映像的 Pod、容器和命名空間

Qualys
securityresources 
| where type =~ "microsoft.security/assessments/subassessments"
| extend assessmentKey = extract(@"(?i)providers/Microsoft.Security/assessments/([^/]*)", 1, id),
         subAssessmentId = tostring(properties.id),
         parentResourceId = extract("(.+)/providers/Microsoft.Security", 1, id)
| extend resourceId = extract(@'(?i)(.*?)@([^/]+)', 1,tostring(properties.resourceDetails.id))
| extend severity = tostring(parse_json(properties).status.severity)
| extend VulnId = tostring(parse_json(properties).id)
| extend status = tostring(parse_json(properties).status.code)
| where assessmentKey == "41503391-efa5-47ee-9282-4eff6131462c"
| extend resourceId = tostring(properties.resourceDetails.id),
         parsedJson = parse_json(tostring(properties.additionalData))
| extend containerData = parse_json(tostring(parsedJson.data.Containers))
| mv-expand containerDetails = containerData to typeof(dynamic)
| extend ContainerName = tostring(containerDetails.Name),
         ContainerPod = tostring(containerDetails.Pod.Name),
         Namespace = tostring(containerDetails.Pod.Namespace),
         ControllerType = tostring(containerDetails.Pod.ControllerType),
         ControllerName = tostring(containerDetails.Pod.ControllerName)
| where status == 'Unhealthy'
|project Image=resourceId, VulnId,severity, Namespace, ContainerName, ContainerPod,ControllerName,ControllerType

Microsoft Defender 弱點管理
securityresources 
| where type =~ "microsoft.security/assessments/subassessments"
| extend assessmentKey=extract(@"(?i)providers/Microsoft.Security/assessments/([^/]*)", 1, id)
| where assessmentKey == "c609cf0f-71ab-41e9-a3c6-9a1f7fe1b8d5" 
| extend azureClusterId = tostring(properties.additionalData.clusterDetails.clusterResourceId)
| extend cve =tostring(properties.id)
| extend status = properties.status.code
| extend severity=tostring(parse_json(properties).additionalData.vulnerabilityDetails.severity)
| where status == "Unhealthy"
| extend azureImageId = tostring(properties.resourceDetails.id)
| extend severity = tolower(properties.additionalData.vulnerabilityDetails.severity)
| extend kubernetesContext = properties.additionalData.kubernetesContext
| mv-expand workload = kubernetesContext.workloads
| mv-expand OwnedResource = workload.ownedResources
| mv-expand OwnedContainer = OwnedResource.containers                    
| mv-expand Container = workload.containers                    
| extend isController = isnotempty(workload.ownedResources)
| extend namespace =  tostring(workload.namespace)
| extend podName = iff(isController, tostring(OwnedResource.name), workload.name)
| extend containerName = iff(isController, tostring(OwnedContainer.name), Container.name)
| extend controllerName =  iff(isController, tostring(workload.name),"") 
| extend controllerType =  iff(isController, tostring(workload.kind),"")                       
| extend imageName = extract("(.+)@sha256:", 1, azureImageId) 
| project imageName, cve, severity, clusterId = azureClusterId, containerName, podName, controllerName, controllerType, namespace

步驟 4:(選擇性) 容器安全性報告

適用於雲端的 Microsoft Defender 透過 Azure 活頁簿提供現成的報告,包括容器安全性活頁簿。

Screenshot of Container Security workbook.

此活頁簿包含來自登錄和執行階段的容器弱點掃描結果。

Screenshot of workbook including container vulnerability scanning results.

活頁簿提供 Qualys 和 Microsoft Defender 弱點管理掃描的結果,提供 Azure 登錄容器映射內偵測到之弱點的完整概觀。 容器安全性活頁簿提供下列容器弱點評估的優點:

  • 雙重掃描器整合:使用者可以輕鬆地在單一報告中比較這兩個掃描儀的結果,而 Qualys 結果仍可供使用。 篩選也允許著重特定容器登錄或叢集的結果。

  • 所有弱點概觀:檢視在 Azure 容器登錄中偵測到的所有弱點,並在 AKS 叢集上執行。

  • 惡意探索弱點儀表板:專用區段,強調已知惡意探索的弱點,讓安全性小組能夠專注於有高風險惡意探索的弱點。 僅搭配由 Microsoft Defender 弱點管理所提供的容器弱點評量的掃描可用。

    Screenshot of exploitable vulnerabilities dashboard.

  • 其他 ARG 查詢:您可以使用此活頁簿來檢視更多範例,了解如何查詢 Qualys 與 Microsoft Defender 弱點管理之間的 ARG 資料。 如需如何編輯活頁簿的詳細資訊,請參閱適用於雲端的 Microsoft Defender 中的活頁簿資源庫。

下一步