MS Defender umí rozšíření zabezpečení formou tzv. ASR pravidel. Jejich úkolem je omezovat útočníkovi možnosti toho, co může využít k provedení útoku tím, že některé akce automaticky blokují. Originální dokumentace je zde: https://learn.microsoft.com/en-us/defender-endpoint/enable-attack-surface-reduction#group-policy a oficiální PowerShell pak zde: https://learn.microsoft.com/en-us/defender-endpoint/enable-attack-surface-reduction#powershell
Dnes bych se rád podělil o PowerShell kód, který umožní domácím uživatelům Windows 10 a starupům tato nastavení jednoduše využívat tím, že si zkopírují příkazy pro pravidla, která chtějí využívat. Požadavkem je edice Pro Windows 10 a vyšší edice, stejně tak Windows 11 a Windows Server 2012R2 a novější.
Sada příkazů k nastavení jednotlivých možností
#Blokace obfuskovaného kódu
Add-MpPreference -AttackSurfaceReductionRules_Ids 56a863a9-875e-4185-98a7-b882c64b5ce5 -AttackSurfaceReductionRules_Actions Enabled
#Blokace vytváření podřízených procesů pro Adobe PDF reader
Add-MpPreference -AttackSurfaceReductionRules_Ids 7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c -AttackSurfaceReductionRules_Actions Enabled
#Blokace vytváření podřízených procesů z Office aplikací
Add-MpPreference -AttackSurfaceReductionRules_Ids d4f940ab-401b-4efc-aadc-ad5f3c50688a -AttackSurfaceReductionRules_Actions Enabled
#Blokace vytvoření otisku paměti procesu LSASS
Add-MpPreference -AttackSurfaceReductionRules_Ids d9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2 -AttackSurfaceReductionRules_Actions Enabled
#Blokace spustitelného obsahu z emailu
Add-MpPreference -AttackSurfaceReductionRules_Ids be9ba2d9-53ea-4cdc-84e5-9b1eeee46550 -AttackSurfaceReductionRules_Actions Enabled
#Blokování spouštění spustitelných souborů, pokud nesplňují kritérium prevalence, stáří nebo důvěryhodného seznamu
Add-MpPreference -AttackSurfaceReductionRules_Ids 01443614-cd74-433a-b99e-2ecdc07bfc25 -AttackSurfaceReductionRules_Actions Enabled
#Blokace obfuskovaných skriptů
Add-MpPreference -AttackSurfaceReductionRules_Ids 5beb7efe-fd9a-4556-801d-275e5ffc04cc -AttackSurfaceReductionRules_Actions Enabled
#Blokování stahování spustitelného obsahu pomocí Javascript a VBscript
Add-MpPreference -AttackSurfaceReductionRules_Ids d3e037e1-3eb8-44c8-a917-57927947596d -AttackSurfaceReductionRules_Actions Enabled
#Blokace vytváření spustitelného obsahu pomocí Office aplikací
Add-MpPreference -AttackSurfaceReductionRules_Ids 3b576869-a4ec-4529-8536-b80a7769e899 -AttackSurfaceReductionRules_Actions Enabled
#Blokace vkládání kódu do procesů z Office aplikací
Add-MpPreference -AttackSurfaceReductionRules_Ids 75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84 -AttackSurfaceReductionRules_Actions Enabled
#Blokování komunikace aplikace Office při vytváření podřízených procesů
Add-MpPreference -AttackSurfaceReductionRules_Ids 26190899-1602-49e8-8b27-eb1d0a1ce869 -AttackSurfaceReductionRules_Actions Enabled
#Blokování persistence pomocí WMI
Add-MpPreference -AttackSurfaceReductionRules_Ids e6db77e5-3df2-4cf1-b95a-636979351e5b -AttackSurfaceReductionRules_Actions Enabled
#Blokování vytváření procesů z příkazů PSExec a WMI
Add-MpPreference -AttackSurfaceReductionRules_Ids d1e49aac-8f56-4280-b9ba-993a6d77406c -AttackSurfaceReductionRules_Actions Enabled
#Blokování nedůvěryhodného a nepodepsaného spustitelného obsahu na USB médiích
Add-MpPreference -AttackSurfaceReductionRules_Ids b2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4 -AttackSurfaceReductionRules_Actions Enabled
#Blokování vytvoření proscesu webshell
Add-MpPreference -AttackSurfaceReductionRules_Ids a8f5898e-1dc8-49a9-9878-85004b8a61e6 -AttackSurfaceReductionRules_Actions Enabled
#Blokování volání aplikací z Office makra
Add-MpPreference -AttackSurfaceReductionRules_Ids 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b -AttackSurfaceReductionRules_Actions Enabled
#Pokročilá ochrana před Ramsomware
Add-MpPreference -AttackSurfaceReductionRules_Ids c1db55ab-c21a-4637-bb3f-a12568109d35 -AttackSurfaceReductionRules_Actions Enabled