diff --git a/Privesc/PowerUp.ps1 b/Privesc/PowerUp.ps1 index 072b03e6..9f62e85c 100644 --- a/Privesc/PowerUp.ps1 +++ b/Privesc/PowerUp.ps1 @@ -2463,7 +2463,7 @@ function Find-PathDLLHijack { Param() # use -LiteralPaths so the spaces in %PATH% folders are not tokenized - Get-Item Env:Path | Select-Object -ExpandProperty Value | ForEach-Object { $_.split(';') } | Where-Object {$_ -and ($_ -ne '')} | ForEach-Object { + (get-itemproperty "HKLM:\System\CurrentControlSet\Control\Session Manager\Environment").path.split(';') | ForEach-Object { $TargetPath = $_ $ModifidablePaths = $TargetPath | Get-ModifiablePath -LiteralPaths | Where-Object {$_ -and ($_ -ne $Null) -and ($_.ModifiablePath -ne $Null) -and ($_.ModifiablePath.Trim() -ne '')}