Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Test Environment Builder

БесплатноБез исполняемых скриптовНе проверен

Build and manage adversary emulation lab environments for any SIEM. Covers Splunk Attack Range, Elastic Security labs, Azure Sentinel labs, and Docker-based…

MHaggisот MHaggis★ 531 звезда на GitHub

Об этом скилле

Test Environment Builder Skill

Overview

Detection engineering requires test infrastructure that produces the right telemetry. This skill covers building environments that generate the exact log sources your detections need — with options for every major SIEM platform.

Set $SIEM_PLATFORM to focus guidance: splunk, sentinel, elastic, sigma

Lab Options by SIEM

SIEM Platform Primary Lab Tool Alternatives
Splunk Attack Range (Terraform + Ansible) DetectionLab (Vagrant)
Elastic Security Elastic Detection Lab + Docker Compose Custom Terraform + Elastic Agent
Microsoft Sentinel Azure Sentinel Training Lab (ARM/Bicep) Azure VMs + Log Analytics Workspace
Sigma (any backend) Any of the above Docker-based minimal setup

Configuration

Environment variables (set what applies to your stack):

Variable Description Example
$SIEM_PLATFORM Target SIEM platform splunk, sentinel, elastic
$ATTACK_RANGE_PATH Path to Attack Range repo (Splunk) /opt/attack-range
$ATTACK_RANGE_VENV Python venv for Attack Range /opt/attack-range/.venv
$ATTACK_RANGE_CONFIG Path to attack_range.conf /opt/attack-range/attack_range.conf
$AWS_PROFILE AWS profile for cloud builds attack-range
$AZURE_SUBSCRIPTION_ID Azure subscription for Sentinel labs (optional)
$AZURE_RESOURCE_GROUP Azure RG for Sentinel labs (optional)
$ELASTIC_CLOUD_ID Elastic Cloud deployment ID (optional)

Target placeholders:

  • <TARGET_NAME> — Hostname of a lab machine (e.g., ar-win-1)
  • <TARGET_IP> — IP address of a lab machine

Data Source to Infrastructure Mapping

This is the core planning table. Before building, identify which data sources your detection needs, then select the infrastructure that produces them.

Data Source Required Infrastructure Attack Range Config Key
Windows Security Events (4688, 4624, etc.) Windows Server/Workstation windows_servers
Sysmon (EventID 1, 3, 7, 11, etc.) Windows + Sysmon installed install_sysmon: "1"
PowerShell Script Block Logging (4104) Windows + PS logging GPO windows_servers (enabled by default)
Linux auditd Linux server linux_servers
Zeek/Suricata network logs Network sensor install_zeek: "1" or install_suricata: "1"
AWS CloudTrail AWS account + CloudTrail cloud_attack_range: "1"
Azure AD sign-in logs Azure AD tenant Azure lab config
Kubernetes audit logs K8s cluster kubernetes: "1"
EDR telemetry (CrowdStrike, etc.) EDR agent on endpoint Manual install post-build

Build Workflow

Step 1: Determine Required Data Sources

From your detection rule, identify every field and data source referenced:

Splunk (SPL):

`sysmon` EventCode=1 ParentImage=*\\cmd.exe Image=*\\powershell.exe

This needs: Sysmon process creation events → Windows host + Sysmon + Splunk UF.

Sentinel (KQL):

DeviceProcessEvents
| where FileName == "powershell.exe"
| where InitiatingProcessFileName == "cmd.exe"

This needs: Microsoft Defender for Endpoint agent → Log Analytics Workspace.

Elastic (EQL):

process where process.name == "powershell.exe"
  and process.parent.name == "cmd.exe"

This needs: Elastic Agent with Endpoint integration → Elasticsearch.

Step 2: Select Configuration

cd "$ATTACK_RANGE_PATH"
source "$ATTACK_RANGE_VENV/bin/activate"

# Show current config
python attack_range.py show

Step 3: Build

# Build the environment
python attack_range.py build

# Check status
python attack_range.py show

# Destroy when done (saves cost)
python attack_range.py destroy

Build Time Estimates

Configuration Components Approximate Build Time
Minimal (Splunk + 1 Windows) 2 VMs 15–25 minutes
Standard (Splunk + Win + Linux) 3 VMs 20–35 minutes
Full (Splunk + Win + Linux + Zeek) 4 VMs 30–45 minutes
Cloud (AWS CloudTrail + GuardDuty) Cloud resources 10–15 minutes
Kitchen sink 5+ VMs + cloud 45–60 minutes

Cost note: AWS t3.xlarge instances (~$0.17/hr each). A standard 3-VM lab costs ~$0.50/hr. Always destroy when not actively testing.

Example Configurations

Minimal: Windows Endpoint Detection

For testing process creation, PowerShell, registry, and file system detections:

[global]
attack_range_password = <STRONG_PASSWORD>

[splunk_server]
s3_bucket_url = https://attack-range-appbinaries.s3-us-west-2.amazonaws.com

[windows_servers]
windows_server_1_os = "Windows Server 2022"
Полный SKILL.md на GitHub

Установить Test Environment Builder в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Test Environment Builder?

Build and manage adversary emulation lab environments for any SIEM. Covers Splunk Attack Range, Elastic Security labs, Azure Sentinel labs, and Docker-based setups. Maps data source requirements to infrastructure components.

Как установить скилл Test Environment Builder?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Test Environment Builder запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Test Environment Builder с