mirror of
https://github.com/PowerShellMafia/PowerSploit
synced 2026-06-08 12:13:33 +00:00
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:
@@ -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
|
||||
"@
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user