You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: defender-endpoint/troubleshoot-asr.md
+70-11Lines changed: 70 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ description: Resources and sample code to troubleshoot issues with attack surfac
4
4
ms.service: defender-endpoint
5
5
ms.localizationpriority: medium
6
6
audience: ITPro
7
-
author: denisebmsft
8
-
ms.author: deniseb
9
-
ms.date: 02/24/2025
7
+
author: emmwalshh
8
+
ms.author: ewalsh
9
+
ms.date: 03/11/2025
10
10
ms.reviewer:
11
11
manager: deniseb
12
12
ms.custom: asr
@@ -28,17 +28,21 @@ search.appverid: met150
28
28
-[Microsoft Defender for Endpoint Plan 1 and 2](microsoft-defender-endpoint.md)
29
29
-[Microsoft Defender XDR](/defender-xdr)
30
30
31
+
The first and most immediate way is to check locally, on a Windows device, which attack surface reduction rules are enabled (and their configuration) is by using the PowerShell cmdlets.
32
+
33
+
Here are a few other sources of information that Windows offers, to troubleshoot attack surface reduction rules' impact and operation.
34
+
31
35
When you use [attack surface reduction rules](attack-surface-reduction.md) you might run into issues, such as:
32
36
33
37
- A rule blocks a file, process, or performs some other action that it shouldn't (false positive); or
34
38
- A rule doesn't work as described, or doesn't block a file or process that it should (false negative).
35
39
36
40
There are four steps to troubleshooting these problems:
37
41
38
-
1.[Confirm prerequisites](#confirm-prerequisites)
39
-
2.[Use audit mode to test the rule](#use-audit-mode-to-test-the-rule)
40
-
3.[Add exclusions for the specified rule](#add-exclusions-for-a-false-positive) (for false positives)
41
-
4.[Submit support logs](#collect-diagnostic-data-for-file-submissions)
2.[Use audit mode to test the rule](#use-audit-mode-to-test-the-rule).
44
+
3.[Add exclusions for the specified rule](#add-exclusions-for-a-false-positive) (for false positives).
45
+
4.[Collect and submit support logs](#collect-microsoft-defender-anti-malware-protection-diagnostic-data-for-file-submissions).
42
46
43
47
## Confirm prerequisites
44
48
@@ -59,6 +63,36 @@ When setting up the attack surface reduction rules by using Group Policy, here a
59
63
60
64
2. Make sure that there are **no spaces** at the beginning or at the end when adding the GUID for attack surface reduction rules.
61
65
66
+
### Querying which rules are active
67
+
68
+
One of the easiest ways to determine if attack surface reduction rules are already enabled is through a PowerShell cmdlet, Get-MpPreference.
69
+
70
+
Here's an example:
71
+
72
+
:::image type="content" source="media/getmpreferencescriptnew.png" alt-text="Screenshot showing the get mppreference script." lightbox="media/getmpreferencescriptnew.png":::
73
+
74
+
There are multiple attack surface reduction rules active, with different configured actions.
75
+
76
+
To expand information on attack surface reduction rules, you can use the properties `AttackSurfaceReductionRules_Ids` and/or `AttackSurfaceReductionRules_Actions`.
:::image type="content" source="media/getmpref-examplenew.png" alt-text="Screenshot showing the get mpreference example." lightbox="media/getmpref-examplenew.png":::
85
+
86
+
The preceding image shows all the IDs for attack surface reduction rules that have a setting different from 0 (Not Configured).
87
+
88
+
The next step is then to list the actual actions (Block or Audit) that each rule is configured with.
:::image type="content" source="media/getmpref-example2new.png" alt-text="Screenshot that shows the get mppreference example2." lightbox="media/getmpref-example2new.png":::
95
+
62
96
## Use audit mode to test the rule
63
97
64
98
Follow these instructions in [Use the demo tool to see how attack surface reduction rules work](attack-surface-reduction-rules-deployment-test.md) to test the specific rule you're encountering problems with.
@@ -71,10 +105,18 @@ Follow these instructions in [Use the demo tool to see how attack surface reduct
71
105
72
106
If a rule isn't blocking a file or process that you're expecting it should block, first check to see if audit mode is enabled. Audit mode might be enabled for testing another feature, or by an automated PowerShell script, and might not be disabled after the tests were completed.
73
107
74
-
If you've tested the rule with the demo tool and with audit mode, and attack surface reduction rules are working on preconfigured scenarios, but the rule isn't working as expected, proceed to either of the following sections based on your situation:
108
+
If you tested the rule with the demo tool and with audit mode, and attack surface reduction rules are working on preconfigured scenarios, but the rule isn't working as expected, proceed to either of the following sections based on your situation:
75
109
76
110
- If the attack surface reduction rule is blocking something that it shouldn't block (also known as a false positive), you can [first add an attack surface reduction rule exclusion](#add-exclusions-for-a-false-positive).
77
-
- If the attack surface reduction rule isn't blocking something that it should block (also known as a false negative), you can proceed immediately to the last step, [collecting diagnostic data and submitting the issue to us](#collect-diagnostic-data-for-file-submissions).
111
+
- If the attack surface reduction rule isn't blocking something that it should block (also known as a false negative), you can proceed immediately to the last step, [collecting diagnostic data and submitting the issue to us](#collect-microsoft-defender-anti-malware-protection-diagnostic-data-for-file-submissions).
112
+
113
+
### Querying blocking and auditing events
114
+
115
+
Attack surface reduction rule events can be viewed within the Windows Defender log.
116
+
117
+
To access it, open Windows Event Viewer, and browse to **Applications and Services Logs**\>**Microsoft**\>**Windows**\>**Windows Defender**\>**Operational**.
118
+
119
+
:::image type="content" source="media/eventviewerscrnew.png" alt-text="Screenshot that shows the Event Viewer page." lightbox="media/eventviewerscrnew.png":::
78
120
79
121
## Add exclusions for a false positive
80
122
@@ -84,13 +126,13 @@ To add an exclusion, see [Customize attack surface reduction](attack-surface-red
84
126
85
127
> [!IMPORTANT]
86
128
> You can specify individual files and folders to be excluded, but you can't specify individual rules.
87
-
> This means any files or folders that are excluded are excluded from all ASR rules.
129
+
> This means any files or folders that are excluded from all ASR rules.
88
130
89
131
## Report a false positive or false negative
90
132
91
133
Use the [Microsoft Security Intelligence web-based submission form](https://www.microsoft.com/wdsi/support/report-exploit-guard) to report a false negative or false positive for network protection. With a Windows E5 subscription, you can also [provide a link to any associated alert](alerts-queue.md).
92
134
93
-
## Collect diagnostic data for file submissions
135
+
## Collect Microsoft Defender Anti-malware Protection diagnostic data for file submissions
94
136
95
137
When you report a problem with attack surface reduction rules, you're asked to collect and submit diagnostic data for Microsoft support and engineering teams to help troubleshoot issues.
96
138
@@ -108,6 +150,23 @@ When you report a problem with attack surface reduction rules, you're asked to c
108
150
109
151
3. By default, they're saved to `C:\ProgramData\Microsoft\Windows Defender\Support\MpSupportFiles.cab`. Attach the file to the submission form.
110
152
153
+
154
+
You can also view rule events through the Microsoft Defender Antivirus dedicated command-line tool, called `*mpcmdrun.exe*`, that can be used to manage and configure, and automate tasks if needed.
155
+
156
+
You can find this utility in *%ProgramFiles%\Windows Defender\MpCmdRun.exe*. You must run it from an elevated command prompt (that is, run as Admin).
157
+
158
+
To generate the support information, type `MpCmdRun.exe -getfiles`. After a while, several logs will be packaged into an archive (MpSupportFiles.cab) and made available at `C:\ProgramData\Microsoft\Windows Defender\Support`.
159
+
160
+
:::image type="content" source="media/malware-prot-logsnew.png" alt-text="Screenshot that shows the malware protection logs." lightbox="media/malware-prot-logsnew.png":::
161
+
162
+
Extract that archive and you have many files available for troubleshooting purposes.
163
+
164
+
The most relevant files are as follows:
165
+
166
+
-`MPOperationalEvents.txt`: This file contains same level of information found in Event Viewer for Windows Defender's Operational log.
167
+
-`MPRegistry.txt`: In this file you can analyze all the current Windows Defender configurations, from the moment, the support logs were captured.
168
+
-`MPLog.txt`: This log contains more verbose information about all the actions/operations of the Windows Defender.
0 commit comments