# Guide to install Game of Active Directory (GOAD) on VMware_ESXI

Good day Mates!  
For quite some time, I have been intending to address this matter, albeit various commitments have continuously impeded its realization.

**Requirements**

**For GOAD installation on ESXI you need to download the following tools**

1. create an ubuntu machine on ESXI server
    
2. ovftool —&gt; install it on the ubuntu machine
    
3. pywinrm and ansible —&gt; install it on the ubuntu machine
    
4. winrm —&gt; install it on the ubuntu machine
    
5. winrm-fs —&gt; install it on the ubuntu machine
    
6. winrm-elevated —&gt; install it on the ubuntu machine
    
7. GOAD repository
    

**STEP 1**

**Vagrant installation on Ubuntu Machine**

1. `mkdir tools`
    
2. `cd tools`
    
3. `wget`[`https://releases.hashicorp.com/vagrant/2.3.7/vagrant_2.3.7-1_amd64.deb`](https://releases.hashicorp.com/vagrant/2.3.7/vagrant_2.3.7-1_amd64.deb)
    
4. `dpkg -i vagrant_2.3.7-1_amd64.deb`
    

**STEP 2**

**install vagrant vmware esxi plugins**

1. `vagrant plugin install vagrant-vmware-esxi`
    
2. `vagrant plugin install vagrant-reload`
    
3. `vagrant plugin install vagrant-vmware-desktop`
    
4. `vagrant plugin install winrm`
    
5. `vagrant plugin install winrm-fs`
    
6. `vagrant plugin install winrm-elevated`
    

**install Ansible and pywinrm**

1. `pip3 install --include-deps ansible`
    
2. `pip3 install ansible-core`
    
3. `pip3 install ansible-core==2.12.3`
    
4. `pip3 install pywinrm`
    

**STEP 3**

**Download the Goad repository from the Github and configure some initial files for vmware\_esxi compatibility**

`git clone`[`https://github.com/Orange-Cyberdefense/GOAD`](https://github.com/Orange-Cyberdefense/GOAD)

`in this directory GOAD/ansible install the “requirements.yml” file using the following command —> ansible-galaxy install -r ansible/requirements.yml`

**STEP 4**

In the main directory of the “GOAD” remove the previous goad.sh file and use the provided [goad.sh](https://github.com/zeeshanm0x0/GOAD-config/blob/main/goad.sh) file and replace the old file with this new one provided file.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710917636256/3b924b69-af63-4d52-b465-6af71f0dd790.png align="center")

Create a directory called “vmware\_esxi” in this directory → “/GOAD/ad/GOAD-Light/providers”

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710917682971/6320a994-de24-4889-aef9-1bc148855875.png align="center")

Now we have the directory called “/GOAD/ad/GOAD-Light/providers/vmware\_esxi”

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710917714356/03346b40-4b2a-4067-92df-ba2203396ca7.png align="center")

**STEP 5**

Now go back to the main GOAD directory and run the goad.sh

Now run the [goad.sh](http://goad.sh) using the follwing command:

`bash`[`goad.sh`](http://goad.sh)`-t check -l GOAD-LIGHT -p vmware_esxi -m local`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710917776201/0801a2b9-756e-4c7f-9f6c-8944e72fe12c.png align="center")

→ 2 file will be generated they will be Vagrantfile and inventory

→ Replace these two files with these [Vagrantfile](https://github.com/zeeshanm0x0/GOAD-config/blob/main/Vagrantfile) & [inventory](https://github.com/zeeshanm0x0/GOAD-config/blob/main/inventory) in the "/GOAD/ad/GOAD-Light/providers/vmware\_esxi" directory.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710917930501/5b3e8b09-da31-4314-8ff7-40bfee282fbd.png align="center")

Note: if you want to change the ips of DC01, DC02, SRV02 you have to change the ips inside the inventory file too. This will be used with ansible-playbook while installing the vulnerable AD-set.

**STEP 6**

**Install the OVFTOOL in the ubuntu machine**

Since our ESXI version is 8.0.2 we will download the latest version of ovftool which is “v4.6.2” from “https://developer.vmware.com/web/tool/4.6.2/ovf-tool/[”](http://developer.vmware.com/web/tool/4.6.2/ovf-tool/%E2%80%9D)

download-Link with the wget command :

`wget`[`https://vdc-download.vmware.com/vmwb-repository/dcr-public/8a93ce23-4f88-4ae8-b067-ae174291e98f/c609234d-59f2-4758-a113-0ec5bbe4b120/VMware-ovftool-4.6.2-22220919-lin.x86_64.zip`](https://vdc-download.vmware.com/vmwb-repository/dcr-public/8a93ce23-4f88-4ae8-b067-ae174291e98f/c609234d-59f2-4758-a113-0ec5bbe4b120/VMware-ovftool-4.6.2-22220919-lin.x86_64.zip)

`Unzip the ovftool file by the follwing command`

`unzip VMware-ovftool-4.6.2-22220919-lin.x86_`[`64.zip`](http://64.zip)

`echo $PATH`

`cd ovftool`

`pwd`

`export PATH=/home/management/tools/ovftool:/home/management/.local/bin:/usr/local/sbin:/usr/local/bin:/ usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710918175321/9723478f-d021-40f8-a463-5c52d834b9de.png align="center")

**STEP 7**

**Configuring the IP addresses automatically assigned by the vagrant in the provisioning files**

Go to the following directory and configure the IP addresses → “/GOAD/ad/GOAD-Light/providers/vmware\_esxi”

edit the files as in the screenshots

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710918941399/96eb9ed0-ca0b-4e5e-90bc-6b9c4126bea9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710918964773/f7d733df-f862-4ad8-b390-69dcad3796d1.png align="center")

**STEP 8**

**DEPLOYING WINDOWS ACTIVE DIRECTORY MACHINES ON ESXI sever**

Go to the following directory “ad/GOAD-Light/providers/vmware\_esxi/” Then run the follwing command: vagrant up

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710918299961/17eab93c-2a71-4bb8-b7e8-67955d1d09bd.png align="center")

check the adapters of the machines deployed using the vagrant up command

POC of the network adapter of the ubuntu machine

Ubuntu Machine is on the same network as the DCO1 Adapters

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710918410437/a4df7514-eca5-44ab-93ba-52a0f187947d.png align="center")

POC: we don't need to change the adapters in order for the provisioning to work properly both of the adapters should be on the same network like in the following screenshots

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710918433073/6968438f-63e2-4179-b035-248bb24a4901.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710918553945/c949114a-20d5-400a-9164-f51187f7fbad.png align="center")

This is the network scheme of all the machines

**Important Note:** Goad provisioning file considering Ethernet0 as the domain adapter and Ethernet1 as the NAT adapter. We will configure the domain adapter IP addresses in the inventory and the Vagrant file before provisioning.

`DCO1`

`Ethernet adapter Ethernet0: IPv4 Address. . . . . . . . . . . : 172.70.0.70`

`Ethernet adapter Ethernet1: IPv4 Address. . . . . . . . . . . : 172.70.0.71`

`DC02`

`Ethernet adapter Ethernet0: IPv4 Address. . . . . . . . . . . : 172.70.0.74`

`Ethernet adapter Ethernet1: IPv4 Address. . . . . . . . . . . : 172.70.0.75`

`SRV02`

`Ethernet adapter Ethernet0: IPv4 Address. . . . . . . . . . . : 172.70.0.68`

`Ethernet adapter Ethernet1: IPv4 Address. . . . . . . . . . . : 172.70.0.69`

**STEP 9**

**Start the provisioning using the ansible**

Go to the following directory “/GOAD/ansible”

Run the following command before provisioning:

`export ANSIBLE_COMMAND="ansible-playbook -i ../ad/GOAD-Light/data/inventory -i ../ad/GOAD-Light/ providers/vmware_esxi/inventory"`

Run the following command to run the provisioning: `../scripts/provisionning.sh`

Special Thanks to my friend [Syed Asadullah](https://www.linkedin.com/in/syed-a-b48906230) for the help especially in networking part he has done a great job.
