Attack surface reduction rules

On this page 7

Attack surface reduction rules are behavior-based policies in Microsoft Defender Antivirus that block specific actions commonly abused by malware, such as Office documents launching child processes, scripts running obfuscated code or untrusted programs reading credentials from the LSASS process. In Windows security, they sit between signature-based antivirus and application control: they do not decide whether a file is malicious, but whether a risky behavior is allowed at all.

Each rule targets one technique, has its own identifier and can be set independently to block, audit, warn or off. Because legitimate software sometimes performs the same actions, deploying the rules is as much a testing and exclusion exercise as a security decision.

How attack surface reduction rules work

The rules are enforced by the Defender Antivirus engine in real time, so they require Defender Antivirus to be the active antivirus product with real-time protection enabled. When a monitored action occurs, such as WINWORD.EXE trying to start powershell.exe, the engine evaluates the rule and either stops the action or logs it.

Every rule is identified by a GUID and receives one of four states. The state determines whether users notice anything and whether administrators get usable evidence before enforcing.

StateValueEffect on the actionTypical use
Not configured or disabled0Action allowed, nothing loggedRule not in scope
Block1Action stopped, event loggedProduction enforcement
Audit2Action allowed, event loggedTesting impact before blocking
Warn6User sees a prompt and may unblockGradual rollout for some rules
Rule states and their effect

Blocked and audited events are written to the Microsoft-Windows-Windows Defender/Operational log, with event ID 1121 for blocks and event ID 1122 for audits. With Microsoft Defender for Endpoint, the same events appear centrally in the security portal with reporting and advanced hunting.

Important rules and what they stop

Microsoft groups a few rules as standard protection rules that have minimal compatibility impact and can usually be blocked immediately. The rest should go through an audit phase. The table lists widely used rules.

RuleTechnique it blocksCompatibility risk
Block credential stealing from LSASSMemory reads of the LSASS processLow
Block abuse of exploited vulnerable signed driversLoading of known vulnerable driversLow
Block persistence through WMI event subscriptionWMI-based persistenceLow
Block all Office applications from creating child processesMacro droppers starting programsMedium
Block Win32 API calls from Office macrosMacros calling system functionsMedium
Block execution of potentially obfuscated scriptsEncoded or packed scriptsMedium
Block executable files unless they meet prevalence, age or trusted list criteriaRare, new executablesHigh
Block process creations from PSExec and WMI commandsLateral movement toolsHigh on managed fleets
Selected attack surface reduction rules

The prevalence-based rule and the PSExec and WMI rule are the most likely to break management tools and internal software, so they deserve the longest audit period. The ransomware protection rule relies on cloud-delivered protection and also needs careful testing.

Attack surface reduction is a family name in Microsoft documentation that also covers several separate features. The rules are only one of them, and they complement rather than replace the others.

ControlWhat it decidesMain difference
Attack surface reduction rulesWhether a risky behavior may occurBehavior-based, per technique
Microsoft Defender AntivirusWhether a file or process is maliciousDetection-based, signatures and cloud
Exploit protectionHow processes resist memory exploitsMitigations such as DEP and CFG
Controlled folder accessWhich apps may modify protected foldersRansomware-focused file protection
Smart App Control and App Control for BusinessWhich code may run at allAllow-list application control
Credential GuardWhether secrets can be read from memoryIsolation through virtualization-based security
Attack surface reduction rules and related controls

A layered configuration is typical: Credential Guard isolates credentials, while the LSASS rule adds a second barrier on devices where virtualization-based security cannot run.

Deploying and managing the rules

The rules can be configured through Microsoft Intune, Group Policy, Configuration Manager or PowerShell. Locally, Add-MpPreference with the -AttackSurfaceReductionRules_Ids and -AttackSurfaceReductionRules_Actions AuditMode parameters sets a rule to audit, and Get-MpPreference shows the current state.

  1. Inventory the environment: identify macro-heavy business processes, management agents and line-of-business software.
  2. Enable all relevant rules in audit mode and collect events for at least two to four weeks, longer for monthly processes.
  3. Analyze audit events and add narrowly scoped per-rule exclusions for files or folders that are genuinely required.
  4. Switch to block in rings, starting with IT pilot devices, then broader groups.
  5. Monitor block events and keep a fast path for users to report broken workflows.

The rules are available on Windows 10, Windows 11 and supported Windows Server versions. Central reporting and advanced hunting require Defender for Endpoint licensing, while basic enforcement works with Defender Antivirus alone.

Common pitfalls

Most problems with attack surface reduction rules come from deployment shortcuts rather than from the rules themselves. The rules are precise, but they assume that administrators know which business software relies on unusual behavior, and that assumption often fails in older environments.

  • Third-party antivirus as primary: when Defender runs in passive mode, the rules do not enforce.
  • Broad exclusions: excluding whole folders such as user profiles removes most of the protection.
  • Skipping audit: enforcing the Office child process rule blindly can stop add-ins and document workflows.
  • Conflicting policies: Group Policy and Intune settings applied together can produce unexpected states.
  • Ignoring warn mode limits: warn mode is not supported for every rule and depends on the client.

A further misconception is that the rules replace patching or macro restrictions. They block typical follow-up actions of an attack, but a determined attacker can choose techniques outside their scope, so the rules work best as one layer in a defense-in-depth design together with updates, least privilege and application control.

The short version

Attack surface reduction rules are like house rules for programs. Instead of trying to recognize every burglar, the house simply forbids certain actions: a spreadsheet may not open a command window, and an unknown program may not read the password vault.

Most normal software never needs those actions, so blocking them stops many attacks at an early step. The work lies in finding the few business tools that do need them and making careful exceptions.

Where it makes a difference

An accounting firm with 300 Windows 11 laptops enables all rules in audit mode through Intune. After four weeks, the logs show that an old invoicing add-in for Excel triggers the Office child process rule, while no legitimate software triggers the LSASS or obfuscated script rules.

The team adds a single file exclusion for the add-in and switches the rules to block in two rings. Three months later, a phishing email delivers a document whose macro tries to start PowerShell to download a loader. The action is blocked with event ID 1121, the user sees a notification, and the incident ends without any malware reaching the disk.