Skip to content

range configs.md

NocteDefensor edited this page Jul 27, 2025 · 2 revisions

Range Config Templates

Overview

Ludus MCP uses a range config template system to help create range configurations. Templates are stored locally and provide starting points for common deployment scenarios.

Template Storage Location

All range configuration templates are stored in:

~/.ludus-mcp/range-config-templates/

This directory contains:

  • base-configs/ - Official templates downloaded from GitHub
  • Custom subdirectories - User-created templates and modifications
  • Example
    • Lets say you create a range config for a ludus user called sccm-lab it will be stored in ~/.ludus-mcp/range-config-templates/sccm-lab

Base Templates

Automatic Download

Base templates are automatically downloaded from the official Ludus repository when the MCP server starts. These include:

  • Common Active Directory setups
  • SCCM lab configurations
  • Security tool deployments
  • Multi-domain environments
  • Elastic Stack configurations If you have a template that you think would be helpful to include in base-configs on a project wide basis, please submit a PR with the config. Otherwise save it locally in ~/.ludus-mcp/base-configs and it will not be written over

Template Categories

Base templates are organized by use case:

  • ad-basic.yml - Simple Active Directory setup
  • sccm-lab.yml - SCCM deployment environment
  • elastic-security.yml - Elastic Stack with security tools
  • multi-domain.yml - Multiple domain configurations

How the LLM Accesses Templates

Discovery Process

  1. LLM uses list_range_configs to find available templates
  2. Templates are searched recursively in the templates directory
  3. Results show file paths relative to the templates directory

Reading Templates

  1. LLM uses read_range_config to examine template contents
  2. Can read from URLs or local template files
  3. Analyzes structure and patterns for new configurations

Template Analysis

The LLM examines templates to understand:

  • VM naming patterns
  • Role assignments and variables
  • Network configurations
  • Credential handling patterns
  • Common deployment structures

Adding Custom Templates

File Placement

Place custom templates in the range-config-templates directory:

~/.ludus-mcp/range-config-templates/
├── base-configs/           # Official templates (auto-updated and created by the MCP server upon start.)
├── company-templates/      # Your organization's templates or whatever you'd like to create the folder as.
├── personal/              # Individual custom templates or whatever you'd like to create the folder as.
└── projects/              # Project-specific templates or whatever you'd like to create the folder as.

Naming Conventions

Use descriptive names that indicate the range config template's purpose:

Good Examples:

  • windows-ad-sccm-exchange.yml - Clear components listed
  • linux-elastic-wazuh-stack.yml - Technology stack identified
  • hybrid-cloud-pentest-lab.yml - Environment type specified
  • incident-response-training.yml - Use case defined

Poor Examples:

  • config1.yml - No descriptive information
  • test.yml - Unclear purpose
  • lab.yml - Too generic

Descriptive Naming Benefits

  1. LLM Recognition - Descriptive names help the LLM identify relevant templates
  2. Template Selection - Clear names indicate when a template applies
  3. Maintenance - Easier to organize and update templates
  4. Collaboration - Team members understand template purposes

Template Structure

Required Elements

All range config templates must include:

  • ludus: section with range metadata
  • VM definitions with names and templates
  • Role assignments where applicable
  • Network configurations if needed

Best Practices

  1. Comment Usage - Add comments explaining complex configurations
  2. Variable Documentation - Document custom variables and their purposes
  3. Dependency Notes - Explain role dependencies and execution order
  4. Credential Patterns - Show proper credential placeholder usage
  5. Once you have a verified validated working template. Anonymize it and save it in ~/.ludus-mcp/range-config-templates/base-configs directory for the LLM to use as reference for follow on builds. This is especially helpful for complex range configs.

Template Persistence

Base range config Templates

  • Base templates are refreshed on each server startup
  • Official templates overwrite existing versions
  • No manual intervention required for updates

Custom Templates

  • Custom templates persist through server restarts
  • User-created templates are never overwritten
  • Custom templates remain during official template updates

LLM Template Usage Workflow

  1. Discovery Phase

    • Lists available templates to understand options
    • Identifies templates matching user requirements
  2. Analysis Phase

    • Reads 1-3 relevant templates for patterns
    • Extracts common structures and practices
    • Understands naming and organization patterns
  3. Adaptation Phase

    • Uses template patterns for new configurations
    • Adapts existing templates to meet specific requirements
    • Maintains consistent structure and best practices

Working with Templates

Template Modification

  1. Copy base template to custom directory
  2. Modify for specific requirements
  3. Save with descriptive name
  4. Test configuration before deployment

Template Sharing

  1. Export custom range config templates from local directory
  2. Share YAML files with team members
  3. Import by placing in range-config-templates directory
  4. Ensure consistent naming across team

Template Validation

Templates can be validated using:

  • validate_range_config - Check syntax and structure
  • ludus_read_range_config_schema - Verify against official schema
  • Manual review of role variables and dependencies

Troubleshooting

range config Not Found

  • Check file exists in range-config-templates directory
  • Verify file permissions are readable
  • Use relative paths when referencing templates

range config Validation Errors

  • Check YAML syntax (indentation, colons, quotes)
  • Verify role names against available roles
  • Confirm all required variables are defined

range config Selection

  • Use descriptive file names that match requirements
  • Organize templates in logical subdirectories
  • Remove outdated or non-functional templates