Join our Newsletter — 33% off our NHI Course
Threats, Abuse & Incident Response

AMSI Patching

← Back to Glossary
By NHI Mgmt Group Updated November 25, 2026 Domain: Threats, Abuse & Incident Response

AMSI patching is the modification or bypass of the Antimalware Scan Interface used by Windows security products to inspect content before it runs. Attackers or defenders may alter AMSI-related code, memory, or hooks so script content is no longer scanned, which directly affects malware detection and execution control.

What AMSI patching changes in practice

AMSI patching matters because it changes whether script and memory-resident content is inspected before execution. In Windows environments, that can turn a detection control into a blind spot, especially when PowerShell, macro content, loaders, or other interpreter-driven activity is involved.

Defenders usually treat AMSI as one layer in a broader inspection stack, not a stand-alone control. That is why AMSI bypasses are often discussed alongside script block logging, command-line monitoring, constrained language mode, application control, and memory-focused telemetry.

Why AMSI is such a common target

AMSI is attractive to attackers because it sits at a useful interception point between content delivery and execution. If an adversary can tamper with the scan path, they may be able to run obfuscated scripts, staged payloads, or in-memory loaders with less scrutiny, which is especially valuable in fileless attack chains.

The practical danger is not just that malware may run, but that normal detection assumptions may no longer hold. A successful patch or hook change can suppress visibility at exactly the point where security tooling expects to inspect content.

For a deeper view of how script-based abuse is defended, see PowerShell Security Guide and Fileless Malware Guide.

Where AMSI patching fits in the detection stack

AMSI patching is most relevant when the environment relies on runtime inspection of scripts, shell commands, and other interpretable content. In practice, defenders often pair AMSI with script block logging, event correlation, exploit protection, and application control because any single inspection point can be bypassed or disabled.

This also means AMSI should be viewed as a signal source, not the whole defensive story. If AMSI is bypassed, adjacent controls still matter, including logging of script activity, endpoint telemetry, and restrictions on where interpreters are allowed to run.

That layering is a core idea in T1027 Obfuscated Files or Information Defensive Guide and MITRE ATT&CK T1620 Reflective Code Loading, both of which connect AMSI to broader in-memory and obfuscation tradecraft.

How defenders should think about verification and recovery

After a suspected AMSI bypass, the question is not only whether the patch was removed, but whether the endpoint was already used to execute content while inspection was weakened. That makes post-incident review important, because the compromise window may include scripts, loaders, or follow-on actions that never triggered expected detections.

Verification should focus on whether logging, memory telemetry, and endpoint protections still show a coherent story of execution. If AMSI tampering is confirmed, defenders should treat it as a control-integrity issue and review adjacent execution paths, not just the patched component itself.

Guidance on inspection limits and compensating detection paths is also covered in D3-SEA Script Execution Analysis and Windows Internals for Defenders Guide.

Why AMSI patching is usually discussed with defensive controls

In most environments, AMSI patching is not a benign tuning step, it is a way to alter detection behaviour. That is why defenders pay attention to tamper protection, signed update paths, and the balance between visibility and script compatibility when they harden Windows endpoints.

When AMSI is part of a broader malware-defense strategy, the useful question is not “can the scan be bypassed?” but “what else still gives us confidence if it is?” The strongest programmes pair runtime inspection with layered prevention and logging so that one bypass does not remove all evidence of execution.

For a control-oriented view of that layering, see M1049 Antivirus/Antimalware and D3-SU Software Update.

Risk and Threat Considerations

AMSI patching creates a direct detection-risk problem: if the scan path is altered, malicious script content may execute without the inspection that defenders expect. That makes the technique attractive in fileless intrusions, where the goal is often to reduce visibility rather than to drop obvious malware files.

Failure mechanism: The attacker modifies AMSI-related code, memory, or hooks so content is not scanned, or scanning is weakened at the moment execution begins.

Impact: Obfuscated scripts, loaders, and follow-on payloads may run with reduced detection, increasing the chance of compromise persistence and missed incident scoping.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1027 — Obfuscated Files or InformationAMSI patching is commonly used to support obfuscation and visibility evasion.
T1620 — Reflective Code LoadingAMSI tampering often supports in-memory loading and execution without file-based scanning.
Recommendation — Map AMSI bypass activity to T1027 and hunt for obfuscated script execution. Correlate AMSI tampering with T1620-style in-memory loading and inspect memory telemetry.
NIST SP 800-53 Rev 5SI-3 — Malicious Code ProtectionAMSI is part of malicious-code inspection and execution control on Windows endpoints.
AU-6 — Audit Record Review, Analysis, and ReportingAMSI bypasses are often detected through audit and endpoint telemetry correlation.
CM-7 — Least FunctionalityRestricting scripting surfaces reduces the impact of AMSI bypass attempts.
Recommendation — Apply SI-3 to preserve malware inspection coverage and validate tamper-resistant controls. Review audit and endpoint records for script execution gaps after suspected AMSI tampering. Use CM-7 to limit exposed scripting paths and reduce opportunities for AMSI abuse.

Practitioner Guidance

Why practitioners should care: AMSI is one of several runtime inspection layers, so resilience depends on what remains observable when it is bypassed. Treat AMSI health, script logging, and endpoint telemetry as a combined detection story rather than separate features.

What to watch for: Sudden loss of expected script telemetry, unusual interpreter behaviour, or evidence that script content runs while related detection signals go quiet. Those patterns warrant a broader review of endpoint tampering and adjacent execution paths.

Practitioner takeaway: If AMSI is undercut, assume the attacker is trying to preserve execution while hiding from normal inspection, and validate your alternate visibility paths immediately.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org