### Exegol Container Start Command Examples Source: https://docs.exegol.com/wrapper/cli/start Provides various `exegol start` command examples demonstrating how to interactively start containers, create new ones with specific images, share workspaces, integrate VPNs, mount custom volumes, select shells, and share hardware devices like USBs. ```bash # Start interactively a container exegol start # Create a demo container using full image exegol start demo full # Spawn a shell from demo container exegol start demo # Create a container test with a custom shared workspace exegol start test full -w "./project/pentest/" # Create a container test sharing the current working directory exegol start test full -cwd # Create a container htb with a VPN exegol start htb full --vpn "~/vpn/lab_Dramelac.ovpn" # Create a container app with custom volume exegol start app full -V "/var/app/:/app/" # Get a shell based on tmux exegol start --shell tmux # Share a specific hardware device (like Proxmark) exegol start -d "/dev/ttyACM0" # Share every USB device connected to the host exegol start -d "/dev/bus/usb/" ``` -------------------------------- ### Basic `exegol start` Command Usage Source: https://docs.exegol.com/wrapper/cli/start Illustrates the fundamental way to use the `exegol start` command to launch an Exegol container. This command will either start an existing container or prompt for image installation and container creation if necessary. ```Shell exegol start [CONTAINER_TAG] ``` -------------------------------- ### Install Exegol Image Source: https://docs.exegol.com/first-install Downloads and installs your first Exegol image. The command will guide you through the selection and installation process. ```bash exegol install ``` -------------------------------- ### Compare Exegol Regular and Source Installations Source: https://docs.exegol.com/contribute/install Demonstrate how to verify and differentiate between the standard `pipx` installed Exegol version and the source-installed `exegol-dev` version. This allows contributors to easily switch between stable and development environments. ```bash exegol version exegol-dev version ``` -------------------------------- ### Install Exegol Runtime Dependencies Source: https://docs.exegol.com/contribute/install Install all necessary runtime dependencies for the Exegol project from the `requirements.txt` file. This ensures that the application has all the required libraries to function correctly within the activated virtual environment. ```bash pip3 install -r requirements.txt ``` -------------------------------- ### Exegol Global Command-Line Options Reference Source: https://docs.exegol.com/wrapper/cli/start A comprehensive list of global command-line options for Exegol, detailing their purpose and usage for container creation and configuration. Options range from basic image selection and workspace setup to advanced networking, device sharing, and privilege management. ```APIDOC Option: IMAGE Description: Tag of the exegol image to use to create a new exegol container Option: -w WORKSPACE_PATH, --workspace WORKSPACE_PATH Description: The specified host folder will be linked to the /workspace folder in the container. Option: -cwd, --cwd-mount Description: This option is a shortcut to set the /workspace folder to the user's current working directory (pwd). Option: -fs, --update-fs Description: Modifies the permissions of folders and sub-folders shared in your workspace to access the files created within the container using your host user account. (default: Disabled) Option: -V VOLUMES, --volume VOLUMES Description: Share a new volume between host and exegol (format: --volume /path/on/host/:/path/in/container/[:ro|rw]). Option: -p PORTS, --port PORTS Description: Share a network port between host and exegol (format: --port [:][-][:[-]][:]. This configuration will disable the shared network with the host. Option: --hostname HOSTNAME Description: Set a custom hostname to the exegol container (default: exegol-) Option: --cap CAPABILITIES Description: (dangerous) Capabilities allow to add specific privileges to the container (e.g. need to mount volumes, perform low-level operations on the network, etc). Option: --privileged Description: (dangerous) give extended privileges at the container creation (e.g. needed to mount things, to use wifi or bluetooth) Option: -d DEVICES, --device DEVICES Description: Add host device(s) at the container creation (example: -d /dev/ttyACM0 -d /dev/bus/usb/). Option: --disable-X11 Description: Disable X11 sharing to run GUI-based applications. (default: Enabled) Option: --disable-my-resources Description: Disable the mount of the shared resources (/opt/my-resources) from the host (/home/dramelac/.exegol/my-resources) (default: Enabled) Option: --disable-exegol-resources Description: Disable the mount of the exegol resources (/opt/resources) from the host (/home/dramelac/Documents/tools/Exegol/exegol-resources) (default: Enabled) Option: --network NETWORK Description: New! Configure the container's network mode (default: host). See [Network Modes](#network-modes) for details. Option: --disable-shared-timezones Description: Disable the sharing of the host's time and timezone configuration with exegol (default: Enabled) ``` -------------------------------- ### Execute Exegol version command Source: https://docs.exegol.com/wrapper/cli/version Examples demonstrating how to use the `exegol version` command to display basic setup information and detailed system/wrapper context using the `-vvv` debug flag. ```bash # Show version information exegol version # Show version and system information exegol version -vvv ``` -------------------------------- ### Run Exegol Container Source: https://docs.exegol.com/first-install Launches your first Exegol container, allowing you to start using the environment. ```bash exegol start ``` -------------------------------- ### Install Exegol Images via Command Line Source: https://docs.exegol.com/wrapper/cli/install Examples demonstrating how to use the `exegol install` command to interactively install an Exegol image or to directly install/update the 'full' Exegol image from the command line. This command pulls images from Dockerhub or configured custom registries. ```bash # Install interactively an exegol image exegol install # Install or update the full image exegol install full ``` -------------------------------- ### Run Exegol from Source Installation Source: https://docs.exegol.com/contribute/install Execute the Exegol main script directly from its source installation within the virtual environment. This command demonstrates how to run the development version, with a note on using `sudo` for Linux for security reasons. ```bash sudo /path/to/Exegol/venv/bin/python3 /path/to/Exegol/exegol.py # On macOS, Windows /path/to/Exegol/venv/bin/python3 /path/to/Exegol/exegol.py ``` -------------------------------- ### Clone Exegol Fork and Add Upstream Remote Source: https://docs.exegol.com/contribute/install Clone your personal fork of the Exegol repository to your local machine and then add the original Exegol repository as an 'upstream' remote. This setup allows you to easily synchronize your fork with the main project. ```bash git clone "https://github.com/YOUR_USERNAME/Exegol" && cd Exegol git remote add upstream "https://github.com/ThePorgs/Exegol" ``` -------------------------------- ### Quick Docker Engine installation on Linux Source: https://docs.exegol.com/first-install This one-liner downloads and executes the official Docker installation script, providing a rapid setup for Docker Engine on Linux. Users are advised to consult official Docker documentation for comprehensive installation details. ```bash curl -fsSL "https://get.docker.com/" | sh ``` -------------------------------- ### Exegol `start` Command Options Reference Source: https://docs.exegol.com/wrapper/cli/start Provides a detailed reference for the options available with the `exegol start` command, specifically the `CONTAINER` tag used to target a particular Exegol container. ```APIDOC exegol start: Options: CONTAINER: Description: Tag used to target an Exegol container. If this container exists, it will be started if it is not already the case and a shell will be spawned to offer an interactive console to the user Type: string ``` -------------------------------- ### Create Symbolic Link for Exegol Development Version Source: https://docs.exegol.com/contribute/install Create a symbolic link to make the source-installed Exegol script accessible system-wide under the name `exegol-dev`. This allows you to run the development version from any directory without specifying its full path. ```bash sudo ln -s "$(pwd)/exegol.py" "/usr/local/bin/exegol-dev" ``` -------------------------------- ### Exegol `info` command usage examples Source: https://docs.exegol.com/wrapper/cli/info Practical examples demonstrating how to use the `exegol info` command to retrieve different levels of detail and target specific containers. Includes examples for basic information, container-specific configuration, and various verbosity levels. ```bash # Print containers and images essentials information: exegol info ``` ```bash # Print the detailed configuration of the "demo" container: exegol info demo ``` ```bash # Print verbose information: exegol info -v ``` ```bash # Print advanced information: exegol info -vv ``` ```bash # Print debug information: exegol info -vvv ``` -------------------------------- ### Create and Activate Python Virtual Environment Source: https://docs.exegol.com/contribute/install Create a new Python virtual environment to isolate project dependencies, preventing conflicts with system-wide Python packages. After creation, activate the environment to ensure all subsequent Python commands operate within this isolated space. ```bash python3 -m venv .venv source .venv/bin/activate ``` -------------------------------- ### Create New Git Development Branch Source: https://docs.exegol.com/contribute/install Create a new Git branch for your development work, following a conventional naming scheme (e.g., `feat/`, `fix/`, `docs/`). This practice helps organize contributions and facilitates code reviews. ```bash git checkout -b type/description ``` -------------------------------- ### Start Exegol Container with Privileged Mode for VPN Source: https://docs.exegol.com/faq This command demonstrates how to start an Exegol container with full permissions, allowing you to run OpenVPN inside. This method is less secure and should generally be avoided. ```Shell exegol start --privileged ``` -------------------------------- ### Start Exegol Container with VPN Configuration File Source: https://docs.exegol.com/faq This is the recommended and more secure method to use a VPN with Exegol. It allows you to specify an OpenVPN configuration file directly when starting the container. ```Shell exegol start --vpn ``` -------------------------------- ### Configure APT packages, sources, and keys Source: https://docs.exegol.com/images/my-resources A system to easily install arbitrary APT packages in any new Exegol container. This snippet describes how to add custom APT repositories, import GPG keys, and automatically install APT packages by filling specific configuration files. ```Configuration /opt/my-resources/setup/apt/sources.list: Custom APT repositories /opt/my-resources/setup/apt/keys.list: GPG keys download URLs /opt/my-resources/setup/apt/packages.list: APT package names to install ``` -------------------------------- ### Exegol Graphical Desktop Configuration Options Source: https://docs.exegol.com/wrapper/cli/start Exegol provides a full graphical desktop environment accessible via a web-based interface. These options control the desktop feature's enablement and configuration, including protocol and network settings. ```APIDOC Graphical Desktop Options: - Option: --desktop Description: Enable or disable the Exegol desktop feature (default: Disabled). - Option: --desktop-config Description: Configure the desktop protocol (vnc/http) and network settings (format: protocol[:ip[:port]]) (default: http:127.0.0.1:). ``` -------------------------------- ### Install argcomplete for Exegol Auto-completion Source: https://docs.exegol.com/first-install Installs the 'argcomplete' package using 'pipx', which is a prerequisite for enabling command auto-completion for Exegol. ```bash pipx install argcomplete ``` -------------------------------- ### Firefox Policy: Add Specific Addon by GUID Source: https://docs.exegol.com/images/my-resources Example of adding a specific Firefox addon to the `ExtensionSettings` policy using its GUID. This snippet demonstrates how to force-install an addon like Dark Reader by specifying its GUID and installation URL. ```json "ExtensionSettings": { "[email protected]": { "installation_mode": "force_installed", "install_url": "https://addons.mozilla.org/firefox/downloads/latest/[email protected]/latest.xpi" } } ``` -------------------------------- ### Install Git and Python 3 on Linux Source: https://docs.exegol.com/first-install This command updates package lists and installs Git, Python 3, and pipx on Debian-based Linux systems, which are essential prerequisites for Exegol. ```bash sudo apt update && sudo apt install -y git python3 pipx ``` -------------------------------- ### Exegol Default Firefox Policy: Install Extensions Source: https://docs.exegol.com/images/my-resources Illustrates the default Firefox policy for force-installing extensions. This example shows how FoxyProxy Standard is configured for automatic installation. ```json { "policies": { "ExtensionSettings": { "[email protected]": { "installation_mode": "force_installed", "install_url": "https://addons.mozilla.org/firefox/downloads/latest/foxyproxy-standard/latest.xpi" }, [...] } } ``` -------------------------------- ### Execute Custom User Setup Script on Exegol Container Startup Source: https://docs.exegol.com/images/my-resources The `/opt/my-resources/setup/load_user_setup.sh` script is executed during the first startup of new Exegol containers that have the 'my-resources' feature enabled. This allows users to add arbitrary shell code for custom dependency installations or configuration file copies, though overwriting Exegol's default config files is strongly discouraged. ```shell Script executed on first container startup: /opt/my-resources/setup/load_user_setup.sh ``` -------------------------------- ### Exegol OpenVPN Tunnel Configuration Options Source: https://docs.exegol.com/wrapper/cli/start Exegol supports integrating OpenVPN tunnels into containers, automatically starting the VPN at container startup. These options allow users to provide an OVPN configuration file and optional authentication credentials. ```APIDOC VPN Tunnel Options: - Option: --vpn VPN Description: Setup an OpenVPN connection at the container creation (example: --vpn /home/user/vpn/conf.ovpn). - Option: --vpn-auth VPN_AUTH Description: Enter the credentials with a file (first line: username, second line: password) to establish the VPN connection automatically (example: --vpn-auth /home/user/vpn/auth.txt). ``` -------------------------------- ### Install Exegol Python wrapper with pipx Source: https://docs.exegol.com/first-install This command installs the Exegol Python wrapper into an isolated environment using pipx. This method prevents conflicts with other system Python packages and is the first major step in the Exegol installation process. ```bash pipx install exegol ``` -------------------------------- ### Exegol Build Command Examples Source: https://docs.exegol.com/wrapper/cli/build Demonstrates various ways to use the `exegol build` command, including interactive builds, building a named image, and logging the build process. ```bash # Build interactively an exegol image exegol build # Build interactively a local image named myimage exegol build myimage # Build the myimage image based on the full profile and log the operation exegol build myimage full --build-log /tmp/build.log ``` -------------------------------- ### Exegol Session Configuration Options Source: https://docs.exegol.com/wrapper/cli/start Details the command-line options for configuring interactive Exegol sessions, such as setting environment variables and selecting the default shell. Environment variables set during container creation are persistent. ```APIDOC Option | Description --- | --- -e ENVS, --env ENVS | And an environment variable on Exegol (format: --env KEY=value). The variables configured during the creation of the container will be persistent in all shells. If the container already exists, the variable will be present only in the current shell. -s SHELL, --shell SHELL | Select a shell environment to launch at startup (default: zsh) ``` -------------------------------- ### Exegol Activate Command Examples Source: https://docs.exegol.com/wrapper/cli/activate Examples demonstrating how to activate Exegol interactively and how to revoke an existing license using the `exegol activate` command. ```bash # Activate Exegol interactively exegol activate # Revoke current license exegol activate --revoke ``` -------------------------------- ### OpenVPN Multi-File Configuration Directory Example Source: https://docs.exegol.com/wrapper/features This example illustrates the recommended directory structure for OpenVPN configurations that utilize multiple files (e.g., CA, user cert, key). The main .ovpn file should reference these external files using relative paths, ensuring all components are correctly located by Exegol. ```text . my_vpn/ |- configuration.ovpn => This file contains the OpenVPN configuration with relative path to the various external files |- root_ca.pem => Certificat Authority file referenced as `./root_ca.pem` in configuration.ovpn |- my_user.crt => User's personal certificate file referenced as `./my_user.crt` in configuration.ovpn |- my_user.key => User's personal key file referenced as `./my_user.key` in configuration.ovpn (password protected file are not supported for non-interactive logon) ``` -------------------------------- ### Set up Exegol Auto-completion System-wide (Bash) Source: https://docs.exegol.com/first-install Configures Exegol command auto-completion system-wide for Bash. This method uses 'bash-completion' and requires root privileges to write to '/etc/bash_completion.d/'. ```bash # System-wide via bash-completion sudo apt install -y bash-completion register-python-argcomplete --no-defaults exegol | sudo tee /etc/bash_completion.d/exegol > /dev/null ``` -------------------------------- ### Syncing Git Fork with Upstream Changes (Bash) Source: https://docs.exegol.com/contribute/install This snippet provides a sequence of Git commands to fetch the latest changes from the upstream repository and merge them into your local development branch. It ensures your fork remains up-to-date, minimizing conflicts when contributing. If conflicts arise, instructions for resolution are included. ```bash # Fetch latest changes from upstream git fetch upstream # Make sure you're on your development branch git checkout feat/your-feature-name # Merge upstream dev branch into your development branch git merge upstream/dev # If there are conflicts, resolve them and then git add . git commit -m "Merge upstream dev" ``` -------------------------------- ### Exegol Container Information Output Example Source: https://docs.exegol.com/wrapper/features An example of the detailed output from the `exegol info` command, illustrating how container properties such as name, image, login credentials (root:password), and the remote desktop URL are presented. This output is crucial for connecting to the desktop. ```bash ⭐ Container summary ┌──────────────────┬───────────────────────────────────────┐ │ Name │ gui │ │ Image │ nightly - v.d34db33f (Up to date) │ ├──────────────────┼───────────────────────────────────────┤ │ Credentials │ root : iozLHIjJFxoOLTTaNymO50uKT2RlvI │ │ Remote Desktop │ http://localhost:58089 │ │ Console GUI │ On ✔ (X11) │ │ Network │ host │ │ Timezone │ Off 🪓 │ │ Exegol resources │ On ✔ (/opt/resources) │ │ My resources │ On ✔ (/opt/my-resources) │ │ Shell logging │ Off 🪓 │ │ Privileged │ Off ✔ │ │ Workspace │ Dedicated (/workspace) │ └──────────────────┴───────────────────────────────────────┘ ``` -------------------------------- ### Access Exegol Customization System Logs Source: https://docs.exegol.com/images/my-resources The Exegol customization system logs all actions to `/var/log/exegol/load_setups.log`. If the installation is successful, the log file is compressed to `/var/log/exegol/load_setups.log.gz`. Compressed logs can be viewed directly using commands like `zcat`, `zgrep`, `zdiff`, or `zmore` without unpacking. ```shell Customization system log file: /var/log/exegol/load_setups.log Compressed log file (after successful installation): /var/log/exegol/load_setups.log.gz Commands to view compressed logs: zcat zgrep zdiff zmore ``` -------------------------------- ### Pushing Changes to Fork for Pull Request (Bash) Source: https://docs.exegol.com/contribute/install This snippet provides the Git command to push your local feature branch changes to your remote fork. This is the first step in submitting your contributions, followed by creating a pull request from your fork's branch to the upstream repository's 'dev' branch. ```bash git push origin feat/your-feature-name ``` -------------------------------- ### Install Exegol using pipx (Recommended) Source: https://docs.exegol.com/troubleshooting This command demonstrates the recommended way to install Exegol using pipx, which automatically handles the creation and management of a virtual environment, resolving 'externally managed environment' errors on modern operating systems. ```bash pipx install exegol ``` -------------------------------- ### Python3: Custom PIP Package Installation Source: https://docs.exegol.com/images/my-resources Describes how to customize Python 3 PIP package installations in Exegol containers. Users can list packages and constraints in `/opt/my-resources/setup/python3/requirements.txt`, similar to a standard `requirements.txt` file. ```text package-name==1.0.0 another-package>=2.0 # comments are allowed ``` -------------------------------- ### Configure Bash Alias for Sudo Exegol Development Source: https://docs.exegol.com/contribute/install Add a permanent alias to your bash configuration (`.bash_aliases`) that automatically runs `exegol-dev` with `sudo -E`. This is recommended for Linux users to ensure proper permissions when interacting with Docker, while preserving environment variables. ```bash echo "alias exegol-dev='sudo -E $(which exegol-dev)'" >> ~/.bash_aliases source ~/.bashrc ``` -------------------------------- ### Define a Tool Installation Function Source: https://docs.exegol.com/contribute/images This function template outlines the standard structure for installing a new tool within an Exegol Docker image. It includes logging, tool-specific actions, and integration with Exegol's alias, history, and testing systems. ```bash function install_yourtool() { colorecho "Installing yourtool" # tool install commands [...] add-aliases yourtool add-history yourtool add-test-command "yourtool.py --help" add-to-list "yourtool,https://link.to/the/tool,description" } ``` -------------------------------- ### Install Exegol using Manual Python Virtual Environment Source: https://docs.exegol.com/troubleshooting This snippet provides an alternative method to install Exegol by manually creating and activating a Python virtual environment. This approach helps bypass 'externally managed environment' errors by isolating the Exegol installation. ```bash python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m pip install exegol ``` -------------------------------- ### Exegol CLI `uninstall` Command Examples Source: https://docs.exegol.com/wrapper/cli/uninstall Provides practical examples of using the `exegol uninstall` command to remove Exegol images, demonstrating interactive removal, single image removal, and forced removal of multiple images. ```bash # Remove interactively one or more containers: exegol uninstall # Remove the "full" container: exegol uninstall "full" # Remove the "full", "ad" and "web" container without asking for user confirmation: exegol uninstall -F "full" "ad" "web" ``` -------------------------------- ### Deactivate Python Virtual Environment Source: https://docs.exegol.com/contribute/install Deactivate the currently active Python virtual environment. This returns your shell's Python context to the system-wide or previous environment, useful when switching between projects or finishing development work. ```bash deactivate ``` -------------------------------- ### Implement Multi-Architecture Support for Exegol Tool Installations Source: https://docs.exegol.com/contribute/images This bash snippet illustrates how to write installation scripts that dynamically adapt to different CPU architectures. It uses `uname -m` to detect whether the system is AMD64 (x86_64) or ARM64 (aarch64) and executes architecture-specific commands accordingly, ensuring broader compatibility. ```bash if [[ $(uname -m) = 'x86_64' ]] then # command for AMD64 elif [[ $(uname -m) = 'aarch64' ]] then # command for ARM64 else criticalecho-noexit "This installation function doesn't support architecture $(uname -m)" && return fi ``` -------------------------------- ### Install Python Tools with pipx Source: https://docs.exegol.com/contribute/images Demonstrates how to install Python tools using `pipx`, either directly from a GitHub repository or from local sources. The `--system-site-packages` flag ensures access to system-wide Python packages. ```bash # From GitHub pipx install --system-site-packages git+https://github.com/AUTHOR/REPO # From local sources git -C /opt/tools/ clone --depth 1 https://github.com/AUTHOR/REPO pipx install --system-site-packages /opt/tools/yourtool/ ``` -------------------------------- ### Update Exegol Wrapper Installed with pipx Source: https://docs.exegol.com/faq If Exegol was installed using `pipx`, this command is used to upgrade the wrapper to its latest version. ```Shell pipx upgrade exegol ``` -------------------------------- ### Exegol Shell Logging Options Source: https://docs.exegol.com/wrapper/cli/start Documents the command-line options available for configuring shell logging in Exegol containers, including enabling logging, selecting the logging method, and controlling log file compression. Logging can be persistent for new containers. ```APIDOC Option | Description --- | --- -l, --log | Enable shell logging (commands and outputs) on exegol to /workspace/logs/ (default: Disabled) --log-method | Select a shell logging method used to record the session (default: `asciinema`) --log-compress | Enable or disable the automatic compression of log files at the end of the session (default: Enabled) ``` -------------------------------- ### Set up Exegol Auto-completion in .bashrc (Bash) Source: https://docs.exegol.com/first-install Enables Exegol command auto-completion for the current user by adding a line to the '.bashrc' file. This method does not require root privileges. ```bash eval "$(register-python-argcomplete --no-defaults exegol)" ``` -------------------------------- ### Activate Exegol License Source: https://docs.exegol.com/first-install Activates your Exegol Pro or Enterprise subscription license. This command requires an active license and a token obtained from the Exegol dashboard. ```bash exegol activate ``` -------------------------------- ### Install Official Exegol Docker Images Source: https://docs.exegol.com/images/types Official Exegol images are pre-built and readily available. Use this command to download and set up a specific Exegol Docker image for immediate use. Replace with the desired image, such as `free` or `full`. ```bash exegol install ``` -------------------------------- ### Start Exegol Container with Multi-File VPN Configuration Source: https://docs.exegol.com/wrapper/features Use this `exegol` command to launch a container that automatically establishes an OpenVPN tunnel from a multi-file configuration. The `--vpn` option points to the directory containing the .ovpn file and its associated certificates/keys. ```bash exegol start --vpn ./my_vpn ``` -------------------------------- ### Define Tool History Commands Source: https://docs.exegol.com/contribute/images Examples of commands to be added to the tool's history file, located in `/sources/assets/shells/history.d/`. These commands serve as usage examples and are useful for documentation and user reference. ```bash yourtool.py --user "$USER" --password "$PASSWORD" --target "$TARGET" yourtool.py --mode enum --user "$USER" --target "$TARGET" yourtool.py --mode unauthenticated ``` -------------------------------- ### Display essential Exegol project information Source: https://docs.exegol.com/wrapper/cli/info This command displays a summary of available Exegol Images and Containers on the current system. It includes image names, sizes, statuses (installed, up to date, update available, etc.), and container names, statuses, and base images. ```bash exegol info ``` -------------------------------- ### Exegol `exec` Bash Command Examples Source: https://docs.exegol.com/wrapper/cli/exec These examples demonstrate various uses of the `exegol exec` command in bash. They cover executing commands in existing containers, running commands in the background, using temporary containers, and applying advanced options like privileged mode and network capabilities. ```bash # Execute the command bloodhound in the container demo: exegol exec demo bloodhound # Execute the command 'nmap -h' with console output in the container demo: exegol exec -v demo 'nmap -h' # Execute a command in background within the demo container: exegol exec -b demo bloodhound # Execute the command bloodhound in a temporary container based on the full image: exegol exec --tmp full bloodhound # Execute a command in background with a temporary container: exegol exec -b --tmp full bloodhound # Execute Wireshark in background, in a privileged temporary container: exegol exec --background --tmp --privileged "nightly" "wireshark" # Execute the command wireshark with network admin privileged: exegol exec -b --tmp --cap NET_ADMIN full wireshark ``` -------------------------------- ### Exegol Wrapper `update` Command Examples Source: https://docs.exegol.com/wrapper/cli/update Demonstrates various ways to use the `exegol update` command, including interactive updates, updating specific images, and skipping module or image updates using command-line flags. ```bash # Update interactively an exegol image: exegol update # Update the full image: exegol update full # Update the full image without updating exegol modules: exegol update --skip-git full # Update exegol modules and have the option to change branch without updating docker image: exegol update -v --skip-images ``` -------------------------------- ### Start Exegol Container for Manual VPN Management Source: https://docs.exegol.com/wrapper/features This `exegol` command creates a container configured to allow manual VPN connection management. It mounts the `/dev/net/tun` device and grants `NET_ADMIN` capabilities, which are necessary for OpenVPN to operate within the container. ```bash exegol start -d /dev/net/tun --cap NET_ADMIN ``` -------------------------------- ### Exegol Remove Command Examples Source: https://docs.exegol.com/wrapper/cli/remove Examples demonstrating how to use the `exegol remove` command to delete containers, including interactive removal, targeting specific containers by tag, and performing forced removals without user confirmation. ```bash # Remove interactively one or more containers: exegol remove # Remove the "demo" container: exegol remove "demo" # Remove the "demo", "test" and "dev" container without asking for user confirmation: exegol remove -F "demo" "test" "dev" ``` -------------------------------- ### Exegol CLI: Network Mode Options Source: https://docs.exegol.com/wrapper/features Documentation for the `--network` option of the Exegol `start` action, detailing available network modes and their characteristics. This allows users to configure container network behavior based on specific operational needs, from full host sharing to complete isolation. ```APIDOC Exegol CLI --network option: - `host`: Container shares host's network interfaces. Useful for direct interface access, low-level operations, or sharing host IP/MAC. - `docker`: Uses Docker's default bridge network. All containers share the same network space and can communicate. Use for standard cases requiring basic network isolation and port control. - `nat`: (ProEnterprise) Creates an isolated network with a dedicated /28 subnet (14 IP addresses available) for each container. Provides complete isolation from other containers. Use for sensitive operations requiring dedicated network with isolation. - `disable`: Blocks all network connectivity. Use for maximum isolation or offline operations. ``` -------------------------------- ### Exegol `exec` Command Options Source: https://docs.exegol.com/wrapper/cli/exec This section details the command-line options available for the `exegol exec` action, including parameters for specifying the container or image, the command to execute, and flags for background execution or temporary containers. It also notes that `exec` shares some parameters with the `start` action. ```APIDOC Option: CONTAINER or IMAGE Description: This option indicates the container name to use to execute the command. If the --tmp parameter is used, this name will be used to target an image. Option: COMMAND Description: Single command to execute in the container. Option: -b, --background Description: Executes the command in background as a daemon. Option: --tmp Description: Creates a dedicated and temporary container to execute the command. ``` -------------------------------- ### Create a Tool Alias File Source: https://docs.exegol.com/contribute/images Example of an alias definition for a tool. This alias file should be placed in `/sources/assets/shells/aliases.d/` and named after the tool, allowing for simplified command execution. ```bash alias tool.py='python3 /opt/tools/yourtool/tool.py' ``` -------------------------------- ### Set Exegol sudo alias for Bash Source: https://docs.exegol.com/first-install This command appends an alias to `~/.bash_aliases` that allows `exegol` to be run with `sudo -E`, preserving environment variables. The alias is then sourced to apply it to the current Bash session, granting necessary Docker permissions. ```bash echo "alias exegol='sudo -E $(echo ~/.local/bin/exegol)'" >> ~/.bash_aliases && source ~/.bash_aliases ``` -------------------------------- ### Python Code Block Example Source: https://docs.exegol.com/contribute/docs Demonstrates how to define a Python code block within Markdown using triple backticks, specifying 'python' as the language. ```python print('hello world') ``` -------------------------------- ### Apply Temporary Git Checkout Fix in Exegol Tool Installation Source: https://docs.exegol.com/contribute/images This snippet demonstrates how to apply a temporary fix to a tool's installation by checking out a specific Git commit. It includes a `check_temp_fix_expiry` function to ensure the fix is only applied within a defined timeframe, preventing outdated temporary solutions. ```bash function install_TOOL() { [...] # git -C /opt/tools/ clone --depth 1 https://github.com/REPO/TOOL.git local temp_fix_limit="YYYY-MM-DD" if check_temp_fix_expiry "$temp_fix_limit"; then git -C /opt/tools/ clone https://github.com/REPO/TOOL.git git -C /opt/tools/TOOL checkout 774f1c33efaaccf633ede6e704800345eb313878 fi [...] } ``` -------------------------------- ### Customize Neovim Configuration in Exegol Source: https://docs.exegol.com/images/my-resources Exegol supports overwriting Neovim configurations. Users can customize their Neovim setup by copying their configuration files into the `/opt/my-resources/setup/nvim/` directory, which will then overwrite the default `~/.config/nvim/`. ```neovim-config To automatically overwrite ~/.config/nvim/: copy your config to /opt/my-resources/setup/nvim/ ``` -------------------------------- ### Exegol Container Network Modes Overview Source: https://docs.exegol.com/wrapper/cli/start Exegol supports various network modes to control container connectivity and isolation. Each mode offers different levels of access to the host's network interfaces and communication capabilities with other containers, suitable for specific use cases. ```APIDOC Network Modes: - Mode: host (default) Description: Container shares the host's network interfaces (IP and MAC addresses of every interface of your host). Use Case: When you need to use the host's network interfaces directly; For low-level network operations; When you need to share the host's IP and MAC address. - Mode: docker Description: Container uses Docker's default bridge network. All containers (not just Exegol) share this network and can communicate with each other. Use Case: When you need basic network isolation; When you want to publish specific ports; For most standard use cases; When you want to allow communication between containers. - Mode: nat (Pro/Enterprise) Description: Creates a dedicated isolated network for the container with its own subnet. Each container gets a unique network namespace with a /28 subnet (16 IP addresses), providing complete isolation from other containers. Use Case: When you need complete network isolation; For sensitive operations requiring dedicated network resources; When you need to control all network traffic; When you want automatic network cleanup on container removal. - Mode: disable Description: Disables all network connectivity for the container. Use Case: When you need maximum isolation; For offline operations; When network access is not required. ``` -------------------------------- ### Exegol Container Services API Reference Source: https://docs.exegol.com/images/services This API documentation provides a detailed reference for various services available within Exegol containers. Each entry specifies the service name, default ports, command-line actions to interact with the service, and additional comments regarding its use or related projects. This serves as a quick guide for users to understand and manage services like databases, web interfaces, and security tools. ```APIDOC Service: neo4j Ports: 7687, 7474, 7373 Commands: neo4j start, neo4j stop, neo4j restart Comments: Used by BloodHound and BloodHound-related projects. ``` ```APIDOC Service: BloodHound-CE Ports: 1030 Commands: bloodhound-ce, bloodhound-ce-reset, bloodhound-ce-stop Comments: BloodHound Community Edition Web Interface ``` ```APIDOC Service: postgresql Ports: 5432 Commands: service postgresql [...] Comments: Used by BloodHound CE ``` ```APIDOC Service: Trilium Ports: 1991 Commands: trilium-start, trilium-stop Comments: Collaborative note-taking app. GitHub: https://github.com/zadam/trilium ``` ```APIDOC Service: Burp Suite Ports: 8080 Commands: burpsuite Comments: HTTP(S) Proxy ``` ```APIDOC Service: Starkiller (Empire) Ports: TBD Commands: ps-empire server Comments: GUI for the Empire post-exploit framework. GitHub: https://github.com/BC-SECURITY/Empire ``` ```APIDOC Service: Havoc Ports: 40056 Commands: havoc client/server Comments: C2 Framework in GO. GitHub: https://github.com/HavocFramework/Havoc ``` ```APIDOC Service: Desktop (VNC & Websockify) Ports: 6336, random Commands: desktop-start, desktop-stop, desktop-restart Comments: Remote graphical desktop feature (beta). Used with --desktop from up-to-date wrapper. ``` -------------------------------- ### Ensure pipx is in PATH and reload shell Source: https://docs.exegol.com/first-install This command adds pipx's executable directory to the system's PATH environment variable. It then reloads the current shell session, making pipx commands immediately accessible. ```bash pipx ensurepath && exec $SHELL ``` -------------------------------- ### Structure Feature Deployment Functions in Exegol My-Resources Source: https://docs.exegol.com/contribute/images This bash function template provides a recommended structure for deploying new features within Exegol's `my-resources`. It includes logic to check for existing feature directories, allowing for both updates to existing setups and the creation of new ones, ensuring idempotent deployments. ```bash function deploy_your_feature() { wrapper_verbose "Deploying your feature" # Check if feature directory exists if [[ -d "$MY_SETUP_PATH/your_feature" ]]; then # Handle existing setup logger_verbose "Processing existing setup" # Your code here else # Create new setup logger_verbose "Creating new setup" mkdir -p "$MY_SETUP_PATH/your_feature" # Your code here fi } ``` -------------------------------- ### Whitelist Code Check Requirements Source: https://docs.exegol.com/contribute/images Use these comments at the beginning of an installation function to whitelist specific code check requirements, such as `add-aliases` or `add-history`, if the tool does not require them. ```bash # CODE-CHECK-WHITELIST=add-aliases # CODE-CHECK-WHITELIST=add-aliases,add-history ``` -------------------------------- ### Firefox Policy: Add New Bookmark Folder Source: https://docs.exegol.com/images/my-resources Demonstrates how to create a new top-level folder with child bookmarks within the `ManagedBookmarks` directive of the Firefox policy. This example creates a 'New folder' containing a link to Regex101. ```json { "name": "New folder", "children": [ { "url": "https://regex101.com/", "name": "Regex101" } ] } ``` -------------------------------- ### Test Exegol Tool Changes Locally Before Submitting a PR Source: https://docs.exegol.com/contribute/images This sequence of bash commands provides a workflow for locally testing changes to Exegol tools. It covers building a custom image, starting a container based on that image, and executing a set of predefined build pipeline tests to verify functionality and identify issues. ```bash exegol install "testimage" "full" --build-log "/tmp/testimage.log" exegol start "testcontainer" "testimage" cat /.exegol/build_pipeline_tests/all_commands.txt | grep -vE "^\s*$" | sort -u > /.exegol/build_pipeline_tests/all_commands.sorted.txt python3 /.exegol/build_pipeline_tests/run_tests.py cat /.exegol/build_pipeline_tests/failed_commands.log ``` -------------------------------- ### Firefox Policy: Add Bookmark to Existing Folder Source: https://docs.exegol.com/images/my-resources Illustrates how to add a new bookmark entry as a child to an existing folder within the `ManagedBookmarks` directive of the Firefox policy. This example adds 'The Hacker Recipes' link. ```json { "url": "https://www.thehacker.recipes/", "name": "THR" } ``` -------------------------------- ### Exegol Default Firefox Policy: Apply Burpsuite CA Source: https://docs.exegol.com/images/my-resources Details the default Firefox policy for installing a custom Certificate Authority. This snippet shows how the Burpsuite CA certificate located at `/opt/tools/firefox/cacert.der` is configured to be trusted. ```json { "policies": { "Certificates": { "Install": ["/opt/tools/firefox/cacert.der"] } } ``` -------------------------------- ### Get Exegol Container Desktop Access Details Source: https://docs.exegol.com/wrapper/features This command retrieves comprehensive information about a running Exegol container, including the necessary credentials and URL to access its hosted graphical desktop environment. It's essential for logging into the remote desktop. ```bash exegol info CONTAINER_NAME ``` -------------------------------- ### Stop Exegol containers using `exegol stop` command Source: https://docs.exegol.com/wrapper/cli/stop Examples demonstrating how to stop Exegol containers. This includes interactively stopping multiple containers or specifying individual container tags to stop them. The `stop` action supports targeting containers by their tag, and stopping a container with a VPN configuration will disconnect the VPN tunnel. ```bash # Stop interactively one or more containers: exegol stop # Stop the "demo" container: exegol stop "demo" # Stop the "demo", "test" and "dev" container: exegol stop "demo" "test" "dev" ``` -------------------------------- ### Synchronize container time with faketime for Kerberos targets Source: https://docs.exegol.com/tips-and-tricks Learn how to change a container's time without elevated permissions or affecting the host system using `faketime`. This is particularly useful for resolving clock skew errors like `KRB_AP_ERR_SKEW` when interacting with Kerberos targets. Examples demonstrate synchronizing with a remote domain controller's clock. The command `date --utc` can be used to print the time in UTC format for comparison. ```bash faketime 'YYYY-MM-DD hh:mm:ss' zsh ``` ```bash faketime "$(rdate -n $DC_IP -p | awk '{print $2, $3, $4}' | date -f - \"+%Y-%m-%d %H:%M:%S\")" zsh ``` ```bash faketime "$(date +'%Y-%m-%d') $(net time -S $DC_IP | awk '{print $4}')" ``` -------------------------------- ### Exegol Build Command Options Reference Source: https://docs.exegol.com/wrapper/cli/build Lists and describes the command-line options available for the `exegol build` action, including parameters for image tagging, build profiles, and logging. ```APIDOC Option: IMAGE Description: Tag used to target an Exegol image Option: BUILD_PROFILE Description: Select the build profile used to create a local image Option: --build-log LOGFILE_PATH Description: Write image building logs to a file Option: --build-path DOCKERFILES_PATH Description: Path to the dockerfiles and sources ``` -------------------------------- ### List All Configured Exegol Aliases Source: https://docs.exegol.com/tips-and-tricks Executes the `alias` command to display a complete list of all pre-configured command aliases available within the current Exegol environment, useful for discovering shortcuts. ```Shell alias ``` -------------------------------- ### Configure dynamic history commands using environment variables Source: https://docs.exegol.com/tips-and-tricks Understand how Exegol's pre-filled history commands leverage environment variables like `$DOMAIN`, `$USER`, and `$PASSWORD`. Learn to set these variables manually or by editing the `profile.sh` file located in `/opt/tools/Exegol-history/`, and how to apply changes by reloading your shell session. ```bash exec zsh # Example of setting variables in /opt/tools/Exegol-history/profile.sh: # export DOMAIN="example.com" # export USER="admin" # export PASSWORD="password" ``` -------------------------------- ### Exegol Wrapper Configuration Options Source: https://docs.exegol.com/wrapper/configuration Detailed documentation of all configurable parameters for the Exegol wrapper, including their purpose, default values, and valid options across various functional areas like general settings, shell logging, desktop, and network. ```APIDOC Config: auto_check_update (boolean, default: True): Enables automatic check for wrapper update. auto_remove_image (boolean, default: True): Automatically remove outdated image when they are no longer used. auto_update_workspace_fs (boolean, default: False): Automatically modifies the permissions of folders and sub-folders in your workspace by default to enable file sharing between the container with your host user. default_start_shell (string, default: zsh): Default shell command to start. enable_exegol_resources (boolean, default: True): Enables or not the exegol resources module by default on any new container. Shell logging: logging_method (string, values: script, asciinema, default: asciinema): Choice of the method used to record the sessions. enable_log_compression (boolean, default: True): Enable automatic compression of log files (with gzip). Desktop: enabled_by_default (boolean, default: False): Enables or not the desktop mode by default. If this attribute is set to True, then using the CLI --desktop option will be inverted and will DISABLE the feature. default_protocol (string, values: http, vnc, default: http): Default desktop protocol. localhost_by_default (boolean, default: True): Desktop service is exposed on localhost by default. If set to true, services will be exposed on localhost (127.0.0.1) otherwise it will be exposed on 0.0.0.0. This setting can be overwritten with [--desktop-config](/wrapper/cli/start). Network: default_network (string, values: host, docker, nat, disable, default: host): Default network mode for any new container. host: Container shares host's network interfaces. docker: Uses shared Docker's bridge network. nat: ProEnterprise Creates a network for each container. disable: Disables all network connectivity. fallback_network (string, default: nat, or docker if the use doesn't have the required Subscription level): Network mode to use if the default mode is not available. exegol_dedicated_range (string, CIDR notation, default: 172.31.0.0/16): Network range for NAT mode containers. Each container using NAT mode gets a dedicated subnet within this range. Must be a valid CIDR notation (e.g., 172.31.0.0/16). exegol_default_netmask (integer, range: 16-30, default: 28): Subnet mask size for nat mode containers. Controls the size of each container's subnet. Smaller values create larger subnets. Must be between 16 and 30. Custom images: custom_images (list of strings): List of image names/registries that should be recognized as Exegol images. The wrapper will take those into account in commands like start, info, and exec. ``` -------------------------------- ### Share files and notes during Exegol engagements Source: https://docs.exegol.com/tips-and-tricks Discover various tools and commands for quickly setting up temporary file or HTTP servers to share data with targets or collaborators. Tools include `updog`, `goshs`, `http-server`, `http-put-server`, `ftp-server`, and `smbserver.py`. Additionally, `trilium` (https://github.com/zadam/trilium) is recommended for comprehensive note-sharing during engagements. ```bash updog goshs http-server http-put-server ftp-server smbserver.py ``` -------------------------------- ### Exegol `info` command options and global flags Source: https://docs.exegol.com/wrapper/cli/info Detailed reference for the command-line options available with `exegol info`, including a positional argument for targeting specific containers and global options for help, verbosity, offline mode, and architecture override. ```APIDOC Options: CONTAINER: Optional positional argument to indicate the container tag of which to display the configuration. Global options: -h, --help: Show the help message of any action -v, --verbose: Verbosity level (-v for verbose, -vv for advanced, -vvv for debug) -q, --quiet: Show no information at all --offline: Run exegol in offline mode, no request will be made on internet (default: Disable) --arch {arm64,amd64}: Overwrite default image architecture (default: host's arch) ```