GuíasGuides · Nivel 3Level 3

Microsoft Defender Antivirus y reglas ASR: de auditoría a bloqueo, exclusiones bien hechas y una aplicación bloqueadaMicrosoft Defender Antivirus and ASR rules: from audit to block, exclusions done right and a blocked app

Comprobar que Defender está sano, las reglas de reducción de la superficie de ataque con sus GUID, pasar de auditoría a bloqueo, protección de red y acceso controlado a carpetas, exclusiones mínimas y documentadas, gestión desde Intune o GPO, los eventos 1121 y 1122 y el ticket de la aplicación que una regla ASR no deja abrir.Checking Defender is healthy, attack surface reduction rules with their GUIDs, moving from audit to block, network protection and controlled folder access, minimal documented exclusions, management from Intune or GPO, events 1121 and 1122, and the ticket of the app an ASR rule won't let run.

Qué vas a conseguir

Un Defender Antivirus que, además de buscar virus, corta los comportamientos que usan casi todos los ataques: Office lanzando procesos, scripts ofuscados, ejecutables por correo, robo de credenciales de LSASS. Activado primero en auditoría y después en bloqueo, con pocas exclusiones justificadas, y con la forma de resolver el ticket que llegará seguro: "la aplicación no abre".

Antes de empezar

  • Los equipos gestionados por Intune (directivas de Seguridad de los puntos de conexión) o por GPO. Uno de los dos para cada configuración, no ambos.
  • Defender como antivirus activo, no en modo pasivo detrás de otro producto: las reglas ASR necesitan Defender en tiempo real.
  • Si hay Defender for Endpoint, acceso al portal de Defender. Sin él, los eventos del equipo bastan.
  • Un grupo piloto con equipos de IT y de los departamentos con más macros y herramientas propias (Finanzas, Operaciones).

1. Comprobar que Defender está sano

PowerShell (administrador) · PC-0412
Get-MpComputerStatus | Select-Object AMRunningMode, AntivirusEnabled, RealTimeProtectionEnabled, IsTamperProtected, AntivirusSignatureLastUpdated, AMProductVersionGet-MpPreference | Select-Object AttackSurfaceReductionRules_Ids, AttackSurfaceReductionRules_Actions, EnableNetworkProtection, EnableControlledFolderAccessAMRunningMode                 : NormalAntivirusEnabled              : TrueRealTimeProtectionEnabled     : TrueIsTamperProtected             : TrueAntivirusSignatureLastUpdated : 30/10/2026 7:12:40AMProductVersion              : 4.18.26090.3AttackSurfaceReductionRules_Ids     : {}AttackSurfaceReductionRules_Actions : {}EnableNetworkProtection             : 0EnableControlledFolderAccess        : 0
  • AMRunningMode tiene que ser Normal. Passive Mode significa que otro antivirus manda y las reglas ASR no se aplican.
  • IsTamperProtected en True: la protección contra alteraciones impide que un usuario o un malware con permisos de administrador apague Defender.
  • Firmas de hoy y una versión de plataforma reciente.

2. Las reglas ASR que importan

Cada regla tiene un nombre y un GUID, y cuatro modos: 0 desactivada, 1 bloqueo, 2 auditoría y 6 advertencia (el usuario ve el aviso y puede continuar). Un buen primer lote:

ReglaGUID
Bloquear el robo de credenciales del subsistema de autoridad de seguridad local (lsass.exe)9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2
Bloquear el abuso de controladores firmados vulnerables56a863a9-875e-4185-98a7-b882c64b5ce5
Bloquear la persistencia mediante suscripción a eventos WMIe6db77e5-3df2-4cf1-b95a-636979351e5b
Bloquear que todas las aplicaciones de Office creen procesos secundariosd4f940ab-401b-4efc-aadc-ad5f3c50688a
Bloquear que las aplicaciones de Office creen contenido ejecutable3b576869-a4ec-4529-8536-b80a7769e899
Bloquear contenido ejecutable del cliente de correo y del correo webbe9ba2d9-53ea-4cdc-84e5-9b1eeee46550
Bloquear que JavaScript o VBScript ejecuten contenido descargadod3e037e1-3eb8-44c8-a917-57927947596d
Bloquear la ejecución de scripts potencialmente ofuscados5beb7efe-fd9a-4556-801d-275e5ffc04cc
Usar protección avanzada contra ransomwarec1db55ab-c21a-4637-bb3f-a12568109d35

Las tres primeras son las que Microsoft llama de protección estándar: casi nunca molestan y se pueden poner en bloqueo pronto. El resto, auditoría primero.

La regla Bloquear creaciones de procesos procedentes de comandos PSExec y WMI (d1e49aac-8f56-4280-b9ba-993a6d77406c) rompe el cliente de Configuration Manager, que depende de WMI. Si gestionas con MECM, no la actives fuera de una prueba en auditoría muy controlada.

3. De auditoría a bloqueo

En Intune: Seguridad de los puntos de conexión › Reducción de la superficie expuesta a ataques › Crear directiva › Windows › Reglas de reducción de la superficie expuesta a ataques, cada regla en Auditoría, asignada al grupo piloto. Por GPO: Componentes de Windows › Antivirus de Microsoft Defender › Protección contra vulnerabilidades de Microsoft Defender › Reducción de la superficie expuesta a ataques › Configurar reglas de reducción de la superficie expuesta a ataques, con el GUID como nombre y el modo como valor. En un equipo de laboratorio, para probar:

PowerShell (administrador) · equipo de pruebas
Add-MpPreference -AttackSurfaceReductionRules_Ids d4f940ab-401b-4efc-aadc-ad5f3c50688a -AttackSurfaceReductionRules_Actions AuditModeGet-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Windows Defender/Operational'; Id=1121,1122} -MaxEvents 20 | Select-Object TimeCreated, Id, Message
  • 1121: una regla en bloqueo ha bloqueado algo. 1122: una regla en auditoría lo habría bloqueado. 5007: ha cambiado la configuración (útil para saber cuándo llegó la directiva).
  • Dos a cuatro semanas en auditoría, con los 1122 revisados por regla y por aplicación (en el portal de Defender, Informes › Reglas de reducción de la superficie expuesta a ataques).
  • Después, regla a regla a Bloqueo en el piloto, y del piloto al resto por oleadas. Las reglas que admiten Advertencia son un paso intermedio útil para las de Office.

4. Protección de red y acceso controlado a carpetas

  • Protección de red bloquea conexiones a dominios e IP de mala reputación desde cualquier proceso, no solo desde el navegador. Set-MpPreference -EnableNetworkProtection AuditMode y después Enabled; eventos 1125 (auditoría) y 1126 (bloqueo).
  • Acceso controlado a carpetas impide que aplicaciones no fiables escriban en Documentos, Escritorio, Imágenes y las carpetas que añadas. Buena defensa contra ransomware, y la que más tickets genera. Auditoría (-EnableControlledFolderAccess AuditMode, evento 1124) antes que bloqueo (evento 1123), y las aplicaciones legítimas con Add-MpPreference -ControlledFolderAccessAllowedApplications.

5. Exclusiones bien hechas

Cada exclusión es un agujero hecho a propósito, así que se hacen pocas, pequeñas y por escrito:

  • La más pequeña posible: un fichero concreto antes que una carpeta, una carpeta antes que una unidad. Nunca C:\Users, %TEMP% ni un proceso de Office entero.
  • Del tipo correcto: una exclusión por regla ASR solo afecta a esa regla; una exclusión de antivirus deja el fichero sin analizar. Para un falso positivo de ASR no hace falta tocar el antivirus. Hay reglas que no respetan las exclusiones de antivirus, y todas respetan las exclusiones de ASR globales y por regla.
  • Donde se gestiona la regla: si la regla viene de Intune, la exclusión también. Las añadidas a mano en un equipo se pierden o, con protección contra alteraciones, pueden no aplicarse.
  • Documentada: qué se excluye, para qué regla, qué aplicación, quién la pidió, el ticket y una fecha de revisión.

6. El ticket: "la herramienta de cierre mensual no arranca desde Excel"

Finanzas usa un libro de Excel con macros que lanza un ejecutable interno para generar informes. Desde que Bloquear que todas las aplicaciones de Office creen procesos secundarios está en bloqueo, no hace nada y aparece un aviso de Seguridad de Windows.

PowerShell (administrador) · PC-0233
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Windows Defender/Operational'; Id=1121} -MaxEvents 1 | Format-List TimeCreated, MessageTimeCreated : 30/10/2026 9:41:07Message     : Microsoft Defender Exploit Guard ha bloqueado una operación que no está permitida por su administrador de TI.              ID: D4F940AB-401B-4EFC-AADC-AD5F3C50688A              Usuario: CONTOSO\laura.prado              Ruta de acceso: C:\Program Files\Contoso\InformesCierre\GenInforme.exe              Nombre del proceso: C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE

Se lee así: el ID es la regla, Nombre del proceso quién intentó la acción (Excel) y Ruta de acceso el fichero bloqueado (el ejecutable interno).

  1. Confirma que es legítimo: firmado por quien dice, instalado por IT en Program Files, y que el responsable de la aplicación lo reconoce. Si nadie lo reconoce, no es un ticket de soporte: es un incidente de seguridad.
  2. Mira si pasa en más equipos (el informe de reglas ASR del portal o el mismo evento en otro equipo de Finanzas).
  3. Añade una exclusión por regla solo para C:\Program Files\Contoso\InformesCierre\GenInforme.exe, en la misma directiva de Intune que activa la regla, asignada a quien la necesita.
  4. Tras sincronizar la directiva, cierra y vuelve a abrir Excel (las exclusiones se aplican cuando arranca el proceso) y prueba con el usuario.
  5. Ticket con la regla, el fichero excluido, la justificación y una fecha de revisión.

Desactivar la regla para todos o volverla a auditoría "hasta que se arregle" es lo que deja la red abierta durante meses. Una exclusión concreta es más rápida y deja la regla funcionando para todo lo demás.

Siguientes pasos

  • La guía de GPO de seguridad completa la base de seguridad del puesto: NTLM, LLMNR, firma SMB, LAPS y protección de LSA.
  • La guía de Intune EPM reduce los administradores locales, que es lo que hace que un usuario pueda saltarse muchas de estas protecciones.
  • La guía de Microsoft Sentinel de Nivel 4 explica cómo llevar los eventos de Defender a alertas centralizadas.

¿Falta algo o en tu entorno es distinto? Escríbeme y lo corrijo.

What you'll get

A Defender Antivirus that, besides looking for viruses, cuts off the behaviours almost every attack uses: Office launching processes, obfuscated scripts, executables by email, credential theft from LSASS. Switched on in audit first and then block, with few justified exclusions, and with a way to solve the ticket that is sure to arrive: "the app won't open".

Before you start

  • Devices managed by Intune (Endpoint security policies) or by GPO. One of the two for each setting, not both.
  • Defender as the active antivirus, not in passive mode behind another product: ASR rules need Defender in real time.
  • If you have Defender for Endpoint, access to the Defender portal. Without it, the device's events are enough.
  • A pilot group with IT devices and devices from the departments with the most macros and in-house tools (Finance, Operations).

1. Check Defender is healthy

PowerShell (administrator) · PC-0412
Get-MpComputerStatus | Select-Object AMRunningMode, AntivirusEnabled, RealTimeProtectionEnabled, IsTamperProtected, AntivirusSignatureLastUpdated, AMProductVersionGet-MpPreference | Select-Object AttackSurfaceReductionRules_Ids, AttackSurfaceReductionRules_Actions, EnableNetworkProtection, EnableControlledFolderAccessAMRunningMode                 : NormalAntivirusEnabled              : TrueRealTimeProtectionEnabled     : TrueIsTamperProtected             : TrueAntivirusSignatureLastUpdated : 30/10/2026 7:12:40AMProductVersion              : 4.18.26090.3AttackSurfaceReductionRules_Ids     : {}AttackSurfaceReductionRules_Actions : {}EnableNetworkProtection             : 0EnableControlledFolderAccess        : 0
  • AMRunningMode must be Normal. Passive Mode means another antivirus is in charge and ASR rules are not enforced.
  • IsTamperProtected at True: tamper protection stops a user or malware with admin rights from turning Defender off.
  • Today's signatures and a recent platform version.

2. The ASR rules that matter

Each rule has a name and a GUID, and four modes: 0 off, 1 block, 2 audit and 6 warn (the user sees the warning and can carry on). A good first batch:

RuleGUID
Block credential stealing from the Windows local security authority subsystem (lsass.exe)9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2
Block abuse of exploited vulnerable signed drivers56a863a9-875e-4185-98a7-b882c64b5ce5
Block persistence through WMI event subscriptione6db77e5-3df2-4cf1-b95a-636979351e5b
Block all Office applications from creating child processesd4f940ab-401b-4efc-aadc-ad5f3c50688a
Block Office applications from creating executable content3b576869-a4ec-4529-8536-b80a7769e899
Block executable content from email client and webmailbe9ba2d9-53ea-4cdc-84e5-9b1eeee46550
Block JavaScript or VBScript from launching downloaded executable contentd3e037e1-3eb8-44c8-a917-57927947596d
Block execution of potentially obfuscated scripts5beb7efe-fd9a-4556-801d-275e5ffc04cc
Use advanced protection against ransomwarec1db55ab-c21a-4637-bb3f-a12568109d35

The first three are what Microsoft calls standard protection rules: they hardly ever get in the way and can go to block early. The rest, audit first.

The rule Block process creations originating from PSExec and WMI commands (d1e49aac-8f56-4280-b9ba-993a6d77406c) breaks the Configuration Manager client, which relies on WMI. If you manage with MECM, don't enable it outside a tightly controlled audit test.

3. From audit to block

In Intune: Endpoint security › Attack surface reduction › Create policy › Windows › Attack Surface Reduction Rules, each rule set to Audit, assigned to the pilot group. Through GPO: Windows Components › Microsoft Defender Antivirus › Microsoft Defender Exploit Guard › Attack Surface Reduction › Configure Attack surface reduction rules, with the GUID as the name and the mode as the value. On a lab device, to test:

PowerShell (administrator) · test device
Add-MpPreference -AttackSurfaceReductionRules_Ids d4f940ab-401b-4efc-aadc-ad5f3c50688a -AttackSurfaceReductionRules_Actions AuditModeGet-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Windows Defender/Operational'; Id=1121,1122} -MaxEvents 20 | Select-Object TimeCreated, Id, Message
  • 1121: a rule in block mode has blocked something. 1122: a rule in audit mode would have blocked it. 5007: the configuration changed (useful to know when the policy arrived).
  • Two to four weeks in audit, with the 1122s reviewed by rule and by application (in the Defender portal, Reports › Attack surface reduction rules).
  • Then, rule by rule to Block in the pilot, and from the pilot to everyone else in waves. Rules that support Warn are a useful intermediate step for the Office ones.

4. Network protection and controlled folder access

  • Network protection blocks connections to bad-reputation domains and IPs from any process, not just the browser. Set-MpPreference -EnableNetworkProtection AuditMode and then Enabled; events 1125 (audit) and 1126 (block).
  • Controlled folder access stops untrusted applications writing to Documents, Desktop, Pictures and any folders you add. A good ransomware defence, and the one that generates the most tickets. Audit (-EnableControlledFolderAccess AuditMode, event 1124) before block (event 1123), and legitimate apps added with Add-MpPreference -ControlledFolderAccessAllowedApplications.

5. Exclusions done right

Every exclusion is a hole made on purpose, so they are few, small and written down:

  • As small as possible: a specific file rather than a folder, a folder rather than a drive. Never C:\Users, %TEMP% or a whole Office process.
  • Of the right type: a per-rule ASR exclusion affects only that rule; an antivirus exclusion leaves the file unscanned. For an ASR false positive you don't need to touch the antivirus. Some rules don't honour antivirus exclusions, and all of them honour global and per-rule ASR exclusions.
  • Where the rule is managed: if the rule comes from Intune, so does the exclusion. Exclusions added by hand on a device get lost or, with tamper protection on, may not apply.
  • Documented: what is excluded, for which rule, which application, who asked for it, the ticket and a review date.

6. The ticket: "the month-end tool won't start from Excel"

Finance uses an Excel workbook with macros that launches an in-house executable to generate reports. Since Block all Office applications from creating child processes went to block, nothing happens and a Windows Security notification appears.

PowerShell (administrator) · PC-0233
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Windows Defender/Operational'; Id=1121} -MaxEvents 1 | Format-List TimeCreated, MessageTimeCreated : 30/10/2026 9:41:07Message     : Microsoft Defender Exploit Guard has blocked an operation that is not allowed by your IT administrator.              ID: D4F940AB-401B-4EFC-AADC-AD5F3C50688A              User: CONTOSO\laura.prado              Path: C:\Program Files\Contoso\MonthEndReports\GenReport.exe              Process Name: C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE

It reads like this: the ID is the rule, Process Name is who attempted the action (Excel), and Path is the blocked file (the in-house executable).

  1. Confirm it is legitimate: signed by who it claims, installed by IT under Program Files, and recognised by the application owner. If nobody recognises it, it is not a support ticket: it is a security incident.
  2. Check whether it happens on other devices (the portal's ASR rules report or the same event on another Finance device).
  3. Add a per-rule exclusion for C:\Program Files\Contoso\MonthEndReports\GenReport.exe only, in the same Intune policy that enables the rule, assigned to those who need it.
  4. After the policy syncs, close and reopen Excel (exclusions apply when the process starts) and test with the user.
  5. Ticket with the rule, the excluded file, the justification and a review date.

Turning the rule off for everyone, or putting it back into audit "until it's fixed", is what leaves the network open for months. A specific exclusion is faster and keeps the rule working for everything else.

Next steps

  • The Security GPOs guide completes the device security baseline: NTLM, LLMNR, SMB signing, LAPS and LSA protection.
  • The Intune EPM guide cuts down local admins, which is what lets a user get around many of these protections.
  • The Level 4 Microsoft Sentinel guide explains how to turn Defender events into centralised alerts.

Is something missing, or different in your environment? Get in touch and I'll fix it.

Tech Career Lab · newsletter

¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.

Apúntate y llévate las 33 ideasSign up and get the 33 ideas →