Skip to content

Commit 662f26a

Browse files
committed
replace screenshots with the equivalent code snippet
1 parent 8f1edfe commit 662f26a

File tree

1 file changed

+72
-12
lines changed

1 file changed

+72
-12
lines changed

defender-endpoint/mde-demonstration-amsi.md

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ audience: ITPro
1111
ms.collection:
1212
- m365-security
1313
ms.topic: how-to
14-
ms.date: 08/19/2025
14+
ms.date: 09/01/2025
1515
search.appverid: met150
1616
ms.custom:
1717
- partner-contribution
@@ -60,8 +60,6 @@ In this demonstration article, you have two engine choices to test AMSI:
6060
6161
The result should be as follows:
6262
63-
### Attempt to execute the AMSI Test Sample
64-
6563
```powershell
6664
Invoke-Expression : At line:1 char:1
6765
+ AMSI Test Sample: 7e72c3ce-861b-4339-8740-8ac1484c1386
@@ -107,14 +105,36 @@ In this demonstration article, you have two engine choices to test AMSI:
107105
Source: Microsoft VBScript runtime error
108106
```
109107

110-
:::image type="content" source="media/mde-demonstrations-amsi/test-amsi-vbscript-results.png" alt-text="Screenshot showing the AMSI test results. It should show that antivirus software blocked the script." lightbox="media/mde-demonstrations-amsi/test-amsi-vbscript-results.png":::
111-
112-
113108
### Verifying the test results
114109

115110
In your protection history, you should be able to see the following information:
116111

117-
:::image type="content" source="media/mde-demonstrations-amsi/verifying-results.png" alt-text="Screenshot showing the AMSI test results. The information should show that a threat was blocked and cleaned." lightbox="media/mde-demonstrations-amsi/verifying-results.png":::
112+
```vbscript
113+
Threat blocked
114+
115+
Detected: Virus: Win32/MpTest!amsi
116+
117+
Status: Cleaned
118+
119+
This threat or app was cleaned or quarantined before it became active on your device.
120+
Details: This program is dangerous and replicates by infecting other files.
121+
122+
Affected items:
123+
amsi: \Device\HarddiskVolume3\Windows\System32\WindowsPowershell\v1.0\powershell.exe
124+
or
125+
amsi: C:\Users\Admin\Desktop\AMSI_vbscript.vbs
126+
127+
and/or you might see:
128+
129+
Threat blocked
130+
131+
Detected: Virus: Win32/MpTest!amsi
132+
133+
Status: Cleaned
134+
135+
This threat or app was cleaned or quarantined before it became active on your device.
136+
Details: This program is dangerous and replicates by infecting other files
137+
```
118138

119139
### Get the list of Microsoft Defender Antivirus threats
120140

@@ -128,18 +148,58 @@ You can view detected threats by using the Event log or PowerShell.
128148

129149
3. Look for `event ID 1116`. You should see the following information:
130150

131-
:::image type="content" source="media/mde-demonstrations-amsi/eventid1116.png" alt-text="Screenshot showing Event ID 1116, which says malware or unwanted software was detected." lightbox="media/mde-demonstrations-amsi/eventid1116.png":::
151+
```powershell
152+
153+
Microsoft Defender Antivirus has detected malware or other potentially unwanted software.
154+
155+
For more information please see the following: https://go.microsoft.com/fwlink/?linkid=37020&name=Virus:Win32/MpTest!amsi&t
132156
133-
##### Use PowerShell
157+
Name: Virus:Win32/MpTest!amsi
158+
159+
ID: 2147694217
160+
161+
Severity: Severe
162+
163+
Category: Virus
164+
165+
Path: \Device\HarddiskVolume3\Windows\System32\WindowsPowerShell\v1.0\powershell.exe or C:\Users\Admin\Desktop\AMSI_jscri
166+
167+
Detection Origin: Local machine or Unknown
168+
169+
Detection Type: Concrete
170+
171+
Detection Source: System
172+
173+
User: NT AUTHORITY\SYSTEM
174+
175+
Process Name: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe or C:\Windows\System32\cscript.exe or C:\Windows\Sy
176+
177+
Security intelligence Version: AV: 1.419.221.0, AS: 1.419.221.0, NIS: 1.419.221.0
178+
179+
Engine Version: AM: 1.1.24080.9, NIS: 1.1.24080.9
180+
```
181+
182+
#### Use PowerShell
134183

135184
1. On your device, open PowerShell.
136185

137-
2. Type the following command: `Get-MpThreat`.
186+
1. Type the following command: `Get-MpThreat`.
138187

139188
You might see the following results:
140189

141-
:::image type="content" source="media/mde-demonstrations-amsi/get-mpthreat-results.png" alt-text="Screenshot showing the results of the Get-MpThreat command. It should show that an AMSI threat was detected." lightbox="media/mde-demonstrations-amsi/get-mpthreat-results.png":::
142-
190+
```powershell
191+
CategoryID : 42
192+
DidThreatExecute : True
193+
IsActive : True
194+
Resources :
195+
RollupStatus : 97
196+
SchemaVersion : 1.0.0.0
197+
SeverityID : 5
198+
ThreatID : 2147694217
199+
ThreatName : Virus:Win32/MpTest!amsi
200+
TypeID : 0
201+
PSComputerName :
202+
```
143203

144204
## See also
145205

0 commit comments

Comments
 (0)