Standard protection
3 RULESMicrosoft's three standard protection rules in Block mode, which Microsoft says can be enabled without extensive audit testing. If Configuration Manager manages the device, audit the WMI persistence rule first.
POLICY BUILDER
Pick a mode for each of the 19 attack surface reduction rules, add exclusions, and take the result anywhere: a link, a one-liner, Intune, Group Policy or a .reg file. Everything happens in your browser.
The builder started empty. Your link was left unchanged in the address bar until you edit.
Name the policy, then apply a preset or start from scratch. Merge adds a preset on top of what you have.
Microsoft's three standard protection rules in Block mode, which Microsoft says can be enabled without extensive audit testing. If Configuration Manager manages the device, audit the WMI persistence rule first.
Every rule in Audit mode. Nothing is blocked; events 1122 and Audited ActionTypes show what each rule would have stopped. Microsoft suggests about 30 days of audit before moving to Block.
Standard protection plus the low-noise Office, email, script, USB, Safe Mode and ransomware rules in Block. Rules that commonly hit legitimate software stay in Audit until tuned: PSExec/WMI process creation (admin tooling, ConfigMgr), low-prevalence executables (in-house and developer builds) and copied system tools (heuristic). The Exchange-only webshell rule is left not configured.
Server-relevant rules only. Standard protection rules in Block; other rules that apply to Windows Server in Audit, including the Exchange webshell rule. Office and macro rules are omitted (Win32 API rule is n/a on Server). The JavaScript/VBScript rule isn't supported on Server 2016/2012 R2 and the WMI persistence rule isn't supported on those versions either.
Not set leaves the device untouched. Off disables. Audit logs only. Warn lets users bypass. Block enforces.
Block abuse of exploited vulnerable signed drivers (Device)
Stops applications from writing known-vulnerable signed drivers to disk, a common way for attackers to reach the kernel and disable security tools. Drivers already present can still load.
AsrVulnerableSignedDriverBlockedAsrVulnerableSignedDriverAuditedNone listed
Block abuse of exploited vulnerable signed drivers (Device)
Minimum OS: Windows 10 1709; Windows Server 1803 (SAC) / 2019; Server 2012 R2 (unified agent)
Block credential stealing from the Windows local security authority subsystem
Denies untrusted processes read access to LSASS memory so tools like Mimikatz can't dump credentials. It blocks the memory access, not the process itself.
AsrLsassCredentialTheftBlockedAsrLsassCredentialTheftAuditedMicrosoft Defender Antivirus
Block credential stealing from the Windows local security authority subsystem
Minimum OS: Windows 10 1803; Windows Server 2012 R2 or later
Block persistence through WMI event subscription
Prevents malware from creating WMI event subscriptions to survive reboots without leaving files on disk.
AsrPersistenceThroughWmiBlockedAsrPersistenceThroughWmiAuditedMicrosoft Defender Antivirus · RPC
Block persistence through WMI event subscription
Minimum OS: Windows 10 1903; Windows Server 1903 (SAC) / 2022
Block Adobe Reader from creating child processes
Stops Adobe Reader from launching other processes, cutting off payloads delivered through malicious PDFs or Reader exploits.
AsrAdobeReaderChildProcessBlockedAsrAdobeReaderChildProcessAuditedMicrosoft Defender Antivirus
Block Adobe Reader from creating child processes
Minimum OS: Windows 10 1809; Windows Server 2012 R2 or later
Block all Office applications from creating child processes
Stops Word, Excel, PowerPoint, OneNote and Access from spawning child processes such as cmd or PowerShell, a classic macro-malware pattern.
AsrOfficeChildProcessBlockedAsrOfficeChildProcessAuditedMicrosoft Defender Antivirus
Block all Office applications from creating child processes
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block executable content from email client and webmail
Blocks executables, scripts and archives that arrive through Outlook, Outlook.com or popular webmail from being launched.
AsrExecutableEmailContentBlockedAsrExecutableEmailContentAuditedMicrosoft Defender Antivirus
Block executable content from email client and webmail
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block executable files from running unless they meet a prevalence, age, or trusted list criterion
Blocks executables that aren't common enough, old enough or on a trusted list, as judged by Microsoft cloud reputation.
AsrUntrustedExecutableBlockedAsrUntrustedExecutableAuditedMicrosoft Defender Antivirus · Cloud Protection
Block executable files from running unless they meet a prevalence, age, or trusted list criterion
Minimum OS: Windows 10 1803; Windows Server 2012 R2 or later
Block execution of potentially obfuscated scripts
Detects scripts with signs of obfuscation and blocks them, since malware often hides its logic this way.
AsrObfuscatedScriptBlockedAsrObfuscatedScriptAuditedMicrosoft Defender Antivirus · Antimalware Scan Interface (AMSI) · Cloud Protection
Block execution of potentially obfuscated scripts
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block JavaScript or VBScript from launching downloaded executable content
Stops JavaScript and VBScript from running executables they just downloaded, the typical behavior of script-based downloaders.
AsrScriptExecutableDownloadBlockedAsrScriptExecutableDownloadAuditedMicrosoft Defender Antivirus · Antimalware Scan Interface (AMSI)
Block JavaScript or VBScript from launching downloaded executable content
Minimum OS: Windows 10 1709; Windows Server 2019 or later
Block Office applications from creating executable content
Prevents Office apps and their macros from writing executable files to disk and blocks those files from running.
AsrExecutableOfficeContentBlockedAsrExecutableOfficeContentAuditedMicrosoft Defender Antivirus · RPC
Block Office applications from creating executable content
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block Office applications from injecting code into other processes
Blocks Office apps from injecting code into other processes, which attackers use to hide malicious code inside a clean process.
AsrOfficeProcessInjectionBlockedAsrOfficeProcessInjectionAuditedMicrosoft Defender Antivirus
Block Office applications from injecting code into other processes
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block Office communication application from creating child processes
Stops Outlook from launching child processes, defending against exploits and malicious Outlook rules or forms, while normal Outlook features keep working.
AsrOfficeCommAppChildProcessBlockedAsrOfficeCommAppChildProcessAuditedMicrosoft Defender Antivirus
Block Office communication application from creating child processes
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block process creations originating from PSExec and WMI commands
Blocks processes started through PsExec or WMI, which attackers use for remote execution and lateral movement.
AsrPsexecWmiChildProcessBlockedAsrPsexecWmiChildProcessAuditedMicrosoft Defender Antivirus
Block process creations originating from PSExec and WMI commands
Minimum OS: Windows 10 1803; Windows Server 2012 R2 or later
Block rebooting machine in Safe Mode
Blocks commands such as bcdedit and bootcfg from restarting the device into Safe Mode, where attackers can tamper with security tools or encrypt files.
AsrSafeModeRebootBlockedAsrSafeModeRebootedAuditedMicrosoft Defender Antivirus
Block rebooting machine in Safe Mode
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block untrusted and unsigned processes that run from USB
Stops unsigned or untrusted executables from running directly from USB drives and SD cards.
AsrUntrustedUsbProcessBlockedAsrUntrustedUsbProcessAuditedMicrosoft Defender Antivirus
Block untrusted and unsigned processes that run from USB
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block use of copied or impersonated system tools
Blocks copies of Windows system tools, or files posing as them, when they run from outside System32 or SysWOW64, even if they are validly signed.
AsrAbusedSystemToolBlockedAsrAbusedSystemToolAuditedMicrosoft Defender Antivirus
Block use of copied or impersonated system tools
Minimum OS: Windows 10 1709; Windows Server 2012 R2 or later
Block Webshell creation for Servers
Blocks web shell scripts from being created on Windows servers running Microsoft Exchange.
Microsoft Defender Antivirus
Block Webshell creation for Servers
Minimum OS: Windows Server 2016 with Exchange (unified agent)
Block Win32 API calls from Office macros
Prevents VBA macros from calling Win32 APIs, which malware uses to run shellcode in memory without touching disk.
AsrOfficeMacroWin32ApiCallsBlockedAsrOfficeMacroWin32ApiCallsAuditedMicrosoft Defender Antivirus · Antimalware Scan Interface (AMSI)
Block Win32 API calls from Office macros
Minimum OS: Windows 10 1709 (client only)
Use advanced protection against ransomware
Uses client and cloud heuristics to block files that look like ransomware, erring on the side of caution for files without an established good reputation.
AsrRansomwareBlockedAsrRansomwareAuditedMicrosoft Defender Antivirus · Cloud Protection
Use advanced protection against ransomware
Minimum OS: Windows 10 1803; Windows Server 2012 R2 or later
No rules match these filters.
Files and folders every ASR rule skips. They don't affect antivirus scanning. Keep the list short and specific; per-rule exclusions live in each rule's details.
Supports environment variables and * wildcards. Up to 260 characters each, 300 entries across the whole policy.
One command per action, or the same policy for Intune, Group Policy and the registry.
%ProgramData%\ASR-Rules-Builder\backups first; -Action Restore reapplies it.Fleet tools: end a script body with exit $LASTEXITCODE, and apowershell.exe -Command "…" line with ; exit $LASTEXITCODE, or the exit code is lost. Codes: 0 ok, 1 validation, 2 environment, 3 verify mismatch,4 cancelled or no console (use -Force), 5 applied with omissions.Exit codes.
If script execution is disabled on the device, run it withpowershell -ExecutionPolicy Bypass -File .\asr-rules-builder.ps1 -Policy '…' -Action Save.
The canonical policy. Its base64url encoding is the -Policy string.
Creates an Endpoint security › Attack surface reduction policy, including per-rule exclusions and controlled folder access, with Publish-AsrIntunePolicy.ps1 from the repository.
PowerShell 7, the Graph authentication module, and an account with the Endpoint Security Manager or Intune Administrator role. The DeviceManagementConfiguration.ReadWrite.All delegated permission needs admin consent the first time.
Prints the exact Graph request. No sign-in, nothing is sent.
Signs in, runs a read-only preflight against your tenant, shows the plan and asks [y/N]. The policy is named after this policy and created unassigned.
Group lookup by name also needs Group.Read.All. Use -AssignGroupId to avoid it.
Uses the Graph beta endpoint. Creates the policy unassigned by default. Sign-in is interactive, and no keys or tokens are stored. Read docs/intune.md for permissions, sign-in options and limits.
Create a Custom configuration profile (Windows 10 and later) and add one OMA-URI row per line below. This route can't carry per-rule exclusions.
| Name | OMA-URI | Type | Value | Copy |
|---|
Three ways to get this policy into Group Policy. All of them write the same registry values under HKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard.
Binary machine policy file (PReg). Apply to a standalone or lab machine with LGPO from the Microsoft Security Compliance Toolkit, or copy it into an existing GPO's Machine folder.
Extract the ZIP, then in GPMC right-click a GPO → Import Settings… and point it at the extracted folder, or use Import-GPO:
Or script it: create (or update) the GPO with New-GPO and Set-GPRegistryValue. Requires the GroupPolicy module (RSAT). Link it to a pilot OU first.
Writes the same policy registry values Group Policy writes, for lab machines and golden images. Policy values override local settings; delete the keys to undo.