Skip to content

Commit e4044c4

Browse files
authored
Merge pull request #2106 from YongRhee-MSFT/docs-editor/amsi-on-mdav-1733346321
Update amsi-on-mdav.md
2 parents b363bee + cb44abf commit e4044c4

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

defender-endpoint/amsi-on-mdav.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
11
---
22
title: "Anti-malware Scan Interface (AMSI) integration with Microsoft Defender Antivirus"
33
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
66
manager: deniseb
7-
ms.date: 02/27/2024
7+
ms.reviewer: yongrhee
8+
ms.date: 12/05/2024
89
ms.topic: conceptual
910
ms.service: defender-endpoint
1011
ms.subservice: ngp
11-
ms.custom: QuickDraft
12+
ms.custom:
13+
- QuickDraft
14+
- partner-contribution
1215
search.appverid: MET150
1316
f1.keywords:
14-
audience:
17+
audience: ITPro
18+
ms.collection:
19+
- m365-security
20+
- tier2
1521
ai-usage: ai-assisted
1622
---
1723

1824
# Anti-malware Scan Interface (AMSI) integration with Microsoft Defender Antivirus
1925

20-
__Applies to:__
26+
**Applies to**:
2127

2228
- Microsoft Defender XDR
2329
- Microsoft Defender Antivirus
2430
- Microsoft Defender for Endpoint P1 & P2
2531
- Microsoft Defender for Business
2632
- Microsoft Defender for Individuals
2733

28-
__Platforms:__
34+
**Platforms**:
2935

3036
- Windows 10 and newer
3137
- Windows Server 2016 and newer
3238

3339
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.
3440

35-
## What is Fileless malware?
41+
## What is fileless malware?
3642

3743
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.
3844

@@ -42,22 +48,26 @@ Because memory is volatile, and fileless malware doesn't place files on disk, es
4248

4349
Attackers use several fileless techniques that can make malware implants stealthy and evasive. These techniques include:
4450

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`.
4652

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.
4854

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.
5056

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.
5359
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/)
5564
65+
- **WMI persistence**: Some attackers use the Windows Management Instrumentation (WMI) repository to store malicious scripts that are then invoked periodically using WMI bindings.
5666
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:
5767

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
6171

6272
## Why AMSI?
6373

@@ -72,15 +82,15 @@ AMSI provides a deeper level of inspection for malicious software that employs o
7282
- .NET Framework 4.8 or newer (scanning of all assemblies)
7383
- Windows Management Instrumentation (WMI)
7484

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.
7686

7787
AMSI doesn't currently support Python or Perl.
7888

7989
### Enabling AMSI
8090

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).
8292

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).
8494

8595
### AMSI resources
8696

0 commit comments

Comments
 (0)