Microsoft Defender for Endpoint
Endpoint protection

Behavior monitoring in Microsoft Defender Antivirus

In brief

The article now explains real-time detection, dynamic analysis, response and remediation, and identifies Antimalware and Network protection features that depend on behavior monitoring. It also updates configuration-tool guidance and adds verification and performance-troubleshooting context.

What Defender admins need to know

Administrators can use the revised guidance to understand dependencies, manage behavior monitoring, and troubleshoot performance while keeping the default, tamper-protected setting enabled.

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.

Behavior monitoring in Microsoft Defender Antivirus

Behavior monitoring is a critical Microsoft Defender Antivirus detection and protection functionality of Microsoft Defender Antivirus.

Monitors process behavior to detectcapability. It observes process, file, and analyze potentialservice activity in real time and detects threats based on the behavior of applications, services, and files. Rather than relying solely on signature-based detection (which identifiesfrom suspicious behavior, including threats that don't match known malware patterns),signatures.

How behavior monitoring focuses on observing how software behaves in real-time. Here's what it entails:
  1. works

Real-Time Threat Detection:Behavior monitoring uses these approaches to identify and stop suspicious activity:

  • Real-time threat detection: Continuously observeobserves processes, file system activities,activity, and interactions withinon the system.
  • device. For example, Microsoft Defender Antivirus can identifydetect unusual file changes or attempts to create or modify autostart extensibility point (ASEP) registry keys.
  • Dynamic analysis: Uses known behavior patterns associated with malware or other threats. For example, it looks for processes making unusual changesand anomaly detection to existing files, modifying or creating automatic startup registry (ASEP) keys, and other alterations to the file system or structure.
  • Dynamic Approach:

    • Unlike static, signature-based detection, behavior monitoring adapts toidentify new and evolving threats.threats while software runs.

    • Microsoft Defender Antivirus uses predefined patterns,Response and observes how software behaves during execution. For malware that doesn't fit any predefined pattern, Microsoft Defender Antivirus uses anomaly detection.

    • Ifremediation: Takes action when a program shows suspicious behavior (for example,behaves suspiciously, such as attempting to modify critical system files), Microsoft Defender Antivirus can take action to prevent further harm, and revert some previous malware actions.files.

    Behavior monitoring enhances Defender Antivirus's ability to proactively detect emerging threats by focusing on real-time actions and behaviors rather than relying solely on known signatures.

    Theis required for the following features depend on behavior monitoring.

    Anti-malware:features:

    • Indicators,Antimalware: File hash, allow/hash allow and block indicators.

  • Network Protectionprotection:
    • Indicators, IP address/URL, allow/address and URL allow and block
    • Web Content Filtering, allow/block indicators, and web content filtering.

    Change the behavior monitoring policy

    Use one of the following management tools to configure behavior monitoring.

    Management tool Setting Documentation
    Defender for Endpoint security settings management Allow behavior monitoring Manage Microsoft Defender Antivirus through security settings management
    CSPMicrosoft IntuneAllow behavior monitoringMicrosoft Defender Antivirus policy settings for Windows
    Configuration service provider (CSP) AllowBehaviorMonitoring Defender Policy CSPDefender Policy CSP
    Configuration Manager Tenant Attachtenant attach Turn on behavior monitoring Windows Antivirus policy settings from Microsoft Defender Antivirus for tenant attached devicesMicrosoft Defender Antivirus policy settings for tenant-attached devices
    Group Policy Turn on behavior monitoring Download Group Policy Settings Reference Spreadsheet for Windows 11 2023 Update (23H2)Configure Microsoft Defender Antivirus with Group Policy
    PowerShell Set-MpPreference -DisableBehaviorMonitoringDisableBehaviorMonitoring Set-MpPreference
    WMIWindows Management Instrumentation (WMI) boolean DisableBehaviorMonitoring;DisableBehaviorMonitoring MSFT_MpPreference class

    If you use Microsoft Defender for Business, see Review or edit your next-generation protection policies in Microsoft Defender for Business.

    Modify the behavior monitoring settings by using PowerShell

    UseTo enable behavior monitoring, run the following command to modify the behavior monitoring settings:in an elevated PowerShell session (a PowerShell window you opened by selecting Run as administrator):

    Set-MpPreference -DisableBehaviorMonitoring <true | false>$false
    
    • To temporarily disable behavior monitoring for troubleshooting, run the following command in an elevated PowerShell session:

      TrueSet-MpPreference -DisableBehaviorMonitoring $true
       disables Behavior monitoring.
    • False enables Behavior monitoring.

    Changes made with PowerShell affect the local device. Policies deployed through Defender for Endpoint security settings management, Microsoft Intune, Configuration Manager tenant attach, or Group Policy can overwrite local changes.

    For more information, see Set-MpPreference.

    Query the behavior monitoring status from PowerShell

    Run the following command to display the current behavior monitoring status:

    Get-MpComputerStatus | Format-Table BehaviorMonitorEnabled
    

    If the value returned iscommand returns trueTrue, behavior monitoring is enabled.

    Query the behavior monitoring status by using Advanced Hunting

    You can use Advanced Hunting (AH) to query the status of behavior monitoring.

    Requires Microsoft Defender,Organizations with Microsoft Defender for Endpoint Plan 2,2 or Microsoft Defender for Business.Business can use advanced hunting to query behavior monitoring status. The query uses the DeviceTvmSecureConfigurationAssessment table in Defender advanced hunting. This method doesn't apply to Defender for Endpoint Plan 1 or Microsoft Defender for Individuals.

    let EvalTable = DeviceTvmSecureConfigurationAssessment
    
    ## Troubleshooting high CPU usage
    
    Detections related to behaviorBehavior monitoring start with "[Behavior]detections use the [`Behavior` malware naming type](/unified-secops-platform/malware-naming#type)".
    
    When investigatingUse the [Microsoft Defender Antivirus Performance Analyzer](tune-performance-defender-antivirus.md) to identify files, file extensions, and processes that contribute to high CPU usage in `MsMpEng.exe`. Start a recording with **New-MpPerformanceRecording**, you canreproduce the issue, and analyze the recording with **Get-MpPerformanceReport**.
    
    If the results indicate that behavior monitoring might contribute to the issue, use a controlled test to confirm the cause:
    
    1. For eligible enterprise devices, [enable troubleshooting mode](enable-troubleshooting-mode.md) to temporarily change tamper-protected settings.
    1. Temporarily turn off tamper protection, and then disable behavior monitoring.
    1. Reproduce the performance issue for the shortest practical period.
    1. Re-enable behavior monitoring and tamper protection immediately after the test.
    
    Troubleshooting mode is a Defender for Endpoint enterprise feature and doesn't apply to see ifMicrosoft Defender for Individuals.
    
    If disabling behavior monitoring resolves the issues continue.
    
    You canissue, use the Performance analyzer forAnalyzer results to isolate the affected path, file, or process. If the issue started after a Microsoft Defender Antivirus update, follow the documented procedures to find **\path\process**, **process** and/[roll back platform, engine, or **file extensions** that are contributing to the high cpu utilization. You can then add these items to [Contextual Exclusion]security intelligence updates](microsoft-defender-antivirus-exclusions-overview.md#contextual-exclusions)updates.md#how-to-roll-back-an-update). For more information, see [Performance analyzer for Microsoft Defender Antivirus](tune-performance-defender-antivirus.md).
    
    If you're seeing high CPU usage caused by behavior monitoring, continue troubleshootingRoll back only the issue by reverting eachcomponent suspected of causing the following items in order. Re-issue, and re-enable behavior monitoring after reverting each item to identify wheretest.
    

    If you can're still encountering high t isolate the cause, use the Microsoft Defender for Endpoint Client Analyzer with the MDEClientAnalyzer.cmd -a option to collect Defender Antivirus high-CPU usage issues,tracing data, and then contact Microsoft support and have your Client Analyzer data ready. If behavior monitoring isn't causing the issue, use [Performance analyzer for Microsoft Defender Antivirus](tune-performance-defender-antivirus.md) to collect log information. Collect two different logs using `a -c` and `a -a`. Have this information ready when you contact Microsoft support. For more information, see [Data collection for advanced troubleshooting on Windows](data-collection-analyzer.md). Support.