Building Attack Range Local
When running the following command the following error is produced.
Command: "python attack_range_local.py" -a build
Error: "The VirtualBox VM was created with a user that doesn't match the current user running Vagrant. VirtualBox requires that the same user be used to manage the VM that was created. Please re-run Vagrant with that user. This is not a Vagrant issue."
Can you please explain a little further on how you have set up the system?
I simply ran the following script:
#!/bin/bash sudo apt-get update sudo apt-get install -y python3-dev linux-headers-generic python-dev unzip python-pip vagrant virtualbox virtualbox-dkms python-virtualenv git ruby-full sudo gem install winrm-elevated sudo gem install winrm git clone https://github.com/splunk/attack_range_local && cd attack_range_local virtualenv -p python3 venv source venv/bin/activate pip install -r requirements.txt
Note I had to add git and ruby-full (for gem) as those packages were not present and also needed to be installed. The first time I ran the build command it ran successfully. I'm not sure if I need to run it each time or just once but if I try to run it a second time it fails.
The script above is only needed once for installation. Did the first build ran successfull?
yes. so after the first build what are the steps to run the simulations again after you have shut down and logged off and then powered on again?
After the build for each run, after you have powered off the machine and restarted, is the correct sequence as follows:
- cd to attack_range_local directory location
- source venv/bin/activate
- python attack_range_local.py -a simulate -st T1003.001 -t attack-range-windows-domain-controller
Nothing more to add! :)