From 794a93e15000c8599919d063a65e1f30fcee765d Mon Sep 17 00:00:00 2001 From: Bubbl3H3d <31154539+Bubbl3H3d@users.noreply.github.com> Date: Sun, 1 Oct 2017 15:04:25 -0400 Subject: [PATCH] PowerUp.ps1:2850 - Filter Out Null/Blank Output Added "where-Object $_ -contains '\'" to prevent null or blank output from being passed to Get-ModifiablePath --- Privesc/PowerUp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Privesc/PowerUp.ps1 b/Privesc/PowerUp.ps1 index 072b03e..d82d4d5 100644 --- a/Privesc/PowerUp.ps1 +++ b/Privesc/PowerUp.ps1 @@ -2847,7 +2847,7 @@ function Get-ModifiableRegistryAutoRun { $Path = $($Keys.GetValue($Name)) - $Path | Get-ModifiablePath | ForEach-Object { + $Path | where-Object $_ -contains '\' | Get-ModifiablePath | ForEach-Object { $Out = New-Object PSObject $Out | Add-Member Noteproperty 'Key' "$ParentPath\$Name" $Out | Add-Member Noteproperty 'Path' $Path