_______________________________________________________ John Barbare and Tan Tran
Dear IT Pros,
We discuss about Microsoft Defender for Endpoint Antivirus Configuration, Policy and exclusion list in detail to avoid making the common mistakes and to apply the best practice to it.
Best Practices for AV Policy Settings:
- You may wonder what is the best Scan types for your daily scheduled scan on all systems, the Full Scan is for investigation of virus attack on the system, for the weekly or daily scheduled scan, it should be good and sufficient with quick scan.
- Make different Endpoint Configuration Manager AV policies for different device types and deploy the related policies to the corresponding collections, SQL Server Collection, IIS Server Collection, Restricted Workstation Collection, Standard Workstation Collection
Example of AV Policies for different Servers and Workstation types:
- Antivirus Exclusion recommendation from Microsoft Defender Team:
DisableCpuThrottleOnIdleScans (Feature available on Windows 10 20H2)
This setting indicates whether the CPU will be throttled for scheduled scans while the device is idle.
- This parameter is enabled by default, thus ensuring that the CPU will not be throttled for scheduled scans performed when the device is idle, regardless of what ScanAvgCPULoadFactor is set to.
- DisableCpuThrottleOnIdleScans will override the value (5-100% CPU time) set by ScanAvgCPULoadFactor
An Example of CPU throttling controlled by MCM or by MEM:
- In my Lab, the on-demand fullscan also been impacted by non-throttling status too.
On the test device Windows 10 version 20H2 with the setting DisableCpuThrottleOnIdleScans turn on:
> Set-MpPreference -DisableCpuThrottleOnIdleScans $False
> Run on-demand full scan, Start-MpScan -ScanType FullScan
With the setting to allow CPU without Throttling , my computer did have CPU Spike from 11% before now it grows to more than 70%, 80%, 95% in a short period of 1-2 minutes.
We just need to disable in the related Registry Key of Windows Defender Scan or by powershell command in the device.
Registry Key for the setting,
Antivirus Exclusion mistakes
Antivirus Exclusion could be helpful or harmful if we set Antivirus to skip the threat in files and process. The common misconception could be named a few.
- Exclude process which is the frontline interfaced to threat like MS Word, MS Outlook , Java Engine or Acrobat Reader.
- Exclude Cabinet, compress file .zip, .tar, .cab, .7ip from AV Scan, they could contain threat source.
- User Profile temp folder, System temp folder where the malicious file may locate as its base:
- Use of environment variables as a wildcard in exclusion lists is limited to system variables, do not use user environment variables when adding Microsoft Defender Antivirus folder and process exclusions.
Grey Area of Exclusion:
Image files: You can chose to exclude file types, such as .gif, .jpg, .jpeg, .png if your environment has a modern, up-to-date software with a strict update policy to handle any vulnerabilities.
Missing MDE (Microsoft Defender for Endpoint) exclusion
- If you need to apply exclusion for threat detected by Defender for Endpoint Cloud Service, use the related exclusion.
- Microsoft Defender Antivirus exclusions don’t apply to other Microsoft Defender for Endpoint capabilities, including endpoint detection and response (EDR), attack surface reduction (ASR) rules, and controlled folder access.
- To exclude files broadly, add them to the Microsoft Defender for Endpoint custom indicators.
- To exclude files, folders in MDE
Example of Defender for Endpoint – MDE Exclusion from investigation scans:
> SettingsAutomation folder exclusions
> New Folder exclusion
> Add multiple folder exclusions as per our needs:
Default Exclusion on Newer Server Version (2016 and 2019)
On Server 2016, 2019, the automatic exclusion helps in prevention of unwanted CPU spike during real-time scanning, it is additional to your custom exclusion list and it is kind of smart scan with exclusion based on server role such as DNS, AD DS, Hyper-V host, File Server, Print Server, Web Server, etc.
- Your Custom exclusions take precedence over automatic exclusions.
- Automatic exclusions only apply to Real-time protection (RTP) scanning. Automatic exclusions are not honored during a Full/Quick or On-demand scan.
- Custom and duplicate exclusions do not conflict with automatic exclusions.
- Microsoft Defender Antivirus uses the Deployment Image Servicing and Management (DISM) tools to determine which roles are installed on your computer and apply the appropriate automatic exclusions.
The Discussion about Antivirus Configuration best practice could not be ended here, it might be our on-going attention and practice. I will continue updating this article based on your feedback.
Until next time.