Skip to content

Commit 733817c

Browse files
committed
convert amsi demonstration script images into code snippets
1 parent 30d745b commit 733817c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

defender-endpoint/mde-demonstration-amsi.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,30 @@ In this demonstration article, you have two engine choices to test AMSI:
5252
```powershell
5353
$testString = "AMSI Test Sample: " + "7e72c3ce-861b-4339-8740-0ac1484c1386"
5454
Invoke-Expression $testString
55-
```
55+
```powershell
5656
5757
2. On your device, open PowerShell as an administrator.
5858
5959
3. Type `Powershell -ExecutionPolicy Bypass AMSI_PoSh_script.ps1`, and then press **Enter**.
6060
6161
The result should be as follows:
6262
63+
# Attempt to execute the AMSI Test Sample
64+
65+
```powershell
66+
Invoke-Expression : At line:1 char:1
67+
+ AMSI Test Sample: 7e72c3ce-861b-4339-8740-8ac1484c1386
68+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69+
This script contains malicious content and has been blocked by your antivirus software.
70+
71+
At C:\Users\Admin\Desktop\AMSI_PoSh_script.ps1:3 char:1
72+
+ Invoke-Expression $testString
73+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74+
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
75+
+ FullyQualifiedErrorId : ScriptContainedMaliciousContent,Microsoft.PowerShell.Commands.InvokeExpressionCommand
76+
```
77+
78+
6379
:::image type="content" source="media/mde-demonstrations-amsi/test-amsi-powershell-results.png" alt-text="Screenshot showing the results of the AMSI test sample. It should show a threat was detected." lightbox="media/mde-demonstrations-amsi/test-amsi-powershell-results.png":::
6480

6581

0 commit comments

Comments
 (0)