### Install Virtualbox on Ubuntu Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md This command installs Virtualbox on an Ubuntu system. ```bash sudo apt install virtualbox ``` -------------------------------- ### Install SCCM Lab with Proxmox Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/labs/SCCM.md Commands to install the SCCM lab environment using the GOAD script with the Proxmox provider on a local machine. This includes the initial installation and a command to re-run Ansible if issues arise. ```bash ./goad.sh -t check -l SCCM -p proxmox -m local ./goad.sh -t install -l SCCM -p proxmox -m local ``` ```bash ./goad.sh -t install -l SCCM -p proxmox -m local -a ``` -------------------------------- ### Install Vagrant VMware Utility Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md Installs the Vagrant VMware utility driver, which is required for Vagrant to manage VMware environments. This includes downloading the utility, setting up directories, generating certificates, and installing the service. ```bash cd /tmp wget https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_linux_amd64.zip sudo mkdir -p /opt/vagrant-vmware-desktop/bin sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install ``` -------------------------------- ### Setup Python Virtual Environment for Ansible Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md This sequence of commands clones the GOAD repository, installs Python 3.8 virtual environment, and activates it for Ansible setup. ```bash sudo apt install git git clone git@github.com:Orange-Cyberdefense/GOAD.git cd GOAD/ansible sudo apt install python3.8-venv python3.8 -m virtualenv .venv source .venv/bin/activate ``` -------------------------------- ### Install Vagrant on Ubuntu Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md This command installs Vagrant on an Ubuntu system using HashiCorp's official repository. ```bash wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt update && sudo apt install vagrant ``` -------------------------------- ### Launch Installation (Local Ansible) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md This command automatically launches Vagrant up and the Ansible playbooks for installation when running Ansible locally. ```bash ./goad.sh -t install -l GOAD -p virtualbox -m local ``` -------------------------------- ### Install Vagrant Plugin Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md Installs the 'vagrant-vmware-desktop' plugin, which is necessary for Vagrant to interface with VMware environments. ```bash vagrant plugin install vagrant-vmware-desktop ``` -------------------------------- ### Quick Install Ubuntu 22.04 with GOAD Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/installation/index.md This snippet provides a comprehensive set of bash commands to install Virtualbox, Vagrant, necessary Vagrant plugins, and other dependencies on Ubuntu 22.04. It then clones the GOAD repository, navigates into the directory, and executes commands to check and install GOAD using the virtualbox provider, finally launching GOAD in interactive mode. ```bash # Install vbox sudo apt install virtualbox # Install vagrant wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt update && sudo apt install vagrant # Install Vagrant plugins vagrant plugin install vagrant-reload vagrant-vbguest winrm winrm-fs winrm-elevated # Add some dependencies sudo apt install sshpass lftp rsync openssh-client python3.10-venv git clone https://github.com/Orange-Cyberdefense/GOAD.git cd GOAD # verify installation ./goad.sh -t check -l GOAD -p virtualbox # install ./goad.sh -t install -l GOAD -p virtualbox # launch goad in interactive mode ./goad.sh ``` -------------------------------- ### Initial GOAD Setup and Configuration Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/installation/linux.md This snippet outlines the initial steps to clone the GOAD repository, install necessary Python virtual environment packages, configure the API key in goad.ini, and run the GOAD script with specific parameters. ```bash git clone https://github.com/Orange-Cyberdefense/GOAD.git cd GOAD sudo apt install python3.11-venv ./goad.sh ...>exit vim ~/.goad/goad.ini # add the api_key in the config file (keep impersonate to yes and use an admin user) ./goad.sh -p ludus ...>set_lab XXX # GOAD/GOAD-Light/NHA/SCCM ...>install ``` -------------------------------- ### Create Virtual Machines with Vagrant Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md This command navigates to the Virtualbox provider directory and initiates the creation and startup of virtual machines using Vagrant. ```bash cd ad/GOAD/providers/virtualbox vagrant up ``` -------------------------------- ### Create VMs with Vagrant Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md This command navigates to the VMware provider directory and initiates the creation and startup of virtual machines using Vagrant. ```bash cd ad/GOAD/providers/vmware vagrant up ``` -------------------------------- ### Create VMs Manually with Vagrant Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md This command navigates to the VMware ESXi provider directory and initiates the creation of virtual machines using Vagrant. Ensure WinRM gems are installed if required for your distribution. ```bash cd ad/GOAD/providers/vmware_esxi vagrant up ``` -------------------------------- ### Setup Python Virtual Environment for Ansible Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md Creates and activates a Python virtual environment for Ansible, ensuring project dependencies are isolated. It also clones the GOAD repository and installs necessary packages. ```bash sudo apt install git git clone git@github.com:Orange-Cyberdefense/GOAD.git cd GOAD/ansible sudo apt install python3.8-venv python3.8 -m virtualenv .venv source .venv/bin/activate ``` -------------------------------- ### Check and Install GOAD on Proxmox Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_proxmox.md This snippet provides bash commands to check prerequisites and install the GOAD environment on a Proxmox setup. It requires the 'goad.sh' script to be available. ```bash # check prerequisites ./goad.sh -t check -l GOAD -p proxmox ``` ```bash # Install ./goad.sh -t install -l GOAD -p proxmox ``` -------------------------------- ### Install Vagrant Plugins for WinRM Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md These commands install the necessary Ruby gems for Windows Remote Management (WinRM) on recent Ubuntu versions. ```bash gem install winrm winrm-fs winrm-elevated ``` -------------------------------- ### Launch Provisioning with Ansible (Direct Ansible) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md Launches an Ansible playbook directly. This command navigates to the 'ansible' directory and executes 'main.yml' using the specified inventory files. ```bash cd ansible/ ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/virtualbox/inventory main.yml ``` -------------------------------- ### Provision with Ansible (Direct) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md This command directly executes an Ansible playbook for provisioning. It navigates to the Ansible directory and specifies the inventory files and the main playbook. ```bash cd ansible/ ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/vmware/inventory main.yml ``` -------------------------------- ### Install Ansible and Pywinrm Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md These commands upgrade pip and install specific versions of ansible-core and pywinrm within the activated Python virtual environment. ```python python3 -m pip install --upgrade pip python3 -m pip install ansible-core==2.12.6 python3 -m pip install pywinrm ``` -------------------------------- ### Check and Install GOAD on Proxmox Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/providers/proxmox.md This snippet demonstrates how to check prerequisites and install GOAD on Proxmox using the goad.sh script. Ensure all prerequisites are met before running the installation commands. ```bash # check prerequisites ./goad.sh -t check -l GOAD -p proxmox ``` ```bash # Install ./goad.sh -t install -l GOAD -p proxmox ``` -------------------------------- ### Install WinRM Gems Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md Installs the necessary Ruby gems for Windows Remote Management (WinRM), which are required for certain Vagrant provisioning tasks on Windows. ```bash gem install winrm winrm-fs winrm-elevated ``` -------------------------------- ### Install Vagrant WinRM Plugins Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md These commands install necessary Vagrant plugins for Windows Remote Management (WinRM), which may be required for certain distributions to establish communication with the provisioned VMs. ```bash vagrant plugin install winrm ``` ```bash vagrant plugin install winrm-fs ``` ```bash vagrant plugin install winrm-elevated ``` -------------------------------- ### Provision with Ansible (Script) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md This command initiates the provisioning process by executing a provisioning script after setting the ANSIBLE_COMMAND environment variable. The variable configures Ansible to use specific inventory files. ```bash cd ansible export ANSIBLE_COMMAND="ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/vmware/inventory" ../scripts/provisionning.sh ``` -------------------------------- ### Install Vagrant on Ubuntu Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md Installs the latest version of Vagrant on Ubuntu systems using HashiCorp's official repository. This ensures compatibility and access to the newest features. ```bash wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt update && sudo apt install vagrant ``` -------------------------------- ### Install and Start ELK (VirtualBox, existing VM) Source: https://github.com/orange-cyberdefense/goad/blob/main/ad/GOAD/README.md Installs and starts the ELK stack for a GOAD lab using VirtualBox when the VM is already running. The `-a` flag indicates that the VM is already up, and `-r elk.yml` specifies the Ansible playbook. ```bash ./goad.sh -t install -l GOAD -p virtualbox -m local -a -r elk.yml -e elk ``` -------------------------------- ### Launch Ansible Provisioning Directly Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md This command directly executes Ansible playbooks for provisioning from the 'ansible' directory. It specifies the inventory files and the main playbook 'main.yml'. ```bash cd ansible/ ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/vmware_esxi/inventory main.yml ``` -------------------------------- ### Install and Start ELK (VirtualBox) Source: https://github.com/orange-cyberdefense/goad/blob/main/ad/GOAD/README.md Installs and starts the ELK stack for a GOAD lab using VirtualBox. The `-e elk` option adds ELK to the Vagrantfile for `vagrant up`, and `-r elk.yml` specifies the Ansible playbook to run. ```bash ./goad.sh -t install -l GOAD -p virtualbox -m local -r elk.yml -e elk ``` -------------------------------- ### Install VMware Lab with Goad (Interactive) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/providers/vmware.md This command initiates the installation process for a VMware lab using the Goad script. It prompts the user to specify the lab environment (e.g., GOAD, GOAD-Light, NHA, SCCM) and the IP range to be used for the lab setup. ```bash ./goad.sh -p vmware GOAD/vmware/local/192.168.56.X > set_lab GOAD/vmware/local/192.168.56.X > set_ip_range GOAD/vmware/local/192.168.56.X > install ``` -------------------------------- ### Install VMware Lab with Goad (Command Line) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/providers/vmware.md This command installs a VMware lab environment using the Goad script with all necessary arguments provided directly on the command line. It specifies the installation task, the platform (vmware), the lab, and the IP range to be used. ```bash ./goad.sh -t install -p vmware -l -ip ``` -------------------------------- ### Install VirtualBox and Vagrant Plugins (Bash) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/installation/linux.md Installs VirtualBox on Debian-based systems and essential Vagrant plugins for managing virtual machines, including reload, VMware guest additions, and Windows remote management. ```bash sudo apt install virtualbox ``` ```bash vagrant plugin install vagrant-reload vagrant-vbguest winrm winrm-fs winrm-elevated ``` -------------------------------- ### Install and Start ELK (VMware) Source: https://github.com/orange-cyberdefense/goad/blob/main/ad/GOAD/README.md Installs and starts the ELK stack for a GOAD lab using VMware. The `-e elk` option adds ELK to the Vagrantfile for `vagrant up`, and `-r elk.yml` specifies the Ansible playbook to run. ```bash ./goad.sh -t install -l GOAD -p vmware -m local -r elk.yml -e elk ``` -------------------------------- ### Setup Ubuntu VM with Ansible Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_azure.md Executes a setup script on the Ubuntu VM via SSH to install Ansible and download the GOAD repository. Requires the SSH key for the Ubuntu jumpbox. ```bash ssh -i ad/GOAD/providers/azure/ssh_keys/ubuntu-jumpbox.pem goad@ 'bash -s' < scripts/setup_azure.sh ``` -------------------------------- ### Launch Provisioning with Docker (Direct Ansible) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md Launches Ansible directly from within a Docker container. This command executes a specific Ansible playbook ('main.yml') after setting up the necessary inventory paths. ```bash sudo docker run -ti --rm --network host -h goadansible -v $(pwd):/goad -w /goad/ansible goadansible ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/virtualbox/inventory main.yml ``` -------------------------------- ### Install and Start ELK (VMware, existing VM) Source: https://github.com/orange-cyberdefense/goad/blob/main/ad/GOAD/README.md Installs and starts the ELK stack for a GOAD lab using VMware when the VM is already running. The `-a` flag indicates that the VM is already up, and `-r elk.yml` specifies the Ansible playbook. ```bash ./goad.sh -t install -l GOAD -p vmware -m local -a -r elk.yml -e elk ``` -------------------------------- ### Poetry: Install Python Dependencies Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/installation/linux.md Installs Python dependencies for GOAD using Poetry. This command reads the project's dependency information and installs them within a virtual environment managed by Poetry. ```bash poetry install ``` -------------------------------- ### Launch Provisioning with Ansible (Script) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md This command executes the provisioning script using Ansible after setting the ANSIBLE_COMMAND environment variable. It assumes you are in the 'ansible' directory. ```bash cd ansible export ANSIBLE_COMMAND="ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/vmware_esxi/inventory" ../scripts/provisionning.sh ``` -------------------------------- ### Install Lab Environment Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/usage/goad_console.md The 'install' command installs the selected lab environment based on the current configuration. This process includes creating instance folders, running provisioning tools (like Vagrant or Terraform), synchronizing source code, provisioning the jumpbox, and running Ansible for further setup. ```bash install ``` -------------------------------- ### Install Ansible Galaxy Requirements Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md This command installs all the necessary Ansible Galaxy collections specified in the requirements file. ```bash ansible-galaxy install -r ansible/requirements.yml ``` -------------------------------- ### Launch Installation (Docker Ansible) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md This command automatically launches Vagrant up and the Ansible playbooks for installation when running Ansible with Docker. ```bash ./goad.sh -t install -l GOAD -p virtualbox -m docker ``` -------------------------------- ### Goad Azure Step-by-Step Installation Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/providers/azure.md Step-by-step commands for installing and provisioning an Azure lab environment using Goad. ```bash GOAD/azure/remote/192.168.56.X > create_empty # create empty instance GOAD/azure/remote/192.168.56.X > load GOAD/azure/remote/192.168.56.X () > provide # play terraform GOAD/azure/remote/192.168.56.X () > sync_source_jumpbox # sync jumpbox source GOAD/azure/remote/192.168.56.X () > prepare_jumpbox # install dependencies on jumpbox GOAD/azure/remote/192.168.56.X () > provision_lab # run ansible ``` -------------------------------- ### Launch Provisioning with Ansible (Script) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md Launches the provisioning script using Ansible directly. This involves changing the directory to 'ansible', setting an environment variable for the Ansible command, and then executing the provisioning script. ```bash cd ansible export ANSIBLE_COMMAND="ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/virtualbox/inventory" ../scripts/provisionning.sh ``` -------------------------------- ### Install Vagrant on Ubuntu Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md Installs the Vagrant package manager on Ubuntu systems using HashiCorp's official repository. This ensures the latest version of Vagrant is installed. ```bash wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt update && sudo apt install vagrant ``` -------------------------------- ### Start Lab VMs with Vagrant Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/provisioning.md This command starts the lab environment by bringing up the previously created virtual machines. It assumes provisioning has already been completed. ```bash vagrant up ``` -------------------------------- ### Start and Create VMs with Vagrant Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/provisioning.md This command initiates the creation and startup of virtual machines defined in the Vagrantfile. Ensure you are in the GOAD project directory before execution. ```bash pwd /opt/GOAD vagrant up ``` -------------------------------- ### Install GOAD Automatically (Local Ansible) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md This command automatically installs GOAD using Vagrant and local Ansible execution. It specifies the target installation, GOAD environment, VMware provider, and local Ansible mode. ```bash ./goad.sh -t install -l GOAD -p vmware -m local ``` -------------------------------- ### Install Lab Instance Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/usage/goad_console.md Installs the current lab instance, which includes providing resources, preparing the jumpbox, and running lab provisioning. ```bash install ``` -------------------------------- ### Load Instance and Install ws01 Extension Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/extensions/ws01.md Loads a specific lab instance and installs the 'ws01' extension, which adds a Windows workstation to the lab. ```bash load install_extension ws01 ``` -------------------------------- ### Install Ansible Galaxy Requirements Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md Installs required Ansible collections from Ansible Galaxy, including 'ansible windows', 'community.windows', and 'community.general', which are needed for Windows-specific automation tasks. ```bash ansible-galaxy install -r ansible/requirements.yml ``` -------------------------------- ### Install Ansible Galaxy Requirements Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md Installs Ansible roles and collections specified in the requirements.yml file. This includes roles for Windows management and general community modules. ```bash ansible-galaxy install -r ansible/requirements.yml ``` -------------------------------- ### Goad Instance Creation Workflow Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/instances.md Explains the process of creating a goad instance, detailing how provider files are copied from templates and merged with data from ad and extensions folders to generate the final provider configuration. ```plaintext - On instance folder creation (when you run `install` or `create_empty`), the provider files inside the template/ folder are copied into the instance. - These files are merged with the datas inside `ad//providers//` folder and the datas inside `extensions//providers//` - The merged result is present in the `workspace//provider/` folder and contain all the recipes to create the infrastructure - inventories files are also copied from `ad//provider//inventory` and `extensions//inventory` (see [provisioning](provisioning.md) for more information in provisioning) ``` -------------------------------- ### Install GOAD Automatically (Docker Ansible) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md This command automatically installs GOAD using Vagrant and Ansible executed within a Docker container. It specifies the target installation, GOAD environment, VMware provider, and Docker Ansible mode. ```bash ./goad.sh -t install -l GOAD -p vmware -m docker ``` -------------------------------- ### Install WinRM Gems for Vagrant Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md These commands install the necessary WinRM gems for Vagrant to manage Windows environments. These are typically required for certain distributions when using Vagrant. ```bash vagrant plugin install winrm ``` ```bash vagrant plugin install winrm-fs ``` ```bash vagrant plugin install winrm-elevated ``` -------------------------------- ### Launch Provisioning with Docker (Script) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_virtualbox.md Launches the provisioning script using Docker. This command runs an Ansible playbook with failover on errors, mounting the current directory into the Docker container and setting the working directory to /goad/ansible. ```bash sudo docker run -ti --rm --network host -h goadansible -v $(pwd):/goad -w /goad/ansible goadansible /bin/bash -c "ANSIBLE_COMMAND='ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/virtualbox/inventory' ../scripts/provisionning.sh" ``` -------------------------------- ### Install lx01 Extension Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/extensions/lx01.md Commands to load an instance and install the lx01 extension within the GOAD environment. ```bash load install_extension lx01 ``` -------------------------------- ### Install Python Dependencies and Launch GOAD on Windows Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/installation/windows.md This snippet shows how to set up a Python virtual environment, install project dependencies from a requirements file, and launch the GOAD script on a Windows host. It requires Python and Git to be pre-installed. ```python git clone https://github.com/Orange-Cyberdefense/GOAD cd GOAD/ python -m venv .env source .env\Scripts\activate # In CMD: .env\Scripts\activate.bat pip install -r noansible_requirements.yml ``` ```python py goad.py -m vm ``` -------------------------------- ### Install Vagrant VMware ESXi Plugin Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md Installs the necessary Vagrant plugin for VMware ESXi integration. This plugin allows Vagrant to manage virtual machines on an ESXi host. ```bash vagrant plugin install vagrant-vmware-esxi ``` -------------------------------- ### Install Ansible and PyWinRM Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware.md Installs specific versions of Ansible Core and the PyWinRM library within the activated Python virtual environment. This is crucial for Ansible's ability to manage Windows hosts. ```bash python3 -m pip install --upgrade pip python3 -m pip install ansible-core==2.12.6 python3 -m pip install pywinrm ``` -------------------------------- ### Host Configuration Example (JSON) Source: https://github.com/orange-cyberdefense/goad/blob/main/ad/TEMPLATE/README.md An example of a host configuration within the `data/config.json` file. This demonstrates how to define specific settings for a host, including its hostname, administrative password, domain, local groups, scripts to run, and vulnerability-related configurations. ```json "hosts" : { "dc01" : { "hostname" : "dctemplate", "local_admin_password": "dc_and_domain_password", "domain" : "template.lab", "path" : "DC=template,DC=lab", "local_groups" : { "Administrators" : [ "template\\dcadmins" ] }, "scripts" : ["features.ps1"], "vulns" : ["files"], "vulns_vars" : { "files" : { "rdp" : { "src" : "flag.txt", "dest" : "c:\\users\\administrators\\desktop\\flag.txt" } } } }, ``` -------------------------------- ### Install WinRM Gems Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md Installs Ruby gems required for Windows Remote Management (WinRM), which might be needed for certain Vagrant operations on Windows environments or when interacting with Windows VMs. ```bash gem install winrm winrm-fs winrm-elevated ``` -------------------------------- ### Terraform Initialization Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_azure.md Initializes the Terraform working directory, downloading necessary providers and modules for Azure infrastructure setup. ```bash cd terraform terraform init ``` -------------------------------- ### Install Ansible and PyWinRM Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md Installs Ansible Core version 2.12.6 and the pywinrm package within the activated Python virtual environment. These are essential for running Ansible playbooks and managing Windows hosts. ```bash python3 -m pip install --upgrade pip python3 -m pip install ansible-core==2.12.6 python3 -m pip install pywinrm ``` -------------------------------- ### Install Virtualbox Lab (Command Line) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/providers/virtualbox.md This snippet provides a consolidated command-line approach to install a Virtualbox lab with GOAD, specifying the target installation type, platform, lab, and IP range in a single command. ```bash ./goad.sh -t install -p virtualbox -l -ip ``` -------------------------------- ### Setup Python Virtual Environment for Ansible Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md Creates and activates a Python virtual environment for Ansible and its dependencies. This isolates the project's Python packages from the system's global Python installation. ```bash sudo apt install git git clone git@github.com:Orange-Cyberdefense/GOAD.git cd GOAD/ansible sudo apt install python3.8-venv python3.8 -m virtualenv .venv source .venv/bin/activate ``` -------------------------------- ### Install GOAD Automatically (Ansible Local) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md This command automatically installs GOAD using Vagrant and Ansible playbooks when Ansible is run locally. It specifies the target environment as GOAD, provider as vmware_esxi, and execution mode as local. ```bash ./goad.sh -t install -l GOAD -p vmware_esxi -m local ``` -------------------------------- ### Provision SCCM Lab with GOAD (Proxmox) Source: https://github.com/orange-cyberdefense/goad/blob/main/ad/SCCM/README.md These bash commands initiate the check and installation process for the SCCM lab using the GOAD framework with the Proxmox provider in a local environment. Ensure all prerequisites are met before execution. ```bash ./goad.sh -t check -l SCCM -p proxmox -m local ./goad.sh -t install -l SCCM -p proxmox -m local ``` -------------------------------- ### Install GOAD Automatically (Ansible Docker) Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_vmware_esxi.md This command automatically installs GOAD using Vagrant and Ansible playbooks when Ansible is run within a Docker container. It specifies the target environment as GOAD, provider as vmware_esxi, and execution mode as docker. ```bash ./goad.sh -t install -l GOAD -p vmware_esxi -m docker ``` -------------------------------- ### Goad Interactive Console Installation Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/providers/aws.md This shows how to initiate the installation process directly from the Goad interactive console for the AWS environment. ```bash GOAD/aws/remote/192.168.56.X > install ``` -------------------------------- ### Run Individual Ansible Playbooks for Provisioning Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/provisioning.md This section lists individual Ansible playbooks that can be run sequentially to provision the lab environment. Each playbook handles specific aspects of the setup, such as domain creation, member addition, and software installation. The order is important for successful provisioning. ```ansible ANSIBLE_COMMAND="ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/virtualbox/inventory" $ANSIBLE_COMMAND build.yml $ANSIBLE_COMMAND ad-servers.yml $ANSIBLE_COMMAND ad-parent_domain.yml $ANSIBLE_COMMAND ad-child_domain.yml sleep 5m $ANSIBLE_COMMAND ad-members.yml $ANSIBLE_COMMAND ad-trusts.yml $ANSIBLE_COMMAND ad-data.yml $ANSIBLE_COMMAND ad-gmsa.yml $ANSIBLE_COMMAND laps.yml $ANSIBLE_COMMAND ad-relations.yml $ANSIBLE_COMMAND adcs.yml $ANSIBLE_COMMAND ad-acl.yml $ANSIBLE_COMMAND servers.yml $ANSIBLE_COMMAND security.yml $ANSIBLE_COMMAND vulnerabilities.yml $ANSIBLE_COMMAND reboot.yml ``` -------------------------------- ### Vagrant Provider Configuration Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/developers/add_lab.md Demonstrates the setup for Vagrant-based providers (VirtualBox, VMware), including inventory and Vagrantfile. ```bash # Inventory specific to the provider # Example: # [virtualbox_vms] # vm_name gui=true ``` ```ruby Vagrant.configure("2") do |config| config.vm.define "webserver" do |web| web.vm.box = "ubuntu/focal64" web.vm.network "private_network", ip: "192.168.33.10" end end ``` -------------------------------- ### Automatic Installation Script Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/olddocs/install_with_aws.md These commands execute the GOAD installation script. The first checks prerequisites for the GOAD project on AWS, and the second performs the installation. ```bash ./goad.sh -t check -l GOAD -p aws ./goad.sh -t install -l GOAD -p aws ``` -------------------------------- ### Install Vagrant Plugins for VirtualBox Source: https://github.com/orange-cyberdefense/goad/blob/main/docs/mkdocs/docs/installation/windows.md Installs essential Vagrant plugins for managing VirtualBox environments, including reload, guest additions, and Windows Remote Management (WinRM) capabilities. ```shell vagrant.exe plugin install vagrant-reload vagrant-vbguest winrm winrm-fs winrm-elevated ```