Microsoft Defender for Endpoint中的故障排除模式入门

适用于:

Microsoft Defender for Endpoint 中的故障排除模式使管理员能够对各种Microsoft Defender防病毒功能进行故障排除,即使设备由组织策略管理也是如此。 例如,如果启用了 篡改防护 ,则无法修改或关闭 某些设置 ,但可以在设备上使用故障排除模式来临时编辑这些设置。

默认情况下,故障排除模式处于禁用状态,并且要求你在有限时间内为) 的设备 (和/或设备组启用它。 故障排除模式是一项仅限企业的功能,需要Microsoft Defender门户访问权限。

本文介绍 Windows 设备的故障排除模式。 有关 Mac 上的故障排除模式的信息,请参阅 macOS 上 Microsoft Defender for Endpoint 中的故障排除模式

提示

开始前,有必要了解什么?

在故障排除模式下,可以使用 PowerShell 命令 Set-MPPreference -DisableTamperProtection $true ,或者在客户端作系统上使用安全中心应用在设备上暂时禁用篡改保护并进行必要的配置更改。

可以使用故障排除模式来排查或检查应用程序与 Microsoft Defender 防病毒的兼容性,例如当应用程序块出现误报时。

使用适当的权限,本地管理员可以更改通常由策略锁定的单个设备上的配置。 在诊断Microsoft Defender防病毒性能和兼容性方案时,让设备处于故障排除模式可能会有所帮助。 本地管理员无法关闭Microsoft Defender防病毒,也无法卸载它。 本地管理员可以在 Microsoft Defender 防病毒套件中配置所有其他安全设置, (例如云保护、篡改防护) 。

管理员必须具有“管理安全设置”权限才能打开故障排除模式。

Defender for Endpoint 在整个故障排除过程中收集日志和调查数据。

  • 在故障排除模式开始之前,将执行 快照MpPreference
  • 在故障排除模式过期之前执行第二个快照。
  • 还会在故障排除模式下收集作日志。
  • 日志和快照已收集,管理员可使用设备页上的“ 收集调查包 ”功能收集日志和快照。 在管理员收集这些数据之前,Microsoft不会从设备中删除此数据。

管理员还可以查看在设备本身上的事件查看器故障排除模式下发生的设置更改。

故障排除模式在达到其过期时间后自动关闭, (它持续 4 小时) 。 故障排除模式过期后,所有策略托管的配置将再次变为只读,并还原启用故障排除模式之前设备的配置方式。

从命令从 Microsoft Defender XDR 发送到在设备上处于活动状态时,最长可能需要 15 分钟的时间。

故障排除模式开始和故障排除模式结束时,会向用户发送通知。 还会发送警告,指示故障排除模式即将结束。 故障排除模式的开始和结束也在Microsoft Defender门户中“设备时间线”页上标识。

可以在高级搜寻中查询所有故障排除模式事件。

注意

当设备处于故障排除模式时,策略管理更改将应用于设备。 但是,在故障排除模式过期之前,更改才会生效。 此外,Microsoft Defender防病毒平台更新不会在故障排除模式下应用。 当故障排除模式以 Windows 更新结束时,将应用平台更新。

先决条件

启用故障排除模式

  1. 转到Microsoft Defender门户并登录。

  2. 导航到要打开故障排除模式的设备的设备页/计算机页。 选择“ 启用故障排除模式”。 对于Microsoft Defender for Endpoint,必须具有“在安全中心管理安全设置”权限

    打开故障排除模式

    注意

    打开故障排除模式 ”选项在所有设备上都可用,即使设备不符合故障排除模式的先决条件也是如此。

  3. 确认要为设备启用故障排除模式。

    配置浮出控件

  4. 设备页显示设备现在处于故障排除模式。

    设备现在处于故障排除模式

高级搜寻查询

下面是一些预生成的高级搜寻查询,可让你了解环境中发生的故障排除事件。 还可以使用这些查询 创建检测规则 ,以在设备处于故障排除模式时生成警报。

获取特定设备的故障排除事件

通过注释掉相应的行,按 deviceId 或 deviceName 进行搜索。

//let deviceName = "<deviceName>";   // update with device name
let deviceId = "<deviceID>";   // update with device id
DeviceEvents
| where DeviceId == deviceId
//| where DeviceName  == deviceName
| where ActionType == "AntivirusTroubleshootModeEvent"
| extend _tsmodeproperties = parse_json(AdditionalFields)
| project Timestamp,DeviceId, DeviceName, _tsmodeproperties,
 _tsmodeproperties.TroubleshootingState, _tsmodeproperties.TroubleshootingPreviousState, _tsmodeproperties.TroubleshootingStartTime,
 _tsmodeproperties.TroubleshootingStateExpiry, _tsmodeproperties.TroubleshootingStateRemainingMinutes,
 _tsmodeproperties.TroubleshootingStateChangeReason, _tsmodeproperties.TroubleshootingStateChangeSource

当前处于故障排除模式的设备

DeviceEvents
| where Timestamp > ago(3h) // troubleshooting mode automatically disables after 4 hours 
| where ActionType == "AntivirusTroubleshootModeEvent"
| extend _tsmodeproperties = parse_json(AdditionalFields)
| where _tsmodeproperties.TroubleshootingStateChangeReason contains "started"
|summarize (Timestamp, ReportId)=arg_max(Timestamp, ReportId), count() by DeviceId
| order by Timestamp desc

按设备统计的故障排除模式实例计数

DeviceEvents
| where ActionType == "AntivirusTroubleshootModeEvent"
| extend _tsmodeproperties = parse_json(AdditionalFields)
| where Timestamp > ago(30d)  // choose the date range you want
| where _tsmodeproperties.TroubleshootingStateChangeReason contains "started"
| summarize (Timestamp, ReportId)=arg_max(Timestamp, ReportId), count() by DeviceId
| sort by count_

总计计数

DeviceEvents
| where ActionType == "AntivirusTroubleshootModeEvent"
| extend _tsmodeproperties = parse_json(AdditionalFields)
| where Timestamp > ago(2d) //beginning of time range
| where Timestamp < ago(1d) //end of time range
| where _tsmodeproperties.TroubleshootingStateChangeReason contains "started"
| summarize (Timestamp, ReportId)=arg_max(Timestamp, ReportId), count()
| where count_ > 5          // choose your max # of TS mode instances for your time range

提示

想要了解更多信息? Engage技术社区中的Microsoft安全社区:Microsoft Defender for Endpoint技术社区