Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
An AMSI bypass disables or blinds the Windows Antimalware Scan Interface so that scripts and in-memory payloads reach the runtime without being inspected by the installed security product.

What Is AMSI Bypass?
The Antimalware Scan Interface (AMSI) is the hook Microsoft added in Windows 10 so that security products can inspect content after it has been decoded but before it is executed. PowerShell, VBScript, JScript, the .NET runtime, Office VBA, and Windows Script Host all pass buffers to AMSI, which forwards them to whichever antimalware provider is registered. An AMSI bypass is any technique that stops this handover happening, or makes it always return a clean verdict.
It matters because AMSI is the main reason script-based attacks stopped being trivially easy. Encode a PowerShell command in Base64 and AMSI still sees the decoded script at the moment it runs. Attackers therefore spend considerable effort on turning AMSI off, and MITRE ATT&CK catalogues the result under T1562.001, Impair Defenses: Disable or Modify Tools.
A scriptable host loads amsi.dll into its own process, calls AmsiInitialize, then passes each buffer to AmsiScanBuffer or AmsiScanString. The provider returns a result, and a value of AMSI_RESULT_DETECTED causes the host to refuse to run the content. The critical design detail is that all of this happens inside the user’s own process, in user mode, with the user’s own privileges. Code already running in that process can modify it.
AmsiScanBuffer in the loaded amsi.dll, change its memory protection, and overwrite the first instructions so the function returns a success code with a clean result. This is the most widely used approach and takes only a few lines of code.amsiInitFailed field in System.Management.Automation to true, which makes PowerShell behave as though AMSI never initialised. The original one-line version of this, published by Matt Graeber in 2016, is now signatured, but rewritten and obfuscated variants appear constantly.HKCU, a variant of COM hijacking.amsi.dll, use .NET assemblies loaded reflectively, or downgrade to PowerShell version 2, which predates AMSI.AMSI bypasses are rarely the first step. They appear after initial access, when an operator wants to run a credential dumper, a C2 agent, or a reconnaissance script in memory. Offensive frameworks ship them as standard: Cobalt Strike, Covenant, and PowerShell Empire all include AMSI handling, and commodity loaders distributed with infostealers do the same. The technique sits naturally alongside ETW tampering, because together they remove the two main sources of script and runtime telemetry on a Windows host.
Treat AMSI as one sensor among several rather than a control you rely on.
VirtualProtect on a region inside amsi.dll, or writing to it, is strongly suspicious.Microsoft hardened parts of this in later Windows builds, and AMSI providers can run in a protected process, but the fundamental exposure remains: a user-mode scanning interface sitting inside the process it is meant to police.
We exercise AMSI and endpoint evasion routinely during our Red Team services, because the honest question is not whether a bypass exists but whether your SOC sees the attempt.
No. The common techniques patch memory inside the attacker’s own process or set a field in the PowerShell runtime, both of which a standard user can do. That is a direct consequence of AMSI being a user-mode interface loaded into the host process. Administrator rights are needed only for machine-wide changes, such as unregistering a provider under the local machine hive.
Not useless, but one of its sensors has been removed. File scanning, kernel callbacks, driver-level telemetry, and behavioural detections still operate, and a modern endpoint detection and response product draws on several sources. The practical effect is that in-memory scripts and reflectively loaded assemblies stop being inspected, which is exactly the content attackers most want to run.
Often, yes. PowerShell writes event 4104 containing the deobfuscated script block, and it does so independently of AMSI. Many bypass attempts are therefore recorded in full in the Microsoft-Windows-PowerShell/Operational log before the bypass is effective. Collect those events centrally, because an attacker with local administrator rights can clear or stop the local log afterwards.
Remove the PowerShell 2.0 engine, enforce application control so that unsigned scripts run in Constrained Language Mode, restrict who may run scripting hosts at all, and forward script block and process telemetry to a SIEM. None of these stops a determined operator, but together they turn a silent bypass into an event that leaves several correlated traces.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.