Noktomezo

Disable Mitigations

Feb 1st, 2025 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Winbatch 5.43 KB | Source Code | 0 0
  1. :: ─────────────────────────────────────────────────────────────────────────────
  2. :: 🛡️ DISABLE MITIGATIONS
  3. :: ─────────────────────────────────────────────────────────────────────────────
  4. :: 📖 Disable memory protection in exchange for increasing performance
  5. :: ─────────────────────────────────────────────────────────────────────────────
  6. :: ⚠️ Some anti-cheats (such as FaceIt) can complain about these tweaks, so use at your own risk, or just restore defaults
  7. :: ─────────────────────────────────────────────────────────────────────────────
  8. :: ⚠️ Requires "NSudo" to run some tasks with the highest privileges:
  9. :: 1) Download: https://github.com/M2TeamArchived/NSudo/releases/download/8.2/NSudo_8.2_All_Components.zip
  10. :: 2) Unpack somewhere and go to the "NSudo Launcher" folder
  11. :: 3) Then, based on the architecture of your processor, go to the folder you need: ARM64, Win32, x64
  12. :: 4) Copy "NSudoLC.exe" file and paste it next to your .cmd/.bat file
  13. :: ─────────────────────────────────────────────────────────────────────────────
  14.  
  15.  
  16.  
  17. :: 📜 SCRIPT
  18. :: ─────────────────────────────────────────────────────────────────────────────
  19.  
  20. reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d "0" /f
  21. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /t Reg_DWORD /d "1" /f
  22. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettings" /t REG_DWORD /d "1" /f
  23. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "3" /f
  24. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d "3" /f
  25.  
  26. NSudoLC -U:S -ShowWindowMode:Hide -wait cmd /c "reg add "HKLM\SYSTEM\CurrentControlSet\Services\TrustedInstaller" /v "Start" /t REG_DWORD /d "3" /f"
  27. NSudoLC -U:S -ShowWindowMode:Hide -wait cmd /c "sc start "TrustedInstaller""
  28. NSudoLC -U:T -P:E -M:S -ShowWindowMode:Hide -wait cmd /c "ren %SYSTEMROOT%\System32\mcupdate_GenuineIntel.dll mcupdate_GenuineIntel.old"
  29. NSudoLC -U:T -P:E -M:S -ShowWindowMode:Hide -wait cmd /c "ren %SYSTEMROOT%\System32\mcupdate_AuthenticAMD.dll mcupdate_AuthenticAMD.old"
  30.    
  31. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "EnableCfg" /t REG_DWORD /d "0" /f
  32. reg add "HKLM\System\CurrentControlSet\Control\Session Manager" /v "ProtectionMode" /t REG_DWORD /d "0" /f
  33.  
  34. :: ─────────────────────────────────────────────────────────────────────────────
  35.  
  36.  
  37.  
  38. :: 🔁 RESTORE DEFAULT VALUES
  39. :: ─────────────────────────────────────────────────────────────────────────────
  40.  
  41. reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d "1" /f
  42. reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /f
  43. reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettings /f
  44. reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /f
  45. reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /f
  46.  
  47. NSudoLC -U:S -ShowWindowMode:Hide -wait cmd /c "reg add "HKLM\SYSTEM\CurrentControlSet\Services\TrustedInstaller" /v "Start" /t Reg_DWORD /d "2" /f"
  48. NSudoLC -U:S -ShowWindowMode:Hide -wait cmd /c "sc start "TrustedInstaller""
  49. NSudoLC -U:T -P:E -M:S -ShowWindowMode:Hide -wait cmd /c "ren %SYSTEMROOT%\System32\mcupdate_GenuineIntel.old mcupdate_GenuineIntel.dll"
  50. NSudoLC -U:T -P:E -M:S -ShowWindowMode:Hide -wait cmd /c "ren %SYSTEMROOT%\System32\mcupdate_AuthenticAMD.old mcupdate_AuthenticAMD.dll"
  51.  
  52. reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "EnableCfg" /f
  53. reg delete "HKLM\System\CurrentControlSet\Control\Session Manager" /v "ProtectionMode" /f
  54.  
  55. :: ─────────────────────────────────────────────────────────────────────────────
Advertisement
Add Comment
Please, Sign In to add comment