Windows API reference

AmsiScanBuffer

Submits a memory buffer to the registered antimalware provider for scanning and returns an AMSI_RESULT.

Library
Amsi.dll
Suspicion
high

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.

Sources and 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.

Open AmsiScanBuffer in the interactive atlas