1 2 3 |
$valor = [System.Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes('$ip=[IPAddress]"0.0.0.0";$TcpListener=New-Object System.Net.Sockets.TcpListener (New-Object System.Net.IPEndPoint($ip,"2051"));$TcpListener.Start();while($true){$mensaje=(New-Object System.IO.StreamReader($TcpListener.AcceptTcpClient().GetStream())).ReadLine();$mensaje};$TcpListener.Stop()')) C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -encodedcommand $valor |