本文說明如何在 macOS 上的 適用於端點的 Microsoft Defender 啟用故障排除模式,讓管理員能暫時排查各種 Microsoft Defender 防毒功能,即使組織政策已管理裝置。
例如,如果啟用了防篡改保護,某些設定無法修改或關閉,但你可以在裝置上使用故障排除模式暫時編輯這些設定。
故障排除模式預設是關閉的,且需要你在有限時間內為裝置 (或一組裝置) 開啟。 故障排除模式僅限企業使用,且需存取 Microsoft Defender 入口網站。
在開始之前你需要知道什麼
在故障排除模式中,您可以:
在 macOS 上用 適用於端點的 Microsoft Defender 功能故障排除/應用程式相容性 (誤報) 。
本地管理員在適當權限下,可以在個別端點更改以下政策鎖定的設定:
設定 啟用 停用/移除 Real-Time 保護/被動模式/隨選 mdatp config real-time-protection --value enabledmdatp config real-time-protection --value disabled網路保護 mdatp config network-protection enforcement-level --value blockmdatp config network-protection enforcement-level --value disabled即時保護統計 mdatp config real-time-protection-statistics --value enabledmdatp config real-time-protection-statistics --value disabled標記 mdatp edr tag set --name GROUP --value [name]mdatp edr tag remove --tag-name [name]群組ID mdatp edr group-ids --group-id [group]端點 DLP mdatp config data_loss_prevention --value enabledmdatp config data_loss_prevention --value disabled
在故障排除模式中,你不能:
- 在 macOS 上關閉 適用於端點的 Microsoft Defender 的防篡改功能。
- 在 macOS 上卸載 適用於端點的 Microsoft Defender。
必要條件
- 支援 macOS 版本,適用於 適用於端點的 Microsoft Defender。
- 適用於端點的 Microsoft Defender 必須是租戶註冊且裝置上啟用。
- 適用於端點的 Microsoft Defender 中「管理安全設定於 Security Center」的權限。
- 平台更新版本: 101.23122.0005 或更新版本。
在 macOS 上啟用故障排除模式
前往 Microsoft Defender 入口網站並登入。
請前往你想開啟故障排除模式的裝置頁面。 接著,選擇省略號 (...) ,並選擇 開啟故障排除模式。
注意事項
「開啟故障排除模式」選項在所有裝置上皆可用,即使該裝置不符合故障排除模式的先決條件。 更多資訊請參閱本文後面的「 故障排除模式問題 」章節。
閱讀面板上顯示的資訊,準備好後選擇 提交 ,確認你想開啟該裝置的故障排除模式。
你會看到, 變更生效可能需要幾分鐘 ,顯示文字。 在此期間,當你再次選擇省略號時,會看到「 開啟故障排除」選項 會顯示為灰色。
完成後,裝置頁面顯示該裝置已進入故障排除模式。
如果終端使用者在 macOS 裝置上登入,他們會看到以下文字:
故障排除模式已開始。 此模式允許您暫時更改由管理員管理的設定。 到期時間為 YEAR-MM-DDTHH:MM:SSZ。
選取 [確定]。
啟用後,你可以測試在故障排除模式 (TS 模式) 中可切換的不同命令列選項。
例如,當你用
mdatp config real-time-protection --value disabledCommand 關閉即時保護時,系統會提示你輸入密碼。 輸入密碼後選擇 確定 。
輸出報告與以下截圖相似,會在執行 mdatp 健康
real_time_protection_enabled時以「false」和tamper_protection「block」顯示。
進階偵測搜尋查詢
有一些預先建構的進階搜尋查詢,可以讓你了解環境中正在發生的故障排除事件。 你可以利用這些查詢 建立偵測規則 ,當裝置進入故障排除模式時產生警示。
取得特定裝置的故障排除事件
你可以用以下查詢來搜尋 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
故障排除模式的問題
如果你無法啟用故障排除模式,請在目標 Mac 上執行以下故障排除步驟:
請執行以下指令驗證應用程式版本:
mdatp health --field app_version mdatp health --field edr_client_version如前所述,你需要平台更新版本: 101.23122.0005 或更新版本。
請執行以下指令驗證裝置已註冊且已啟用:
mdatp health --field edr_machine_id mdatp connectivity test所有端點都應該顯示 [OK]。
請執行以下指令驗證設定來源:
mdatp health --field managed_byMDE 表示 適用於端點的 Microsoft Defender Attach,並優先執行。 MEM 代表 Microsoft Intune 或 Apple Jamf。
驗證所需的配置檔路徑:
- /Library/Preferences/com.microsoft.mdeattach.plist
- /Library/Managed Preferences/com.microsoft.wdav*.plist
要提升日誌並收集診斷資料,請執行以下指令,然後嘗試再次啟用故障排除模式:
sudo mdatp log level set --level debug
sudo mdatp diagnostic create
sudo mdatp log level set --level info
推薦內容
- Microsoft Defender 全面偵測回應 Mac 端點
- Microsoft Defender 全面偵測回應 用於端點整合與 Microsoft Defender 全面偵測回應 for Cloud Apps
- 了解 Microsoft Edge 的創新功能
- 保護您的網路
- 開啟網路保護
- Web 保護
- 建立指示器
- Web 內容篩選
提示
想要深入了解? Engage 與 Microsoft Security 社群互動,加入我們的技術社群:適用於端點的 Microsoft Defender Defender 技術社群。