Fix for profile cleanup
When removing the persistence, the profile is not cleaned up. This is a temporary fix for that which should leave any legitemate profile content in tact. This psm may need a rework though. Related to: https://github.com/PowerShellMafia/PowerSploit/issues/165
This commit is contained in:
parent
7a3e16ace5
commit
d5c0abc9fa
|
|
@ -740,8 +740,10 @@ else
|
|||
$PersistenceRemoval = @"
|
||||
# Execute the following to remove the elevated persistent payload
|
||||
$ElevatedTriggerRemoval
|
||||
(gc `$PROFILE.AllUsersAllHosts) -replace '[\s]{600}.+',''| Out-File `$PROFILE.AllUsersAllHosts -Fo
|
||||
# Execute the following to remove the user-level persistent payload
|
||||
$UserTriggerRemoval
|
||||
(gc `$PROFILE.CurrentUserAllHosts) -replace '[\s]{600}.+',''| Out-File `$PROFILE.CurrentUserAllHosts -Fo
|
||||
"@
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue