mukul975/anthropic-cybersecurity-skills/performing-purple-team-atomic-testing

Claude Code and agent skill by mukul975/anthropic-cybersecurity-skills

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

'Executes Atomic Red Team tests mapped to MITRE ATT&CK via Invoke-AtomicRedTeam

Install

npx vskill@latest install mukul975/anthropic-cybersecurity-skills/performing-purple-team-atomic-testing

SKILL.md

The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/performing-purple-team-atomic-testing.

Performing Purple Team Atomic Testing

When to Use

  • Validating detection coverage against specific MITRE ATT&CK techniques
  • Running purple team exercises using Atomic Red Team test library
  • Performing ATT&CK coverage gap analysis to identify blind spots in SIEM/EDR
  • Building a detection validation loop: execute atomic test, check SIEM, tune rule, retest
  • Generating ATT&CK Navigator heatmap layers for executive reporting
  • Automating continuous atomic testing in CI/CD or scheduled pipelines
  • Mapping threat intelligence reports to executable atomic tests

Do not use for full-scope red team engagements requiring custom implants or live adversary simulation beyond atomic tests; use Caldera, SCYTHE, or Cobalt Strike for advanced adversary emulation.

DISCLAIMER: Atomic Red Team tests execute real attack techniques. Run only on systems you own or have explicit written authorization to test. Many tests modify system state, create artifacts, or trigger security alerts. Always execute cleanup commands after testing. Never run atomic tests in production without risk acceptance from stakeholders.

Prerequisites

  • Windows host with PowerShell 5.1+ or PowerShell Core 7+ (Linux/macOS supported for cross-platform atomics)
  • Invoke-AtomicRedTeam PowerShell module installed from PSGallery
  • Atomic Red Team atomics repository cloned locally
  • SIEM/EDR with log ingestion from test endpoints (Splunk, Elastic, Microsoft Sentinel, CrowdStrike)
  • MITRE ATT&CK Navigator (web-based or local instance) for layer visualization
  • Python 3.9+ with mitreattack-python, pyyaml, and requests for automation scripts
  • Sigma rules repository for detection correlation
  • Administrative/root access on test endpoints
  • Isolated test environment (lab, sandbox, or dedicated test range)

Workflow

Step 1: Install and Configure Invoke-AtomicRedTeam

Set up the execution framework and download the atomics library:

powershell
# Install the PowerShell execution module
Install-Module -Name invoke-atomicredteam -Scope CurrentUser -Force
Install-Module -Name powershell-yaml -Scope CurrentUser -Force
# Import the module
Import-Module invoke-atomicredteam
# Install atomics to default location (C:\AtomicRedTeam\atomics)
IEX (IEX (New-Object System.Net.WebClient).DownloadString(
'https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1'
)); Install-AtomicRedTeam -getAtomics -Force
# Verify installation - list available techniques
$atomicsPath = "C:\AtomicRedTeam\atomics"
$techniques = Get-ChildItem $atomicsPath -Directory | Where-Object { $_.Name -match '^T\d{4}' }
Write-Host "Available techniques: $($techniques.Count)"
# Configure execution logging
$env:ARTLOG = "C:\AtomicRedTeam\logs"
if (-not (Test-Path $env:ARTLOG)) { New-Item -Path $env:ARTLOG -ItemType Directory }
Step 2: Enumerate and Select Atomic Tests

Inventory available tests and select targets based on threat intelligence or gap analysis:

powershell
# List all tests for a specific technique
Invoke-AtomicTest T1059.001 -ShowDetailsBrief
# Show full details including attack commands and cleanup
Invoke-AtomicTest T1059.001 -ShowDetails
# List tests for a tactic (e.g., Persistence)
$persistenceTechniques = @(
"T1547.001", # Boot or Logon Autostart - Registry Run Keys
"T1053.005", # Scheduled Task
"T1136.001", # Create Account - Local Account
"T1543.003", # Create or Modify System Process - Windows Service
"T1546.001", # Event Triggered Execution - Change Default File Association
"T1574.001", # Hijack Execution Flow - DLL Search Order Hijacking
"T1197" # BITS Jobs
)
foreach ($tech in $persistenceTechniques) {
Write-Host "`n=== $tech ===" -ForegroundColor Cyan
try {
Invoke-AtomicTest $tech -ShowDetailsBrief
} catch {
Write-Host " No tests available" -ForegroundColor Yellow
}
}
# Get all atomic techniques from YAML files programmatically
$allAtomics = Get-ChildItem "$atomicsPath\T*\T*.yaml" -Recurse |
ForEach-Object {
$yaml = Get-Content $_.FullName -Raw | ConvertFrom-Yaml
[PSCustomObject]@{
TechniqueId = $yaml.attack_technique
TechniqueName = $yaml.display_name
TestCount = $yaml.atomic_tests.Count
Platforms = ($yaml.atomic_tests.supported_platforms | Sort-Object -Unique) -join ", "
}
}
$allAtomics | Sort-Object TechniqueId | Format-Table -AutoSize
Write-Host "Total techniques with tests: $($allAtomics.Count)"
Write-Host "Total individual tests: $(($allAtomics | Measure-Object -Property TestCount -Sum).Sum)"
Step 3: Execute Atomic Tests with Logging

Run tests with pre/post logging for detection validation:

powershell
# Execute a single test by technique ID (runs all tests for that technique)
Invoke-AtomicTest T1059.001
# Execute a specific test by number
Invoke-AtomicTest T1059.001 -TestNumbers 1
# Execute by test name
Invoke-AtomicTest T1059.001 -TestNames "Mimikatz - Cradled Invoke Expression"
# Execute by GUID
Invoke-AtomicTest T1059.001 -TestGuids "2e803f96-4e33-4c2c-b0c8-1c10cbb3945f"
# Execute with prerequisite check and installation
Invoke-AtomicTest T1059.001 -TestNumbers 1 -CheckPrereqs
Invoke-AtomicTest T1059.001 -TestNumbers 1 -GetPrereqs
Invoke-AtomicTest T1059.001 -TestNumbers 1
# Execute with timeout (seconds)
Invoke-AtomicTest T1003.001 -TimeoutSeconds 120
# Cleanup after testing
Invoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup
# Execute with full logging wrapper
function Invoke-AtomicWithLogging {
param(
[string]$TechniqueId,
[int[]]$TestNumbers,
[string]$LogPath = "C:\AtomicRedTeam\logs"
)
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$logFile = Join-Path $LogPath "${TechniqueId}_${timestamp}.json"
$result = @{
technique_id = $TechniqueId
test_numbers = $TestNumbers
start_time = (Get-Date).ToString("o")
hostname = $env:COMPUTERNAME
username = $env:USERNAME
results = @()
}
foreach ($testNum in $TestNumbers) {
$testResult = @{
test_number = $testNum
status = "unknown"
start_time = (Get-Date).ToString("o")
}
try {
# Show what will execute
$details = Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -ShowDetails 2>&1
$testResult["details"] = $details | Out-String
# Execute the test
Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -Confirm:$false
$testResult["status"] = "executed"
} catch {
$testResult["status"] = "failed"
$testResult["error"] = $_.Exception.Message
}
$testResult["end_time"] = (Get-Date).ToString("o")
$result.results += $testResult
# Wait for SIEM ingestion
Start-Sleep -Seconds 30
}
$result["end_time"] = (Get-Date).ToString("o")
$result | ConvertTo-Json -Depth 10 | Set-Content $logFile
Write-Host "Log written to: $logFile" -ForegroundColor Green
return $result
}
# Usage
Invoke-AtomicWithLogging -TechniqueId "T1059.001" -TestNumbers @(1, 2, 3)
Step 4: Validate Detections in SIEM

Query your SIEM to confirm whether atomic tests generated alerts:

Splunk SPL Queries for Detection Validation:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-- T1059.001: PowerShell Execution
index=windows sourcetype="WinEventLog:Microsoft-Windows-PowerShell/Operational"
EventCode=4104
| eval script_block=ScriptBlockText
| where len(script_block) > 500
| stats count by host, script_block
| sort -count
-- T1003.001: LSASS Memory Credential Dumping
index=windows sourcetype="WinEventLog:Security" EventCode=4663
ObjectName="*lsass*"
| stats count by host, SubjectUserName, ProcessName
| where count > 0
-- T1547.001: Registry Run Key Persistence
index=windows sourcetype="WinEventLog:Microsoft-Windows-Sysmon/Operational"
EventCode=13
TargetObject="*\\CurrentVersion\\Run*"
| stats count by host, Image, TargetObject, Details
-- T1053.005: Scheduled Task Creation
index=windows sourcetype="WinEventLog:Security" EventCode=4698
| stats count by host, SubjectUserName, TaskName, TaskContent
| sort -count
-- Generic: Hunt for Atomic Red Team artifacts
index=windows (sourcetype="WinEventLog:Microsoft-Windows-Sysmon/Operational"
OR sourcetype="WinEventLog:Security")
| search "*AtomicRedTeam*" OR "*atomic*" OR "*Invoke-AtomicTest*"
| stats count by sourcetype, EventCode, host
Elastic / KQL Queries:
━━━━━━━━━━━━━━━━━━━━━
-- PowerShell script block logging
event.code: "4104" and powershell.file.script_block_text: *
-- Sysmon process creation from AtomicRedTeam paths
event.code: "1" and process.executable: *AtomicRedTeam*
-- Registry modification (persistence)
event.code: "13" and registry.path: *CurrentVersion\\Run*
-- Credential access indicators
event.code: "10" and winlog.event_data.TargetImage: *lsass.exe*
Step 5: ATT&CK Coverage Gap Analysis

Generate a coverage matrix comparing tested vs. detected techniques:

python
#!/usr/bin/env python3
"""ATT&CK coverage gap analysis - compares atomic test results against SIEM detections."""
import json
import os
import yaml
from pathlib import Path
from datetime import datetime
def load_atomics_inventory(atomics_path):
"""Parse all atomic test YAML files to build technique inventory."""
inventory = {}
atomics_dir = Path(atomics_path)
for yaml_file in atomics_dir.glob("T*/T*.yaml"):
try:
with open(yaml_file, "r", encoding="utf-8") as f:
data = yaml.safe_load(f)
tech_id = data.get("attack_technique", "")
if not tech_id:
continue
tests = data.get("atomic_tests", [])
inventory[tech_id] = {
"name": data.get("display_name", "Unknown"),
"test_count": len(tests),
"platforms": list(set(
p for t in tests
for p in t.get("supported_platforms", [])
)),
"tests": [
{
"name": t.get("name", "Unnamed"),
"description": t.get("description", ""),
"platforms": t.get("supported_platforms", []),
"executor": t.get("executor", {}).get("name", "unknown"),
}
for t in tests
],
}
except Exception as e:
print(f"[WARN] Failed to parse {yaml_file}: {e}")
return inventory
def load_execution_logs(log_dir):
"""Load atomic test execution logs."""
executed = {}
log_path = Path(log_dir)
if not log_path.exists():
return executed
for log_file in log_path.glob("T*_*.json"):
try:
with open(log_file, "r") as f:
data = json.load(f)
tech_id = data.get("technique_id", "")
if tech_id:
if tech_id not in executed:
executed[tech_id] = {
"executions": [],
"last_executed": data.get("end_time", ""),
}
executed[tech_id]["executions"].append({
"timestamp": data.get("start_time", ""),
"results": data.get("results", []),
})
except Exception as e:
print(f"[WARN] Failed to parse {log_file}: {e}")
return executed
def load_detection_results(detection_file):
"""Load SIEM detection validation results (JSON export from SIEM queries)."""
if not os.path.exists(detection_file):
return {}
with open(detection_file, "r") as f:
data = json.load(f)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
33,538
Repository forks
4,068
7-day trend score
52

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 24 May 2026, 6 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mukul975/anthropic-cybersecurity-skills/performing-purple-team-atomic-testing/badge)](https://verified-skill.com/skills/mukul975/anthropic-cybersecurity-skills/performing-purple-team-atomic-testing)

Something wrong with this skill or its page? Tell us.