Coder Social home page Coder Social logo

Comments (10)

erran-r7 avatar erran-r7 commented on September 4, 2024

Looks like the cause for shutting down was a WinRM WSManFault (code: 2150859174):

The WS-Management service cannot process the request. This user is allowed a maximum number of 50 concurrent operations, which has been exceeded. Close existing operations for this user, or raise the quota for this user.

from metasploitable3.

Sliim avatar Sliim commented on September 4, 2024

I got the same error, my workaround was to reload the virtual machine during the provisioning...

diff --git a/Vagrantfile b/Vagrantfile
index 9f30c87..c572073 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -27,6 +27,8 @@ Vagrant.configure("2") do |config|
   config.vm.provision :shell, path: "scripts/configs/create_users.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614

+  config.vm.provision :reload
+
   # Vulnerability - Unpatched IIS
   config.vm.provision :shell, path: "scripts/installs/setup_iis.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
@@ -35,6 +37,8 @@ Vagrant.configure("2") do |config|
   config.vm.provision :shell, path: "scripts/installs/setup_caidao.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614

+  config.vm.provision :reload
+
   # Vulnerability - Setup for Apache Struts
   config.vm.provision :shell, path: "scripts/chocolatey_installs/java.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
@@ -50,6 +54,8 @@ Vagrant.configure("2") do |config|
   config.vm.provision :shell, path: "scripts/installs/start_glassfish_service.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614

+  config.vm.provision :reload
+
   # Vulnerability - Jenkins (1.8)
   config.vm.provision :shell, path: "scripts/installs/setup_jenkins.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
@@ -57,4 +63,4 @@ Vagrant.configure("2") do |config|
   # Configure Firewall to open up vulnerable services
   config.vm.provision :shell, path: "scripts/configs/configure_firewall.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
-end
\ No newline at end of file
+end

from metasploitable3.

jbarnett-r7 avatar jbarnett-r7 commented on September 4, 2024

There is a bug with the latest version of Vagrant (1.8.5) that is preventing the open WinRM connections to close out properly in between script calls. The bug is documented at hashicorp/vagrant#7489 and also seems to be related to the bug referenced in hashicorp/vagrant#7614. This has been a pain during development and multiple workarounds were necessary.

I personally added this monkey patch to my personal environment, but a lot of others in those threads recommend using Vagrant 1.8.1 instead. I actually recommended this in the wiki, but this issue makes me realize I need to add it to the README also.

Let us know if the above workarounds resolve the issue for you.

from metasploitable3.

jbarnett-r7 avatar jbarnett-r7 commented on September 4, 2024

I added build scripts for both Windows Powershell and bash. It will go through and check your environment to ensure everything is compatible. If you're still having issues building you might want to give that a shot. I'd like to know how it works for you.

from metasploitable3.

ptrac3 avatar ptrac3 commented on September 4, 2024

I have tried the change and the VM boots up bust only a few services are up and running so there i'm still experiencing issue..:(

from metasploitable3.

jbarnett-r7 avatar jbarnett-r7 commented on September 4, 2024

Thank you for giving that a shot. I think what happened is that Vagrant is trying to continue from where it left off when it errored out the previous time. It does this in order to cut down on time and avoid re-doing the same tasks. Since it errorerd out previously you're missing everything from before the point it restarted from.

I would suggest doing a vagrant destroy to remove the VM that is currently in error state, and then doing vagrant up again. That should get all of the services up for you. Please let me know how it goes.

Also, I'll look into updating the build script to add messaging around this to make it more clear.

from metasploitable3.

LonerVamp avatar LonerVamp commented on September 4, 2024

I also ran into the issue with having more than 50 concurrent operations in WinRM. I was able to sneak a command onto the VM after the first reboot. Logged in, opened a cmd window, and quickly sent in: "winrm set winrm/config/service @{MaxConcurrentOperationsPerUser="500"}

from metasploitable3.

busterb avatar busterb commented on September 4, 2024

Thanks @LonerVamp - is your change persistent across reboots? If so, we could probably add that to the packer provisioning steps as a workaround as well.

from metasploitable3.

LonerVamp avatar LonerVamp commented on September 4, 2024

Yup, that should be a persistent value on the OS.

from metasploitable3.

jbarnett-r7 avatar jbarnett-r7 commented on September 4, 2024

I put a PR up to increase the base limits: #27

This should be fixed with the next Vagrant release, but this will get us through in the meantime.

from metasploitable3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.