GOAD is a pentest active directory LAB project.
The purpose of this lab is to give pentesters a vulnerable Active directory environement ready to use to practice usual attack techniques.
warning
This lab is extremly vulnerable, do not reuse receipe to build your environement and do not deploy this environment on internet (this is a recommendation, use it as your own risk)
This repository is for pentest practice only.
licences
This lab use free windows VM only (180 days). After that delay enter a licence on each server or rebuild all the lab (may be it's time for an update ;))
Installation
Requirements
So far the lab has only been tested on a linux machine, but it should work as well on macOS. Ansible has some problems with Windows hosts so I don't know about that.
For the setup to work properly you need to install:
Virtualbox
virtualbox actually the vms are provided to be run on virtualbox so you need a working virtualbox environement on your computer
Vagrant
vagrant from their official site vagrant. The version you can install through your favourite package manager (apt, yum, ...) is probably not the latest one.
Vagrant and virtualbox are used to provide the virtual machines and Ansible is use to automate the configuration and vulnerabilites setup.
V2 breaking changes
If you previously install the v1 do not try to update as a lot of things have changed. Just drop your old lab and build the new one (you will not regret it)
Chocolatey is no more used and basic tools like git or notepad++ are no more installed by default (as chocolatey regulary crash the install due to hiting rate on multiples builds)
ELK is no more installed by default to save ressources but you still can install it separately (see the blueteam/elk part)
Dragonstone vm as disapear and there is no more DC replication in the lab to save resources
Wintefell is now a domain controler for the subdomain north of the sevenkingdoms.local domain
Space use
the lab take environ 77GB (but you have to get the space for the vms vagrant images windows server 2016 (22GB) / windows server 2019 (14GB) / ubuntu 18.04 (502M))
the total space needed for the lab is ~115 GB (and more if you take snapshots)
Start / Setup
The default domain will be sevenkingdoms.local, on the subnet 192.168.56.1/24 and each machine has only been allocated with 1CPU and 1024MB of memory. If you want to change some of these performance settings you can modify the Vagrantfile.
To have the lab up and running this is the commands you should do:
VMs creation
git clone git@github.com:Orange-Cyberdefense/GOAD.git
cd GOAD/
vagrant up # this will create the vms
VMs provisionning
in one command just play :
ansible-playbook main.yml # this will configure the vms in order to play ansible when the vms are ready
Or you can run playbooks one by one (mostely for debug or if you get trouble during install)
The main.yml playbook is build in multiples parts. each parts can be re-run independently but the play order must be keep in cas you want to play one by one :
ansible-playbook build.yml # Install stuff and prepare vm
ansible-playbook ad-servers.yml # create main domains, child domain and enroll servers
ansible-playbook ad-trusts.yml # create the trust relationships
ansible-playbook ad-data.yml # import the ad datas : users/groups...
ansible-playbook servers.yml # Install IIS and MSSQL
ansible-playbook ad-relations.yml # set the rights and the group domains relations
ansible-playbook adcs.yml # Install ADCS on essos
ansible-playbook ad-acl.yml # set the ACE/ACL
ansible-playbook security.yml # Configure some securities (adjust av enable/disable)
ansible-playbook vulns.yml # Configure some vulnerabilities
when you finish playing you could do :
vagrant halt # will stop all the vm
to just relaunch the lab (no need to replay ansible as you already do that in the first place)
vagrant up # will start the lab
if you got some errors see the troobleshooting section at the end of the document, but in most case if you get errors during install, don't think and just replay the main playbook (most of the errors which could came up are due to windows latency during installation, wait few minutes and replay the main.yml playbook)
This lab is actually composed of five virtual machines:
kingslanding : DC01 running on Windows Server 2019 (with windefender enabled by default)
winterfell : DC02 running on Windows Server 2019 (with windefender enabled by default)
castelblack : SRV02 running on Windows Server 2019 (with windefender disabled by default)
meereen : DC03 running on Windows Server 2016 (with windefender enabled by default)
braavos : SRV03 running on Windows Server 2016 (with windefender enabled by default)
domain : north.sevenkingdoms.local
winterfell : DC01
castelblack : SRV02 : MSSQL / IIS
domain : sevenkingdoms.local
kingslanding : DC02
castelrock : SRV01 (disabled due to resources reasons)
domain : essos.local
braavos : DC03
meeren : SRV03 : MSSQL / ADCS
The lab setup is automated using vagrant and ansible automation tools.
You can change the vm version in the Vagrantfile according to Stefan Scherer vagrant repository : https://app.vagrantup.com/StefanScherer
In most case if you get errors during install, don't think and just replay the main playbook (most of the errors which could came up are due to windows latency during installation, wait few minutes and replay the main.yml playbook)
ansible-playbook main.yml
Ansible-playbook
old Ansible version
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in'/home/hrrb0032/Documents/mission/GOAD/roles/domain_controller/tasks/main.yml': line 8, column 3, but maybe elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: disable enhanced exit codes
^ here
solution : upgrade Ansible
old ansible.windows version
ERROR! couldn't resolve module/action 'win_powershell'. This often indicates a misspelling, missing collection, or incorrect module path.