From 589afa35e87d1fa528fccd2771eff6e903909f42 Mon Sep 17 00:00:00 2001 From: Bubbl3H3d <31154539+Bubbl3H3d@users.noreply.github.com> Date: Sun, 1 Oct 2017 15:01:55 -0400 Subject: [PATCH] PowerUp.ps1:1507 - Remove dllhost args The original instantiation of this line of code would cause errors with dllhost.exe /ProccessId:{...} arg (normally hidden by the -ErrorActionPreference = "SilentlyContinue" flag). The proposed change strips these args, allowing the remaining value to be evaluated by the script vice skipping over it due to an error. --- Privesc/PowerUp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Privesc/PowerUp.ps1 b/Privesc/PowerUp.ps1 index 072b03e6..67923f0c 100644 --- a/Privesc/PowerUp.ps1 +++ b/Privesc/PowerUp.ps1 @@ -1504,7 +1504,7 @@ function Get-ModifiableServiceFile { Get-WMIObject -Class win32_service | Where-Object {$_ -and $_.pathname} | ForEach-Object { $ServiceName = $_.name - $ServicePath = $_.pathname + $ServicePath = $_.pathname.split("/")[0] $ServiceStartName = $_.startname $ServicePath | Get-ModifiablePath | ForEach-Object {