How to Run Vagrant on Windows
As of now I have 6 boxes on Vagrant, however, many of the people that follow me that would like to do the boxes have never utilized Vagrant before. Let’s first start off with what is Vagrant. On their site, found here: https://www.vagrantup.com/ we can see that it is the “the creation and configuration of lightweight, reproducible, and portable development environments.”
Lets dive in and setup Vagrant, download a machine and then download a second machine to show how to change the vagrant file to what is needed.
Diving right in, lets go to the website above and download vagrant:
Top right allows us to download.
After we click download we are brought to the site above, I will be downloading for Windows and I will be downloading the AMD64 version. Once downloaded, I will be utilizing the default values:
Once downloaded, you will have to restart your system. Once restarted we can go into the Vagrant location in powershell or cmd prompt:
Notice we have a Vagrantfile and vagrant.exe for the executable. The executable will pull from the Vagrantfile to see what box you want downloaded, lets work on downloading our first box:
Going to the following site (https://app.vagrantup.com/boxes/search), we can see the below:
Lets create an account and then sign in to that account:
From here agree to the terms and you will be brought back to the login page:
Now we should have an email to confirm our account, thus allowing us to login:
After clicking verify we are brought to the following:
Go ahead and sign in:
I am using the default organization name that is given to us.
We are now done with this site, now we can finally… kind of download a box:
If you have boxes you will see them here, obviously I made a new account for this walkthrough, that is why there are zero boxes showing up. Now we can search for Vagrant Boxes:
We can now download a box, lets download Invoke1… but no so fast speed racer. We are not going to click download from the site… that can mess stuff up. Also take note that the machines are virtual box, which means we will need virtual box on our host system.
We are going to change the Vagrant file to whatever is stated in the box itself as shown:
Notice above, where to put the box you want to download is only a few lines down. Now we want to save that file (something of note, if you did not run powershell as administrator you may have to do the above over again to be able to save the file).
Now that it is saved, type vagrant up and we will start to download the machine. Again, something of note, if defender is running the machine may not download from vagrant, which means we need to either allow it within the defender settings or shut down defender for a period of time. This is also the same for any Anti-Virus you may have running.
After a few minutes the box downloads and then auto-opens in Virtual Box.
Note: The machine will start giving errors, this is because vagrant is not a user on the box, that would be way too easy to hack it if vagrant:vagrant was on the machine itself…
Lastly, we need to change the network, right now it is connected to NAT, we can put this as an internal network or bridged adapter, whatever you are comfortable with and whatever your Kali machine can talk to:
Congratulations you have now downloaded your first machine… but what’s this you want to download another machine… easy day. We will head back into PowerShell, open our Vagrantfile and change the machine name, lets say Invoke2…
And just to show that the machine does work after resetting the interface and machine:
Happy hacking… and good luck to everyone with all the different Invoke machines currently on Vagrant.