aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmj0y <will@harmj0y.net>2016-06-07 13:00:14 -0400
committerHarmj0y <will@harmj0y.net>2016-06-07 13:00:14 -0400
commit5d7fe6b10047f95ffdd8292419dec437c6e14244 (patch)
treeafa427b4e0b9aef96c4e57f3bcfa4f2dd1dae78e
parentb6306a0d8c356d23a00a8fb2288683bffa2b492c (diff)
downloadPowerSploit-5d7fe6b10047f95ffdd8292419dec437c6e14244.tar.gz
PowerSploit-5d7fe6b10047f95ffdd8292419dec437c6e14244.zip
Corrected -Path parameter in Write-ServiceBinary
-rw-r--r--Privesc/PowerUp.ps112
1 files changed, 6 insertions, 6 deletions
diff --git a/Privesc/PowerUp.ps1 b/Privesc/PowerUp.ps1
index 8dd14c5..39e571a 100644
--- a/Privesc/PowerUp.ps1
+++ b/Privesc/PowerUp.ps1
@@ -1458,7 +1458,7 @@ function Get-ServiceUnquoted {
$Out | Add-Member Noteproperty 'Path' $Service.pathname
$Out | Add-Member Noteproperty 'ModifiablePath' $_
$Out | Add-Member Noteproperty 'StartName' $Service.startname
- $Out | Add-Member Noteproperty 'AbuseFunction' "Write-ServiceBinary -Name '$($Service.name)' -ServicePath <HijackPath>"
+ $Out | Add-Member Noteproperty 'AbuseFunction' "Write-ServiceBinary -Name '$($Service.name)' -Path <HijackPath>"
$Out | Add-Member Noteproperty 'CanRestart' $CanRestart
$Out
}
@@ -1896,7 +1896,7 @@ function Write-ServiceBinary {
Custom command to execute instead of user creation.
- .PARAMETER ServicePath
+ .PARAMETER Path
Path to write the binary out to, defaults to 'service.exe' in the local directory.
@@ -1960,7 +1960,7 @@ function Write-ServiceBinary {
$Command,
[String]
- $ServicePath = "$(Convert-Path .)\service.exe"
+ $Path = "$(Convert-Path .)\service.exe"
)
BEGIN {
@@ -2011,11 +2011,11 @@ function Write-ServiceBinary {
$Binary[$i+2535] = $CommandBytes[$i]
}
- Set-Content -Value $Binary -Encoding Byte -Path $ServicePath -Force -ErrorAction Stop
+ Set-Content -Value $Binary -Encoding Byte -Path $Path -Force -ErrorAction Stop
$Out = New-Object PSObject
$Out | Add-Member Noteproperty 'ServiceName' $TargetService.Name
- $Out | Add-Member Noteproperty 'ServicePath' $ServicePath
+ $Out | Add-Member Noteproperty 'Path' $Path
$Out | Add-Member Noteproperty 'Command' $ServiceCommand
$Out
}
@@ -2176,7 +2176,7 @@ function Install-ServiceBinary {
Write-Warning "Error backing up '$ServicePath' : $_"
}
- $Result = Write-ServiceBinary -Name $ServiceDetails.Name -Command $ServiceCommand -ServicePath $ServicePath
+ $Result = Write-ServiceBinary -Name $ServiceDetails.Name -Command $ServiceCommand -Path $ServicePath
$Result | Add-Member Noteproperty 'BackupPath' $BackupPath
$Result
}