4.1.3. Firewall and Attack Surface Reduction
💡 First Principle: Most attacks don't need a brand-new exploit. They ride ordinary behavior: an Office document launching a script, a process reading credential memory, an executable started from a USB stick, a connection to an open port. Firewall and attack surface reduction (ASR) policies take those ordinary paths away. Because legitimate work sometimes uses the same paths, the skill is staging: audit first, measure the impact, then enforce.
Firewall policy. Windows has three profiles: Windows Firewall (the firewall's own settings), Windows Firewall rules and Windows Hyper-V Firewall Rules (for Hyper-V containers such as WSL). macOS has a macOS firewall profile. Windows Server 2012 R2 and later is supported only through Defender security settings management.
How firewall policies combine is a favorite exam detail:
- Each rules profile holds up to 150 custom rules, but a device can receive several rules profiles. Non-conflicting rules merge on the device, so you can exceed 150 in total. Contradictory rules — one blocks Teams.exe, another allows it — are both delivered and conflict on the device.
- Two Windows Firewall settings profiles that disagree, or a firewall profile and a device configuration policy that disagree, cause the setting not to be sent at all.
- A Windows Firewall settings profile and a Windows Firewall rules profile never conflict with each other.
On current Windows builds, the Firewall CSP applies each atomic block of rules all-or-nothing, so a bad rule can't leave a half-applied deployment. Common rule errors are port ranges written backwards (5-1 instead of 1-5), ranges without protocol TCP (6) or UDP (17), and combining the "All" interface type with others. Reusable settings groups (preview) let many rules share remote IP ranges and FQDN definitions. For reporting, Endpoint security > Firewall counts devices with the firewall off, and the MDM Firewall status for Windows report distinguishes Enabled, Disabled, Limited and Temporarily Disabled.
ASR policy profiles. The Attack surface reduction policy type covers Attack Surface Reduction Rules, Device Control (removable media and peripherals), Exploit Protection (OS and per-app mitigations), Web protection (network protection against phishing and malicious sites, no proxy needed), Application control (the older AppLocker-based profile) and App and browser isolation, which is Microsoft Defender Application Guard. Application Guard is deprecated and, from Windows 11 version 24H2, no longer available — don't choose it as a new design. Microsoft recommends AppLocker or the Microsoft Edge management service to block unprotected browsers instead.
ASR rules need Defender Antivirus in active mode (not passive), real-time protection on and, strongly recommended, cloud protection. Each rule takes one of five modes:
| Mode | Code | What happens | When to use it |
|---|---|---|---|
| Not configured | 5 | Rule off; can't conflict with other policies | Default; the safe way to leave a rule off |
| Disabled | 0 | Rule off, explicitly | Rarely — conflicts if another policy sets the rule differently |
| Audit | 2 | Allowed, but logged as an event and in the ASR report | Testing impact before enforcing |
| Block | 1 | Behavior blocked | Production enforcement |
| Warn | 6 | Blocked, but the user can choose Unblock for 24 hours | Rules where some legitimate use exists |
Warn mode changed in 2026: starting with Defender platform version 4.18.26060, administrator approval is required to use the Unblock option. Unblock is always temporary; anything persistent belongs in an exclusion. Two rules have no Warn mode at all: Block credential stealing from the Windows local security authority subsystem and Block Office applications from injecting code into other processes.
Microsoft's rollout guidance gives you a shortcut. Three standard protection rules — blocking abuse of exploited vulnerable signed drivers, credential stealing from LSASS, and persistence through WMI event subscription — can go straight to Block without extensive testing. Every other rule should run in Audit first.
Merging and exclusions. ASR rules from the endpoint security ASR profile, the device configuration Endpoint protection profile and the Defender for Endpoint baseline merge into one superset per device; only genuinely conflicting rules are held back. For exclusions, Attack Surface Reduction Only Exclusions apply to all rules on the device, while ASR Only Per Rule Exclusions isolate a file or folder exclusion to one rule. If both MDM and Group Policy set ASR values, Group Policy wins by default.
Device control merges allow and block lists for device IDs and setup classes, but it doesn't merge an allow list with a block list: the device enforces the most restrictive, so a setup class on both lists is blocked.
Zero Trust. These policies are Zero Trust's "never trust, always verify" applied to the device itself. Microsoft's endpoint guidance applies the same security policies whatever the device's ownership or network, and builds on compliance with Conditional Access, security baselines, automated updates, encryption, app protection and Defender integration. ASR rules are where that verification happens at the level of individual process behavior.
⚠️ Exam Trap: To turn a rule off across a set of devices, Disabled looks like the obvious choice, but it can conflict when another policy sets the same rule to a different mode. Not configured is functionally the same as off and can't conflict.
Reflection Question: A pilot in Audit mode shows that Block Win32 API calls from Office macros would break a finance team's spreadsheet add-in. Describe how you'd protect everyone else without breaking finance — which mode, and which kind of exclusion?