Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Microsoft 365 Foundations v7.0.0 · 2.1.11

Anti-malware policies should block a broad list of risky attachment file types

  • E3 Level 2
  • Microsoft Defender
  • Automated check

This check looks at the common attachments filter in your Exchange Online anti-malware policies and whether it is switched on with a wide list of executable and script-style file types. The safe setting is a filter that is enabled and covers more than the defaults, so risky files are rejected or quarantined before they reach a mailbox.

Why it matters

Email is still the easiest way to put a harmful file in front of a user. Malware engines catch known samples, but a file type that people rarely need in business mail (scripts, disk images, installers, shortcut files) is a poor trade: very little legitimate value, a lot of risk. The common attachments filter removes the question. A message that carries one of the listed types never lands in the mailbox, whatever the engine thinks of the content.

Microsoft describes the filter as part of anti-malware policies: when it is on, messages with the chosen attachment types are rejected with a non-delivery report by default, or quarantined if you pick that action. The filter only helps as much as its list. The default list is a starting point, so this check asks for a list that was deliberately widened for your organisation.

Sources: Configure anti-malware policies (Microsoft Learn).

How to check it yourself

Portal: in the Microsoft Defender portal go to Email & collaboration > Policies & rules > Threat policies > Anti-malware. Open each policy, and look at the protection settings for Enable the common attachments filter, the selected file types, and the action taken when a type is found.

Read-only command (Exchange Online PowerShell, a Security Reader or Global Reader account is enough):

Connect-ExchangeOnline
Get-MalwareFilterPolicy |
  Format-Table Name, EnableFileFilter, FileTypeAction, @{n='FileTypes';e={$_.FileTypes.Count}}
Get-MalwareFilterRule | Format-Table Name, State, Priority, MalwareFilterPolicy

Look for EnableFileFilter set to True and a file-type list that is clearly longer than what a fresh tenant ships with. Also look at the rules: a policy only matters for the people a rule applies to, and recipients covered by the Standard or Strict preset security policies use those policies instead.

How to fix it

Portal: in the Anti-malware page, open the default policy (or the policy that applies to the people you want to cover), choose Edit protection settings, tick Enable the common attachments filter, choose Select file types and add the types your users never need to receive, then pick Reject the message with a non-delivery report or Quarantine the message. Save.

Script (run by an administrator; ConfigCobra itself only reads and never changes your tenant). The file-type list in the portal is the authoritative list of what Exchange accepts, so choose values from it:

$p = Get-MalwareFilterPolicy -Identity Default
$extra = 'iso','img','vhd','jar','msi','wsf'
$new = ($p.FileTypes + $extra) | Sort-Object -Unique
Set-MalwareFilterPolicy -Identity Default -EnableFileFilter $true -FileTypes $new

The command writes the combined list back, so existing entries are kept. Test with a harmless file of a newly blocked type first.

What changes when you fix it

Everyone covered by the policy stops receiving mail that carries a listed file type. With the default action the sender gets a non-delivery report, so a supplier who emails an installer or a disk image will find out immediately and ask for another route. With the quarantine action, an administrator sees the message in quarantine and decides.

Before widening the list, ask the teams that exchange unusual files (IT, developers, design, finance with legacy tools) which types they really use, and agree an alternative such as a shared link. Because the filter runs on inbound mail, nothing already in a mailbox is removed.

Included in

BenchmarkCIS IDProfile
CIS Microsoft 365 Foundations v7.0.02.1.11E3 Level 2

Check this on your Microsoft 365

ConfigCobra runs this check with every other control of the CIS Microsoft 365 Foundations Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial