This repository was archived by the owner on Jan 21, 2021. It is now read-only.
Fix for target not being able to launch powershell after adding persistence#225
Open
kafkaesqu3 wants to merge 1 commit intoPowerShellMafia:devfrom
Open
Fix for target not being able to launch powershell after adding persistence#225kafkaesqu3 wants to merge 1 commit intoPowerShellMafia:devfrom
kafkaesqu3 wants to merge 1 commit intoPowerShellMafia:devfrom
Conversation
…ell while certain persistence mechanisms were in place. Payload now executes in the background
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Powersploit's persistence mechanisms are deployed, the user on the target machine will not be able to run powershell. This is because the payload (which is run inside a script in the user's profile) never returns, so the prompt will hang forever. This can be a problem since it might cause the target to become suspicious and investigate why he can't run powershell, finding the persistence mechanism.
I fixed this by running the payload as a job and sending output to out-null. This way when a persistence mechanism is deployed on a target machine, the user can still run powershell without it hanging and without seeing payload output.