Attack surface reduction (ASR) rules are a set of built-in protections in Microsoft Defender that block specific behaviours attackers rely on, rather than specific pieces of malware. Examples include Office documents launching other programs, scripts downloading and running executables, and tools stealing credentials from the memory of the Windows security process (LSASS). Each rule can be switched off, set to audit (log only), set to warn (let the user decide, on some rules) or set to block.
They are among the most effective controls available to a Microsoft estate, because they stop techniques that many different attacks share. They are also among the most under-used, because organisations worry that turning them on will break something. This guide explains what each rule does and how to roll them out safely.
How ASR rules work
ASR rules are part of Microsoft Defender Antivirus and run on Windows 10, Windows 11 and supported versions of Windows Server. They need Defender Antivirus to be the active antivirus with real-time protection on. The rules themselves work wherever Defender Antivirus runs. Central reporting and advanced hunting on rule events come with Microsoft Defender for Endpoint.
Each rule watches for one pattern of behaviour. When a process does what the rule describes, Defender either records it (audit), shows the user a warning they can bypass (warn), or stops it (block). A rule doesn't care whether the file involved is known to be malicious. That is the point: a brand-new macro that tries to launch PowerShell is blocked in exactly the same way as a well-known one.
You configure the rules centrally, usually with Microsoft Intune or Group Policy, and you can exclude specific files or folders from individual rules where a legitimate application trips them.
The rules, grouped by what they stop
Microsoft's rules reference currently lists 19 rules. They fall into a few families.
Standard protection: turn these on first
Microsoft recommends three rules for almost every device because they rarely affect legitimate software:
- Block abuse of exploited vulnerable signed drivers. Stops known vulnerable drivers being written to disk, a technique used to switch off security tools. See our explainer on BYOVD attacks.
- Block credential stealing from the Windows local security authority subsystem. Stops processes reading credentials from LSASS memory, which is what Mimikatz and similar tools do.
- Block persistence through WMI event subscription. Stops a common way of making malware restart on its own.
Office and email
- Block all Office applications from creating child processes.
- Block Office applications from creating executable content.
- Block Office applications from injecting code into other processes.
- Block Win32 API calls from Office macros.
- Block Office communication application from creating child processes.
- Block executable content from email client and webmail.
- Block Adobe Reader from creating child processes.
These target the classic route from a phishing attachment to a running payload.
Scripts and untrusted executables
- Block JavaScript or VBScript from launching downloaded executable content.
- Block execution of potentially obfuscated scripts.
- Block executable files from running unless they meet a prevalence, age, or trusted list criterion.
- Block untrusted and unsigned processes that run from USB.
- Block use of copied or impersonated system tools.
Lateral movement, ransomware and servers
- Block process creations originating from PSExec and WMI commands.
- Use advanced protection against ransomware.
- Block rebooting machine in Safe Mode, a trick ransomware uses to get around security tools.
- Block Webshell creation for Servers. See our explainer on web shells.
Not every rule is supported on every version of Windows Server, and not every rule supports warn mode. Check the reference before you plan.
How to roll ASR rules out without breaking things
The approach that works is the same in almost every organisation: watch first, fix the exceptions, then block.
- Block the standard protection rules straight away. They are designed to be safe to enforce.
- Put everything else in audit mode across the estate for two to four weeks, long enough to cover month-end processes and the occasional application that only runs quarterly.
- Review what would have been blocked. Every audited event is recorded in Defender. The query below shows which rules fire most, on how many devices and for which programs.
- Fix or exclude the legitimate hits. Often the right fix is in the application or process, not an exclusion. Where an exclusion is needed, make it as narrow as possible: one file path for one rule, not a whole folder for all rules.
- Move to block in rings. Start with IT and security staff, then a pilot group, then everyone. Use warn mode as a stepping stone where the rule supports it.
- Keep watching. New software and updates can trip rules months later. Review blocked events regularly, not just during the rollout.
A starting query for reviewing ASR events
DeviceEvents
| where Timestamp > ago(30d)
| where ActionType startswith "Asr"
| extend Mode = case(ActionType endswith "Audited", "Audit", ActionType endswith "Blocked", "Block", ActionType endswith "WarnBypassed", "Warn bypassed", "Other")
| summarize Events = count(), Devices = dcount(DeviceId), TopPrograms = make_set(FileName, 5) by ActionType, Mode
| order by Events desc
Treat this as a starting point. Add the initiating process and folder path when you investigate a specific rule.
Exclusions: the part attackers care about
Exclusions are where ASR rollouts most often go wrong. A broad exclusion, such as a whole ProgramData folder or %TEMP%, gives attackers a safe place to work. Attackers know this. In the TrojanPony campaign we covered this week, the malware's first act was to add its own Defender exclusions for exactly those folders.
Good practice:
- Manage exclusions only through Intune or Group Policy, and stop local administrator settings from merging with them.
- Keep tamper protection on, so malware can't simply switch protections off.
- Prefer per-rule exclusions to global ones, and file paths to folders.
- Review the exclusion list on a schedule and remove anything nobody can justify.
- Alert when an exclusion is added outside your management tooling.
Where ASR rules fit
ASR rules reduce how many attacks succeed. They don't tell you when someone is trying, and they don't stop an attacker who uses only legitimate tools in permitted ways. They work best alongside application control, which decides which programs may run at all, and alongside detection and response that someone watches around the clock. A blocked event is also a signal: a burst of blocked Office child processes on one machine usually means a phishing attempt that deserves a closer look.
Frequently asked questions
Do ASR rules need Microsoft Defender for Endpoint?
The rules are a feature of Microsoft Defender Antivirus, so they work where Defender Antivirus is the active antivirus. Defender for Endpoint adds central reporting, advanced hunting on rule events and the ability to investigate what happened around a block.
Which ASR rules should I turn on first?
The three standard protection rules: vulnerable signed drivers, credential stealing from LSASS and WMI persistence. Then put the rest in audit mode and work through them by how often they fire.
Will ASR rules break Office macros?
They can break macros that launch other programs, write executables or call Windows APIs directly. That is why audit mode comes first. Most organisations find a small number of legitimate macros affected and either change them or add narrow exclusions.
What is the difference between audit, warn and block?
Audit records what would have been blocked and changes nothing. Warn shows the user a message and lets them continue, on rules that support it. Block stops the action and records it.
Do ASR rules work on Windows Server?
Most do, on supported versions with Defender Antivirus active. A few aren't supported on older server versions, and one, webshell creation, is specific to servers. Check Microsoft's reference for each rule.
Are ASR rules the same as application control?
No. Application control decides which programs may run. ASR rules decide what allowed programs may do. They complement each other.
How Wizard Cyber helps
We run Microsoft Sentinel and Defender as the core of our managed service, and ASR events feed into it like any other signal. Our SOCs are staffed 24/7, and CYBERSHIELD AI investigates each incident as it arrives, with an average time to verdict of 3 minutes 30 seconds and senior analyst sign-off by default. For help planning an ASR rollout, our Microsoft security consultancy team can help. To see the managed service, book a demo.