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/amsi-on-mdav.md
+30-20Lines changed: 30 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,38 +1,44 @@
1
1
---
2
2
title: "Anti-malware Scan Interface (AMSI) integration with Microsoft Defender Antivirus"
3
3
description: Describes fileless malware and how Microsoft Defender Antivirus uses AMSI to protect against hidden threats.
4
-
author: YongRhee-MSFT
5
-
ms.author: yongrhee
4
+
author: denisebmsft
5
+
ms.author: deniseb
6
6
manager: deniseb
7
-
ms.date: 02/27/2024
7
+
ms.reviewer: yongrhee
8
+
ms.date: 12/05/2024
8
9
ms.topic: conceptual
9
10
ms.service: defender-endpoint
10
11
ms.subservice: ngp
11
-
ms.custom: QuickDraft
12
+
ms.custom:
13
+
- QuickDraft
14
+
- partner-contribution
12
15
search.appverid: MET150
13
16
f1.keywords:
14
-
audience:
17
+
audience: ITPro
18
+
ms.collection:
19
+
- m365-security
20
+
- tier2
15
21
ai-usage: ai-assisted
16
22
---
17
23
18
24
# Anti-malware Scan Interface (AMSI) integration with Microsoft Defender Antivirus
19
25
20
-
__Applies to:__
26
+
**Applies to**:
21
27
22
28
- Microsoft Defender XDR
23
29
- Microsoft Defender Antivirus
24
30
- Microsoft Defender for Endpoint P1 & P2
25
31
- Microsoft Defender for Business
26
32
- Microsoft Defender for Individuals
27
33
28
-
__Platforms:__
34
+
**Platforms**:
29
35
30
36
- Windows 10 and newer
31
37
- Windows Server 2016 and newer
32
38
33
39
Microsoft Defender for Endpoint utilizes the anti-malware Scan Interface (AMSI) to enhance protection against fileless malware, dynamic script-based attacks, and other nontraditional cyber threats. This article describes the benefits of AMSI integration, the types of scripting languages it supports, and how to enable AMSI for improved security.
34
40
35
-
## What is Fileless malware?
41
+
## What is fileless malware?
36
42
37
43
Fileless malware plays a critical role in modern cyberattacks, using stealthy techniques to avoid detection. Several major ransomware outbreaks used fileless methods as part of their kill chains.
38
44
@@ -42,22 +48,26 @@ Because memory is volatile, and fileless malware doesn't place files on disk, es
42
48
43
49
Attackers use several fileless techniques that can make malware implants stealthy and evasive. These techniques include:
44
50
45
-
-**Reflective DLL injection** Reflective DLL injection involves the manual loading of malicious DLLs into a process' memory without the need for said DLLs to be on disk. The malicious DLL can be hosted on a remote attacker-controlled machine and delivered through a staged network channel (for example, Transport Layer Security (TLS) protocol), or embedded in obfuscated form inside infection vectors like macros and scripts. This results in the evasion of the OS mechanism that monitors and keeps track of loading executable modules. An example of malware that uses Reflective DLL injection is HackTool:Win32/Mikatz!dha.
51
+
-**Reflective DLL injection**: Reflective DLL injection involves the manual loading of malicious DLLs into a process memory without the need for said DLLs to be on disk. The malicious DLL can be hosted on a remote attacker-controlled machine and delivered through a staged network channel (for example, Transport Layer Security (TLS) protocol), or embedded in obfuscated form inside infection vectors, like macros and scripts. This configuration results in the evasion of the OS mechanism that monitors and keeps track of loading executable modules. An example of malware that uses Reflective DLL injection is `HackTool:Win32/Mikatz!dha`.
46
52
47
-
-**Memory exploits** Adversaries use fileless memory exploits to run arbitrary code remotely on victim machines. For example, the UIWIX threat uses the EternalBlue exploit, which was used by both Petya and WannaCry, to install the DoublePulsar backdoor, which lives entirely in the kernel's memory (SMB Dispatch Table). Unlike Petya and Wannacry, UIWIX doesn't drop any files on disk.
53
+
-**Memory exploits**: Adversaries use fileless memory exploits to run arbitrary code remotely on victim machines. For example, the UIWIX threat uses the EternalBlue exploit, which was used by both Petya and WannaCry, to install the DoublePulsar backdoor, and lives entirely in the kernel's memory (SMB Dispatch Table). Unlike Petya and Wannacry, UIWIX doesn't drop any files on disk.
48
54
49
-
-**Script-based techniques** Scripting languages provide powerful means for delivering memory-only executable payloads. Script files can embed encoded shell codes or binaries that they can decrypt on the fly at run time and execute via .NET objects or directly with APIs without requiring them to be written to disk. The scripts themselves can be hidden in the registry, read from network streams, or run manually in the command-line by an attacker, without ever touching the disk.
55
+
-**Script-based techniques**: Scripting languages provide powerful means for delivering memory-only executable payloads. Script files can embed encoded shell codes or binaries that they can decrypt on the fly at run time and execute via .NET objects or directly with APIs without requiring them to be written to disk. The scripts themselves can be hidden in the registry, read from network streams, or run manually in the command-line by an attacker, without ever touching the disk.
50
56
51
-
> [!NOTE]
52
-
> Do not disable PowerShell as a means to block fileless malware. PowerShell is a powerful and secure management tool and is important for many system and IT functions. Attackers use malicious PowerShell scripts as post-exploitation technique that can only take place after an initial compromise has already occurred. Its misuse is a symptom of an attack that begins with other malicious actions like software exploitation, social engineering, or credential theft. The key is to prevent an attacker from getting into the position where they can misuse PowerShell.
57
+
> [!NOTE]
58
+
> Do not disable PowerShell as a means to block fileless malware. PowerShell is a powerful and secure management tool and is important for many system and IT functions. Attackers use malicious PowerShell scripts as post-exploitation technique that can only take place after an initial compromise has already occurred. Its misuse is a symptom of an attack that begins with other malicious actions like software exploitation, social engineering, or credential theft. The key is to prevent an attacker from getting into the position where they can misuse PowerShell.
53
59
54
-
-**WMI persistence** Some attackers use the Windows Management Instrumentation (WMI) repository to store malicious scripts that are then invoked periodically using WMI bindings.
60
+
> [!TIP]
61
+
> Reducing the number of unsigned Powershell scripts in your environment helps with increasing your security posture.
62
+
> Here are instructions on how you could add signing to the Powershell scripts used in your environment
63
+
> [Hey, Scripting Guy! How Can I Sign Windows PowerShell Scripts with an Enterprise Windows PKI? (Part 2 of 2) | Scripting Blog](https://devblogs.microsoft.com/scripting/hey-scripting-guy-how-can-i-sign-windows-powershell-scripts-with-an-enterprise-windows-pki-part-2-of-2/)
55
64
65
+
-**WMI persistence**: Some attackers use the Windows Management Instrumentation (WMI) repository to store malicious scripts that are then invoked periodically using WMI bindings.
56
66
Microsoft Defender Antivirus blocks most malware using generic, heuristic, and behavior-based detections, as well as local and cloud-based machine learning models. Microsoft Defender Antivirus protects against fileless malware through these capabilities:
57
67
58
-
- Detecting script-based techniques by using AMSI, which provides the capability to inspect PowerShell and other script types, even with multiple layers of obfuscation
59
-
- Detecting and remediating WMI persistence techniques by scanning the WMI repository, both periodically and whenever anomalous behavior is observed
60
-
- Detecting reflective DLL injection through enhanced memory scanning techniques and behavioral monitoring
68
+
- Detecting script-based techniques by using AMSI, which provides the capability to inspect PowerShell and other script types, even with multiple layers of obfuscation
69
+
- Detecting and remediating WMI persistence techniques by scanning the WMI repository, both periodically and whenever anomalous behavior is observed
70
+
- Detecting reflective DLL injection through enhanced memory scanning techniques and behavioral monitoring
61
71
62
72
## Why AMSI?
63
73
@@ -72,15 +82,15 @@ AMSI provides a deeper level of inspection for malicious software that employs o
72
82
- .NET Framework 4.8 or newer (scanning of all assemblies)
73
83
- Windows Management Instrumentation (WMI)
74
84
75
-
If you use Microsoft Office 365, AMSI also supports JavaScript, VBA, and XLM.
85
+
If you use Microsoft 365 Apps, AMSI also supports JavaScript, VBA, and XLM.
76
86
77
87
AMSI doesn't currently support Python or Perl.
78
88
79
89
### Enabling AMSI
80
90
81
-
To enable AMSI, you need to enable Script scanning. See [Configure scanning options for Microsoft Defender Antivirus](configure-advanced-scan-types-microsoft-defender-antivirus.md)
91
+
To enable AMSI, you need to enable script scanning. See [Configure scanning options for Microsoft Defender Antivirus](configure-advanced-scan-types-microsoft-defender-antivirus.md).
82
92
83
-
Also see [Defender Policy CSP - Windows Client Management](/windows/client-management/mdm/policy-csp-defender)
93
+
Also see [Defender Policy CSP - Windows Client Management](/windows/client-management/mdm/policy-csp-defender).
0 commit comments