Windows API reference
AmsiScanBuffer
Submits a memory buffer to the registered antimalware provider for scanning and returns an AMSI_RESULT.
- Library
- Amsi.dll
- Category
- Defense Evasion (AMSI/ETW)
- Suspicion
- high
- MITRE ATT&CK
- T1685 Disable or Modify Tools
Detection summary
AMSI bypasses usually patch AmsiScanBuffer in memory (for example, forcing E_INVALIDARG or AMSI_RESULT_CLEAN, or overwriting the function prologue) or unhook amsi.dll; detect via EDR hook-integrity checks, cross-view ntdll/amsi .text comparison, private executable memory in script hosts, and missing AMSI 1101 scan telemetry for PowerShell, JScript/VBScript, VBA or .NET content. Correlate with encoded PowerShell, Office spawning script hosts and unsigned .NET assemblies.
- Sysmon: No Sysmon event mapped
- ETW: Microsoft-Antimalware-Scan-Interface
- Notes: AMSI ETW event 1101 records scan requests and content metadata when the provider is enabled, not the calling API or verdict; absence of expected scans is often more useful than a single event.
Sources and documentation
- Microsoft Learn documentation (direct documentation)
Not yet human-reviewed. Page metadata generated .
Legitimate use
PowerShell, Windows Script Host, Office VBA, .NET and other AMSI-aware hosts call it before executing script or in-memory content.