diff options
author | HarmJ0y <will@harmj0y.net> | 2016-04-08 12:59:01 -0700 |
---|---|---|
committer | HarmJ0y <will@harmj0y.net> | 2016-04-08 12:59:01 -0700 |
commit | 785f4757bd5a8ac4b8cdcd8f3b2b0175b30d1066 (patch) | |
tree | 8fc41d79feff990bcc15de494238355597eb965d | |
parent | 37389e965895b1f478fef8f65ad9699705c191a7 (diff) | |
parent | 84b8e1da9ae80de0b7e677f8b9d4b631778c02ea (diff) | |
download | PowerSploit-785f4757bd5a8ac4b8cdcd8f3b2b0175b30d1066.tar.gz PowerSploit-785f4757bd5a8ac4b8cdcd8f3b2b0175b30d1066.zip |
Merge pull request #122 from joncave/patch-1
Find-PathHijack: Expand environment variables in path
-rw-r--r-- | Privesc/PowerUp.ps1 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Privesc/PowerUp.ps1 b/Privesc/PowerUp.ps1 index 3f6be9f..cb2bda5 100644 --- a/Privesc/PowerUp.ps1 +++ b/Privesc/PowerUp.ps1 @@ -1292,6 +1292,7 @@ function Find-PathHijack { if (-not $Path.EndsWith("\")){ $Path = $Path + "\" } + $Path = [System.Environment]::ExpandEnvironmentVariables($Path) # reference - http://stackoverflow.com/questions/9735449/how-to-verify-whether-the-share-has-write-access $TestPath = Join-Path $Path ([IO.Path]::GetRandomFileName()) |