Skip to content
← RegistryDossier · 6 steps · 5 edges

AMSI patch → in-memory .NET / PowerShell stager

Patch AmsiScanBuffer in amsi.dll → return clean for any content. Subsequent PowerShell / Office VBA / .NET runtime calls emit attacker code without scanning.

Filed by AD Knowledge Base
§ Kill-chainDrag · zoom · scroll

§ Context

Assumed environment: medium-integrity foothold. Attacker has the ability to start a PowerShell session or load .NET assembly in their own process. AV relies on AMSI for in-memory script scanning.

§ Steps

  1. 01
    Medium-integrity shellInitial Access
    T1078Valid Accounts
  2. 02
    C2 beacon establishedCommand and Control
    T1071Application Layer Protocol
  3. 03
    Persistence via WMI subscriptionPersistence
    LOL-SCRCONSscrcons.exe WMI Event Subscription
  4. 04
    Patch amsi.dll!AmsiScanBufferDefense Evasion
    AMSI-PATCHAMSI In-Memory Patch
  5. 05
    Patch ntdll!EtwEventWrite to blind ETWDefense Evasion
    ETW-PATCHETW Event-Tracing Patch
  6. 06
    Load .NET stager via Assembly.LoadDefense Evasion
    INJ-MODULE-STOMPModule Stomping

§ References

§ Frequently asked

What is the "AMSI patch → in-memory .NET / PowerShell stager" attack path?
Patch AmsiScanBuffer in amsi.dll → return clean for any content. Subsequent PowerShell / Office VBA / .NET runtime calls emit attacker code without scanning. It chains 6 steps drawn from real-world offensive-security techniques.
What starting position does this attack require?
The first step is Medium-integrity shell (T1078) — a initial access primitive. Assumed environment: medium-integrity foothold.
What is the final impact of this kill-chain?
The final step lands on Load .NET stager via Assembly.Load (INJ-MODULE-STOMP), which falls under Defense Evasion. From here, an operator typically pivots into post-exploitation or maintains persistence.
How can defenders detect or prevent this attack?
Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.

§ Related dossiers