POLICY BUILDER

Compose your ASR policy. Ship it in one line.

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.

01

Start from a baseline

Name the policy, then apply a preset or start from scratch. Merge adds a preset on top of what you have.

1–64 characters. Used for file names and the GPO name.

Standard protection

3 RULES

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.

3 block

Audit everything

19 RULES

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.

19 audit

Recommended workstation baseline

18 RULES

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.

15 block3 audit

Server baseline

12 RULES

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.

3 block9 audit
Import a policy string, link or JSON
02

Attack surface reduction rules

Not set leaves the device untouched. Off disables. Audit logs only. Warn lets users bypass. Block enforces.

01DriversStandard

Vulnerable signed drivers

Block abuse of exploited vulnerable signed drivers (Device)

Mode for 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.

02CredentialsStandardNo warn

LSASS credential theft

Block credential stealing from the Windows local security authority subsystem

Mode for 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.

03PersistenceStandard

WMI event persistence

Block persistence through WMI event subscription

Mode for Block persistence through WMI event subscription

Prevents malware from creating WMI event subscriptions to survive reboots without leaving files on disk.

04Office

Adobe Reader child processes

Block Adobe Reader from creating child processes

Mode for Block Adobe Reader from creating child processes

Stops Adobe Reader from launching other processes, cutting off payloads delivered through malicious PDFs or Reader exploits.

05Office

Office child processes

Block all Office applications from creating child processes

Mode for 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.

06Email

Email executable content

Block executable content from email client and webmail

Mode for 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.

07Execution

Low-prevalence executables

Block executable files from running unless they meet a prevalence, age, or trusted list criterion

Mode for 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.

08Scripts

Obfuscated scripts

Block execution of potentially obfuscated scripts

Mode for Block execution of potentially obfuscated scripts

Detects scripts with signs of obfuscation and blocks them, since malware often hides its logic this way.

09Scripts

JS/VBS launching downloads

Block JavaScript or VBScript from launching downloaded executable content

Mode for 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.

10Office

Office executable content

Block Office applications from creating executable content

Mode for 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.

11OfficeNo warn

Office code injection

Block Office applications from injecting code into other processes

Mode for 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.

12Email

Outlook child processes

Block Office communication application from creating child processes

Mode for 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.

13Execution

PSExec and WMI processes

Block process creations originating from PSExec and WMI commands

Mode for 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.

14Ransomware

Safe Mode reboot

Block rebooting machine in Safe Mode

Mode for 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.

15Removable media

Untrusted USB processes

Block untrusted and unsigned processes that run from USB

Mode for Block untrusted and unsigned processes that run from USB

Stops unsigned or untrusted executables from running directly from USB drives and SD cards.

16Execution

Copied/impersonated system tools

Block use of copied or impersonated system tools

Mode for 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.

17Servers

Webshell creation (servers)

Block Webshell creation for Servers

Mode for Block Webshell creation for Servers

Blocks web shell scripts from being created on Windows servers running Microsoft Exchange.

18Office

Win32 API calls from macros

Block Win32 API calls from Office macros

Mode for 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.

19Ransomware

Advanced ransomware protection

Use advanced protection against ransomware

Mode for 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.

03

ASR-only exclusions

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.

05

Deploy

One command per action, or the same policy for Intune, Group Policy and the registry.

Before you install
  • Test in audit first. Run new rules in audit for a few weeks, then analyze the events before blocking.
  • Group Policy and MDM win. If ASR is managed by GPO or Intune, local changes are overridden; the script warns you.
  • Only what you set changes. Rules left “Not set” are untouched on the device. “Off” explicitly disables.
  • Every install is reversible. A JSON backup is written to %ProgramData%\ASR-Rules-Builder\backups first; -Action Restore reapplies it.

PowerShell · run as administrator

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.

SHA-256 at site build
Inspect first: download, read, verify the hash, then run
PowerShell · inspect-first

If script execution is disabled on the device, run it withpowershell -ExecutionPolicy Bypass -File .\asr-rules-builder.ps1 -Policy '…' -Action Save.

0 rulesDeploy