你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft Defender for Cloud 提供安全建议,以提高组织安全状况并降低风险。 降低风险的一个重要环节是机器加固。
Defender for Cloud 可根据 Microsoft 云安全基准 (MCSB) 提供的计算安全基线来评估操作系统设置。 通过计算机上的 Azure Policy 计算机配置扩展(以前称为来宾配置)收集计算机信息以供评估。 有关详细信息,请参阅Defender for Cloud 中的操作系统配置错误。
本文解释了如何审查和纠正OS基线评估中的建议。
先决条件
在审查和修复操作系统基线建议之前,确保满足以下先决条件。
| Requirements | 详细信息 |
|---|---|
| Plan | 必须启用 Defender for Servers 计划 2 |
| 扩展 | Azure Policy 计算机配置必须安装在计算机上。 |
此功能此前使用Microsoft监控代理(MMA)收集数据。 如果MMA仍在使用,你可能会看到重复的推荐。 为了避免重复,请 禁用机器上的MMA。
查看并修正 OS 基线建议
审查和修正操作系统(OS)基线建议:
在 Defender for Cloud 中,打开“建议”页。
选择相关建议。
对于 Windows 计算机,应修复你的 Windows 计算机中安全配置方面的漏洞(由 Guest Configuration 提供支持)。
对于 Linux 机器,应修复 Linux 机器上的安全配置漏洞(由 Guest Configuration 提供支持)
在“建议详细信息”页上,查看受影响的资源和特定的安全发现。
若要完成修复,请参阅 如何修正安全建议。
查询建议
Defender for Cloud使用 Azure Resource Graph 进行应用程序编程接口(API)和门户查询。 你可以使用 Azure Resource Graph 及其查询接口创建自己的查询并获取推荐信息。
可以了解如何在 Azure Resource Graph 中查看建议。
以下是您可以使用的两个示例查询:
查询特定资源的所有异常规则
Securityresources | where type == "microsoft.security/assessments/subassessments" | extend assessmentKey=extract(@"(?i)providers/Microsoft.Security/assessments/([^/]*)", 1, id) | where assessmentKey == '1f655fb7-63ca-4980-91a3-56dbc2b715c6' or assessmentKey == '8c3d9ad0-3639-4686-9cd2-2b2ab2609bda' | parse-where id with machineId:string '/providers/Microsoft.Security/' * | where machineId == '{machineId}'所有不健康规则及每条规则对应的不健康计算机数量
securityresources | where type == "microsoft.security/assessments/subassessments" | extend assessmentKey=extract(@"(?i)providers/Microsoft.Security/assessments/([^/]*)", 1, id) | where assessmentKey == '1f655fb7-63ca-4980-91a3-56dbc2b715c6' or assessmentKey == '8c3d9ad0-3639-4686-9cd2-2b2ab2609bda' | parse-where id with * '/subassessments/' subAssessmentId:string | parse-where id with machineId:string '/providers/Microsoft.Security/' * | extend status = tostring(properties.status.code) | summarize count() by subAssessmentId, status