Open Cyber Range (OCR)

website·Indexed 32 days ago

https://documentation.opencyberrange.ee/

A project providing a software stack for cyber exercises, featuring Ranger as an exercise runtime manager and Deputy as a Digital Library for structured, versioned storage of cyber scenarios. The platform utilizes Scenario Definition Language (SDL) to describe exercises and employs containerized VMware handlers to interact with vSphere environments.

Tokens
21K
Snippets
113
Records
148
Agent score
57%

What's inside Open Cyber Range

  1. Overview of the Open Cyber Range (OCR) software components

    The Open Cyber Range (OCR) software provides a standardized toolset for describing and conducting cyber exercises. It consists of three primary components:

    1. SDL (Scenario Definition Language): A language used to describe various aspects of a cyber exercise in a file format. It serves as the central integration point for the OCR software via a language parser.
    2. Deputy: A digital library for cyber exercise artifacts. It allows administrators to store and reuse large, repeatable artifacts across different exercises to optimize storage and reduce manual effort.
    3. Ranger: A management application acting as the primary gateway for OCR users. It manages the full business process cycle—from initial exercise requests and deployment into virtualized environments to tracking learning objectives. It supports three user roles: exercise participant, exercise manager, and exercise client.
  2. Overview of the Executor handler

    The Executor allows for VM modification and state checking after creation using Feature, Inject, and Condition type Deputy packages. It requires that the VM is already created, running, and has VM tools installed. Redis is used to track installed files and their metadata. The general execution flow involves copying package assets to the VM and then executing the package action.
  3. Overview of Scenario Definition Language (SDL)

    Scenario Definition Language (SDL) is used to describe various aspects of a cyber exercise within a file format. It is implemented via a language parser and serves as a central component of the Open Cyber Range (OCR) software. SDL uses YAML as its underlying file format.
  4. Overview of Deputy CLI

    The Deputy CLI is a Command-Line Interface program that acts as a client for the Deputy Package Server repository. It allows developers to interact with the package registry to manage package lifecycles, including creation, publishing, and retrieval.
    deputy <SUBCOMMAND>
    
    # Global Options
    deputy --help    # Print help information
    deputy --version # Print version information
  5. Overview of the Ranger exercise runtime manager

    Ranger is an exercise runtime manager designed to bridge the gap between end-users and exercise environments. It orchestrates the deployment and management of cyber exercises by utilizing packages from Deputy and virtualization environment-specific handlers.

    The platform consists of two primary components:

    1. Ranger Server: Provides a REST-like API for managing cyber exercises in a way that is agnostic to the underlying virtualization platform.
    2. Ranger Web: A web-based client interface for managing cyber exercises.

    User roles within the platform include:

    • Clients: Submit exercise orders based on business needs.
    • Exercise managers: Create, deploy, and manage cyber exercises.
    • Exercise participants: Participate in the exercises conducted on the platform.
  6. Overview of the Deputy Digital Library system

    Deputy is a Digital Library project designed to provide structured and versioned storage for Cyber scenarios used in exercises, product testing, and training. The system is composed of three primary components:

    1. Deputy Package Server: The backend program responsible for hosting and serving digital library packages.
    2. Deputy CLI: A cross-platform command-line tool used by exercise developers to create, fetch, and list packages stored on the server.
    3. Deputy Web: A web-based user interface for browsing packages and acting as an authentication point to acquire tokens for use with the Deputy CLI.
  7. Track scores and event timelines in Ranger

    Ranger provides two primary tracking views for participants:

    1. Score Page: Displays a scoring overview, a graphical representation of the team's achieved scores, and an indication of whether the evaluation was successfully passed.
    2. Events Page: Shows a chronological list of triggered events, including event names, descriptions, and timestamps.
  8. Access exercise data via Participant API

    Participants can use the api/v1/participant endpoints to retrieve information about available exercises, their specific deployments, associated users, and scoring data.
    # Exercises
    GET api/v1/participant/exercise                      -> List available exercises
    GET api/v1/participant/exercise/{exerciseId}         -> Get exercise details
    
    # Deployments
    GET api/v1/participant/exercise/{exerciseId}/deployment -> List participant deployments
    GET api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId} -> Get deployment details
    GET api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/score -> Get participant scores
    GET api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/scenario -> Get scenario
    
    # Banners
    GET api/v1/participant/exercise/{exerciseId}/banner   -> Get banner info
  9. Use Deputy Web to browse packages and manage tokens

    The Deputy web client provides a user interface for browsing the digital library of packages and serves as the authentication point for acquiring tokens required by deputy CLI commands. Access is granted using OCR credentials. The landing page provides access to the packages list, search functionality, and user token management.
  10. Understand the role of VMware handlers in Ranger

    VMware handlers are containerized microservices that enable Ranger to interact with the VMware vSphere hypervisor. Communication between Ranger and these handlers is performed via gRPC. The system is divided into five specialized services:

    • Templater: Manages the creation and deletion of virtual machine templates based on Template type Deputy packages.
    • Machiner: Manages the creation and deletion of virtual machines in vSphere using templates previously deployed by the Templater.
    • Executor: Handles VM modifications and state verification after creation, utilizing Feature, Inject, and Condition type Deputy packages.
    • Switcher: Manages the creation and deletion of Layer-2 virtual switches within the vSphere environment.
    • General: A hypervisor-agnostic service that assists Ranger in preparing Event type Deputy packages and querying the Deputy package repository.
  11. Connect a participant entity to a user account in Ranger

    To allow a user to participate in an exercise, you must link an entity from the SDL file to a user account. This is performed in the Ranger interface under the Deployments sub-menu in the Entity-Selector.

    Steps to connect:

    1. Navigate to the Entity-Selector.
    2. Select the desired entity from the left side (which lists all entities present in the SDL file).
    3. Select the corresponding user account from the right side (which lists all users connected to the deployment's AD group).

    Once connected, the user gains access to the following deployment information:

    • The exercise banner set by the manager.
    • Assigned VM credentials.
    • Scores related to their TLO (Task Learning Objective).
    • Triggered events for VMs they have access to.
    • A submission form for manual metrics.
  12. Install and configure Deputy CLI

    Install the deputy package via apt and create a configuration file at ~/.deputy/configuration.toml to define the main registry API endpoint and the local download path for temporary package files.
    # Install the CLI
    sudo apt install deputy
    
    # Create config directory
    mkdir ~/.deputy
    # ~/.deputy/configuration.toml
    [registries]
    main-registry = { api = "https://your_deputy_subdomain" }
    
    [package]
    download_path = "~/.deputy/downloads/" # Path for temporary files during package fetching