Configure Attack Surface Reduction rules
Configurer les règles de réduction de la vulnérabilité aux attaques
Explanation
Set the state for each Attack Surface Reduction (ASR) rule.
After enabling this setting, you can set each rule to the following in the Options section:
- Block: the rule will be applied
- Audit Mode: if the rule would normally cause an event, then it will be recorded (although the rule will not actually be applied)
- Off: the rule will not be applied
- Not Configured: the rule is enabled with default values
- Warn: the rule will be applied and the end-user will have the option to bypass the block
Unless the ASR rule is disabled, a subsample of audit events are collected for ASR rules will the value of not configured.
Enabled:
Specify the state for each ASR rule under the Options section for this setting.
Enter each rule on a new line as a name-value pair:
- Name column: Enter a valid ASR rule ID
- Value column: Enter the status ID that relates to state you want to specify for the associated rule
The following status IDs are permitted under the value column:
- 1 (Block)
- 0 (Off)
- 2 (Audit)
- 5 (Not Configured)
- 6 (Warn)
Example:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 0
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 1
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 2
Disabled:
No ASR rules will be configured.
Not configured:
Same as Disabled.
You can exclude folders or files in the ""Exclude files and paths from Attack Surface Reduction Rules"" GP setting.
Définit l’état de chaque règle de Réduction de la Surface d’Attaque (ASR).
Après avoir activé ce paramètre, vous pouvez définir les règles suivantes dans la section Options :
-Bloc : la règle est appliquée
-Mode audit : si la règle entraîne normalement un événement, celle-ci est enregistrée (bien que la règle ne soit pas réellement appliquée)
Inactif : la règle ne sera pas appliquée
-Non configuré : la règle est activée avec les valeurs par défaut
-Avertir : la règle est appliquée et l’utilisateur final peut ignorer le bloc
À moins que la règle ASR ne soit désactivée , un sous-exemple d’événements d’audit est collecté pour les règles de récupération automatique des messages dont la valeur n’est pas configurée.
Activé :
Spécifier l’état de chaque règle ASR dans la section Options pour ce paramètre.
Entrez chaque règle sur une nouvelle ligne sous forme de paire nom-valeur :
-Nom colonne : entrez un ID de règle ASR valide
Colonne valeur : entrez l’ID d’État qui correspond à l’état que vous voulez spécifier pour la règle associée
Les ID d’état suivants sont autorisés dans la colonne valeur :
-1 (bloquer)
-0 (désactivée)
-2 (audit)
-5 (non configuré)
-6 (avertir)
Exemple :
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 0
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 1
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 2
Désactivé :
Aucune règle ASR n’est configurée.
Non configuré :
Même que désactivé.
Vous pouvez exclure des dossiers ou des fichiers dans le paramètre de stratégie de stratégie « exclure les fichiers et les chemins d’accès des règles de Réduction de la Surface d’Attaque ».
Use cases
Enables attack surface reduction (ASR) rules by GUID, each in block, audit or, for some, warn mode. The most common in enterprises: block Office from creating child processes, credential theft from LSASS, executable content from email, and obfuscated scripts.
Always deploy in audit first: a rule such as "Office must not create child processes" can break business applications. The LSASS rule is not needed if LSA protection and Credential Guard are enabled, and some rules do not support warn mode.
Microsoft source: Attack surface reduction rules reference
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR- Value name
ExploitGuard_ASR_Rules
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX (see the options below) |
| Disabled | not defined in the ADMX (see the options below) |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: WindowsDefender/ExploitGuard_ASR_Rules
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'ExploitGuard_ASR_Rules' -Value 1 -Type DWord # assumed value (not defined in the ADMX)
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Set the state for each ASR rule
$items = @{
'<name1>' = '<value1>'
'<name2>' = '<value2>'
} # Replace the values with your own
$items.GetEnumerator() | ForEach-Object { Set-ItemProperty -Path $k -Name $_.Key -Value $_.Value -Type String }Disable
# Disable: WindowsDefender/ExploitGuard_ASR_Rules
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'ExploitGuard_ASR_Rules' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": WindowsDefender/ExploitGuard_ASR_Rules
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR'
Remove-ItemProperty -Path $k -Name 'ExploitGuard_ASR_Rules' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Set the state for each ASR rule:Configurez le mode pour chaque règle de récupération automatique du système (ASR) :ExploitGuard_ASR_Rules | List (table)list | Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\RulesName = value pairs · additive | REG_SZ (values under the key) |