[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AA91E39GRC3P9PAFZM59MJ":3,"skill-same:01M7AA91E39GRC3P9PAFZM59MJ":94},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":14,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M7AA91E39GRC3P9PAFZM59MJ","performing-purple-team-atomic-testing",null,"Executes Atomic Red Team tests mapped to MITRE ATT&CK via Invoke-AtomicRedTeam PowerShell, generates ATT&CK Navigator coverage heatmaps, correlates results against Sigma rules, and runs detection validation loops to measure blue team visibility. Use for purple team exercises, atomic test execution, ATT&CK coverage assessment, or detection engineering validation.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-purple-team-atomic-testing\ndescription: 'Executes Atomic Red Team tests mapped to MITRE ATT&CK via Invoke-AtomicRedTeam\n  PowerShell, generates ATT&CK Navigator coverage heatmaps, correlates results against\n  Sigma rules, and runs detection validation loops to measure blue team visibility.\n  Use for purple team exercises, atomic test execution, ATT&CK coverage assessment,\n  or detection engineering validation.\n\n  '\ndomain: cybersecurity\nsubdomain: purple-team\ntags:\n- purple-team\n- atomic-red-team\n- mitre-attack\n- detection-engineering\n- adversary-emulation\nversion: 1.0.0\nauthor: mukul975\nlicense: Apache-2.0\nnist_ai_rmf:\n- MEASURE-2.7\n- MAP-5.1\n- MANAGE-2.4\natlas_techniques:\n- AML.T0070\n- AML.T0066\n- AML.T0082\nd3fend_techniques:\n- Executable Denylisting\n- Execution Isolation\n- File Metadata Consistency Validation\n- Content Format Conversion\n- File Content Analysis\nnist_csf:\n- ID.RA-01\n- DE.AE-07\n- GV.OV-02\nmitre_attack:\n- T1078\n- T1190\n- T1059\n---\n\n# Performing Purple Team Atomic Testing\n\n## When to Use\n\n- Validating detection coverage against specific MITRE ATT&CK techniques\n- Running purple team exercises using Atomic Red Team test library\n- Performing ATT&CK coverage gap analysis to identify blind spots in SIEM\u002FEDR\n- Building a detection validation loop: execute atomic test, check SIEM, tune rule, retest\n- Generating ATT&CK Navigator heatmap layers for executive reporting\n- Automating continuous atomic testing in CI\u002FCD or scheduled pipelines\n- Mapping threat intelligence reports to executable atomic tests\n\n**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.\n\n**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.\n\n## Prerequisites\n\n- Windows host with PowerShell 5.1+ or PowerShell Core 7+ (Linux\u002FmacOS supported for cross-platform atomics)\n- Invoke-AtomicRedTeam PowerShell module installed from PSGallery\n- Atomic Red Team atomics repository cloned locally\n- SIEM\u002FEDR with log ingestion from test endpoints (Splunk, Elastic, Microsoft Sentinel, CrowdStrike)\n- MITRE ATT&CK Navigator (web-based or local instance) for layer visualization\n- Python 3.9+ with `mitreattack-python`, `pyyaml`, and `requests` for automation scripts\n- Sigma rules repository for detection correlation\n- Administrative\u002Froot access on test endpoints\n- Isolated test environment (lab, sandbox, or dedicated test range)\n\n## Workflow\n\n### Step 1: Install and Configure Invoke-AtomicRedTeam\n\nSet up the execution framework and download the atomics library:\n\n```powershell\n# Install the PowerShell execution module\nInstall-Module -Name invoke-atomicredteam -Scope CurrentUser -Force\nInstall-Module -Name powershell-yaml -Scope CurrentUser -Force\n\n# Import the module\nImport-Module invoke-atomicredteam\n\n# Install atomics to default location (C:\\AtomicRedTeam\\atomics)\nIEX (IEX (New-Object System.Net.WebClient).DownloadString(\n    'https:\u002F\u002Fraw.githubusercontent.com\u002Fredcanaryco\u002Finvoke-atomicredteam\u002Fmaster\u002Finstall-atomicredteam.ps1'\n)); Install-AtomicRedTeam -getAtomics -Force\n\n# Verify installation - list available techniques\n$atomicsPath = \"C:\\AtomicRedTeam\\atomics\"\n$techniques = Get-ChildItem $atomicsPath -Directory | Where-Object { $_.Name -match '^T\\d{4}' }\nWrite-Host \"Available techniques: $($techniques.Count)\"\n\n# Configure execution logging\n$env:ARTLOG = \"C:\\AtomicRedTeam\\logs\"\nif (-not (Test-Path $env:ARTLOG)) { New-Item -Path $env:ARTLOG -ItemType Directory }\n```\n\n### Step 2: Enumerate and Select Atomic Tests\n\nInventory available tests and select targets based on threat intelligence or gap analysis:\n\n```powershell\n# List all tests for a specific technique\nInvoke-AtomicTest T1059.001 -ShowDetailsBrief\n\n# Show full details including attack commands and cleanup\nInvoke-AtomicTest T1059.001 -ShowDetails\n\n# List tests for a tactic (e.g., Persistence)\n$persistenceTechniques = @(\n    \"T1547.001\",  # Boot or Logon Autostart - Registry Run Keys\n    \"T1053.005\",  # Scheduled Task\n    \"T1136.001\",  # Create Account - Local Account\n    \"T1543.003\",  # Create or Modify System Process - Windows Service\n    \"T1546.001\",  # Event Triggered Execution - Change Default File Association\n    \"T1574.001\",  # Hijack Execution Flow - DLL Search Order Hijacking\n    \"T1197\"       # BITS Jobs\n)\n\nforeach ($tech in $persistenceTechniques) {\n    Write-Host \"`n=== $tech ===\" -ForegroundColor Cyan\n    try {\n        Invoke-AtomicTest $tech -ShowDetailsBrief\n    } catch {\n        Write-Host \"  No tests available\" -ForegroundColor Yellow\n    }\n}\n\n# Get all atomic techniques from YAML files programmatically\n$allAtomics = Get-ChildItem \"$atomicsPath\\T*\\T*.yaml\" -Recurse |\n    ForEach-Object {\n        $yaml = Get-Content $_.FullName -Raw | ConvertFrom-Yaml\n        [PSCustomObject]@{\n            TechniqueId   = $yaml.attack_technique\n            TechniqueName = $yaml.display_name\n            TestCount     = $yaml.atomic_tests.Count\n            Platforms     = ($yaml.atomic_tests.supported_platforms | Sort-Object -Unique) -join \", \"\n        }\n    }\n\n$allAtomics | Sort-Object TechniqueId | Format-Table -AutoSize\nWrite-Host \"Total techniques with tests: $($allAtomics.Count)\"\nWrite-Host \"Total individual tests: $(($allAtomics | Measure-Object -Property TestCount -Sum).Sum)\"\n```\n\n### Step 3: Execute Atomic Tests with Logging\n\nRun tests with pre\u002Fpost logging for detection validation:\n\n```powershell\n# Execute a single test by technique ID (runs all tests for that technique)\nInvoke-AtomicTest T1059.001\n\n# Execute a specific test by number\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute by test name\nInvoke-AtomicTest T1059.001 -TestNames \"Mimikatz - Cradled Invoke Expression\"\n\n# Execute by GUID\nInvoke-AtomicTest T1059.001 -TestGuids \"2e803f96-4e33-4c2c-b0c8-1c10cbb3945f\"\n\n# Execute with prerequisite check and installation\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -CheckPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -GetPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute with timeout (seconds)\nInvoke-AtomicTest T1003.001 -TimeoutSeconds 120\n\n# Cleanup after testing\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup\n\n# Execute with full logging wrapper\nfunction Invoke-AtomicWithLogging {\n    param(\n        [string]$TechniqueId,\n        [int[]]$TestNumbers,\n        [string]$LogPath = \"C:\\AtomicRedTeam\\logs\"\n    )\n\n    $timestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n    $logFile = Join-Path $LogPath \"${TechniqueId}_${timestamp}.json\"\n\n    $result = @{\n        technique_id  = $TechniqueId\n        test_numbers  = $TestNumbers\n        start_time    = (Get-Date).ToString(\"o\")\n        hostname      = $env:COMPUTERNAME\n        username      = $env:USERNAME\n        results       = @()\n    }\n\n    foreach ($testNum in $TestNumbers) {\n        $testResult = @{\n            test_number = $testNum\n            status      = \"unknown\"\n            start_time  = (Get-Date).ToString(\"o\")\n        }\n\n        try {\n            # Show what will execute\n            $details = Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -ShowDetails 2>&1\n            $testResult[\"details\"] = $details | Out-String\n\n            # Execute the test\n            Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -Confirm:$false\n            $testResult[\"status\"] = \"executed\"\n        } catch {\n            $testResult[\"status\"] = \"failed\"\n            $testResult[\"error\"] = $_.Exception.Message\n        }\n\n        $testResult[\"end_time\"] = (Get-Date).ToString(\"o\")\n        $result.results += $testResult\n\n        # Wait for SIEM ingestion\n        Start-Sleep -Seconds 30\n    }\n\n    $result[\"end_time\"] = (Get-Date).ToString(\"o\")\n    $result | ConvertTo-Json -Depth 10 | Set-Content $logFile\n    Write-Host \"Log written to: $logFile\" -ForegroundColor Green\n    return $result\n}\n\n# Usage\nInvoke-AtomicWithLogging -TechniqueId \"T1059.001\" -TestNumbers @(1, 2, 3)\n```\n\n### Step 4: Validate Detections in SIEM\n\nQuery your SIEM to confirm whether atomic tests generated alerts:\n\n```\nSplunk SPL Queries for Detection Validation:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n-- T1059.001: PowerShell Execution\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-PowerShell\u002FOperational\"\n  EventCode=4104\n  | eval script_block=ScriptBlockText\n  | where len(script_block) > 500\n  | stats count by host, script_block\n  | sort -count\n\n-- T1003.001: LSASS Memory Credential Dumping\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4663\n  ObjectName=\"*lsass*\"\n  | stats count by host, SubjectUserName, ProcessName\n  | where count > 0\n\n-- T1547.001: Registry Run Key Persistence\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  EventCode=13\n  TargetObject=\"*\\\\CurrentVersion\\\\Run*\"\n  | stats count by host, Image, TargetObject, Details\n\n-- T1053.005: Scheduled Task Creation\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4698\n  | stats count by host, SubjectUserName, TaskName, TaskContent\n  | sort -count\n\n-- Generic: Hunt for Atomic Red Team artifacts\nindex=windows (sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  OR sourcetype=\"WinEventLog:Security\")\n  | search \"*AtomicRedTeam*\" OR \"*atomic*\" OR \"*Invoke-AtomicTest*\"\n  | stats count by sourcetype, EventCode, host\n```\n\n```\nElastic \u002F KQL Queries:\n━━━━━━━━━━━━━━━━━━━━━\n\n-- PowerShell script block logging\nevent.code: \"4104\" and powershell.file.script_block_text: *\n\n-- Sysmon process creation from AtomicRedTeam paths\nevent.code: \"1\" and process.executable: *AtomicRedTeam*\n\n-- Registry modification (persistence)\nevent.code: \"13\" and registry.path: *CurrentVersion\\\\Run*\n\n-- Credential access indicators\nevent.code: \"10\" and winlog.event_data.TargetImage: *lsass.exe*\n```\n\n### Step 5: ATT&CK Coverage Gap Analysis\n\nGenerate a coverage matrix comparing tested vs. detected techniques:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"ATT&CK coverage gap analysis - compares atomic test results against SIEM detections.\"\"\"\n\nimport json\nimport os\nimport yaml\nfrom pathlib import Path\nfrom datetime import datetime\n\n\ndef load_atomics_inventory(atomics_path):\n    \"\"\"Parse all atomic test YAML files to build technique inventory.\"\"\"\n    inventory = {}\n    atomics_dir = Path(atomics_path)\n\n    for yaml_file in atomics_dir.glob(\"T*\u002FT*.yaml\"):\n        try:\n            with open(yaml_file, \"r\", encoding=\"utf-8\") as f:\n                data = yaml.safe_load(f)\n\n            tech_id = data.get(\"attack_technique\", \"\")\n            if not tech_id:\n                continue\n\n            tests = data.get(\"atomic_tests\", [])\n            inventory[tech_id] = {\n                \"name\": data.get(\"display_name\", \"Unknown\"),\n                \"test_count\": len(tests),\n                \"platforms\": list(set(\n                    p for t in tests\n                    for p in t.get(\"supported_platforms\", [])\n                )),\n                \"tests\": [\n                    {\n                        \"name\": t.get(\"name\", \"Unnamed\"),\n                        \"description\": t.get(\"description\", \"\"),\n                        \"platforms\": t.get(\"supported_platforms\", []),\n                        \"executor\": t.get(\"executor\", {}).get(\"name\", \"unknown\"),\n                    }\n                    for t in tests\n                ],\n            }\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {yaml_file}: {e}\")\n\n    return inventory\n\n\ndef load_execution_logs(log_dir):\n    \"\"\"Load atomic test execution logs.\"\"\"\n    executed = {}\n    log_path = Path(log_dir)\n\n    if not log_path.exists():\n        return executed\n\n    for log_file in log_path.glob(\"T*_*.json\"):\n        try:\n            with open(log_file, \"r\") as f:\n                data = json.load(f)\n            tech_id = data.get(\"technique_id\", \"\")\n            if tech_id:\n                if tech_id not in executed:\n                    executed[tech_id] = {\n                        \"executions\": [],\n                        \"last_executed\": data.get(\"end_time\", \"\"),\n                    }\n                executed[tech_id][\"executions\"].append({\n                    \"timestamp\": data.get(\"start_time\", \"\"),\n                    \"results\": data.get(\"results\", []),\n                })\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {log_file}: {e}\")\n\n    return executed\n\n\ndef load_detection_results(detection_file):\n    \"\"\"Load SIEM detection validation results (JSON export from SIEM queries).\"\"\"\n    if not os.path.exists(detection_file):\n        return {}\n\n    with open(detection_file, \"r\") as f:\n        data = json.load(f)\n\n    detections = {}\n    for entry in data:\n        tech_id = entry.get(\"technique_id\", \"\")\n        if tech_id:\n            detections[tech_id] = {\n                \"detected\": entry.get(\"detected\", False),\n                \"alert_count\": entry.get(\"alert_count\", 0),\n                \"rule_name\": entry.get(\"rule_name\", \"\"),\n                \"confidence\": entry.get(\"confidence\", \"unknown\"),\n                \"data_sources\": entry.get(\"data_sources\", []),\n            }\n\n    return detections\n\n\n# MITRE ATT&CK tactic ordering for structured output\nTACTIC_ORDER = [\n    \"reconnaissance\", \"resource-development\", \"initial-access\",\n    \"execution\", \"persistence\", \"privilege-escalation\",\n    \"defense-evasion\", \"credential-access\", \"discovery\",\n    \"lateral-movement\", \"collection\", \"command-and-control\",\n    \"exfiltration\", \"impact\",\n]\n\n# Tactic-to-technique mapping for common techniques (subset for illustration)\nTACTIC_TECHNIQUE_MAP = {\n    \"execution\": [\n        \"T1059\", \"T1059.001\", \"T1059.003\", \"T1059.004\", \"T1059.005\",\n        \"T1059.006\", \"T1059.007\", \"T1047\", \"T1053\", \"T1053.005\",\n        \"T1129\", \"T1203\", \"T1569\", \"T1569.002\",\n    ],\n    \"persistence\": [\n        \"T1547\", \"T1547.001\", \"T1547.004\", \"T1547.009\",\n        \"T1053.005\", \"T1136\", \"T1136.001\", \"T1543\", \"T1543.003\",\n        \"T1546\", \"T1546.001\", \"T1546.003\", \"T1574\", \"T1574.001\",\n        \"T1197\", \"T1505\", \"T1505.003\",\n    ],\n    \"credential-access\": [\n        \"T1003\", \"T1003.001\", \"T1003.002\", \"T1003.003\",\n        \"T1003.004\", \"T1003.005\", \"T1003.006\",\n        \"T1110\", \"T1110.001\", \"T1110.003\",\n        \"T1555\", \"T1555.003\", \"T1552\", \"T1552.001\",\n        \"T1558\", \"T1558.003\",\n    ],\n    \"defense-evasion\": [\n        \"T1070\", \"T1070.001\", \"T1070.004\",\n        \"T1218\", \"T1218.001\", \"T1218.003\", \"T1218.005\",\n        \"T1218.010\", \"T1218.011\",\n        \"T1027\", \"T1140\", \"T1562\", \"T1562.001\",\n        \"T1036\", \"T1036.005\",\n    ],\n    \"discovery\": [\n        \"T1082\", \"T1083\", \"T1087\", \"T1087.001\", \"T1087.002\",\n        \"T1016\", \"T1049\", \"T1057\", \"T1069\", \"T1069.001\",\n        \"T1069.002\", \"T1518\", \"T1518.001\",\n    ],\n    \"lateral-movement\": [\n        \"T1021\", \"T1021.001\", \"T1021.002\", \"T1021.003\",\n        \"T1021.004\", \"T1021.006\", \"T1570\",\n    ],\n    \"command-and-control\": [\n        \"T1071\", \"T1071.001\", \"T1071.004\",\n        \"T1105\", \"T1132\", \"T1573\", \"T1573.001\",\n        \"T1219\", \"T1090\",\n    ],\n    \"exfiltration\": [\n        \"T1041\", \"T1048\", \"T1048.003\", \"T1567\",\n    ],\n    \"impact\": [\n        \"T1485\", \"T1486\", \"T1489\", \"T1490\", \"T1491\",\n    ],\n}\n\n\ndef generate_coverage_report(atomics_inventory, execution_logs, detection_results):\n    \"\"\"Generate comprehensive coverage gap analysis.\"\"\"\n    report = {\n        \"generated_at\": datetime.utcnow().isoformat() + \"Z\",\n        \"summary\": {},\n        \"tactics\": {},\n        \"gaps\": [],\n        \"recommendations\": [],\n    }\n\n    total_available = len(atomics_inventory)\n    total_executed = len(execution_logs)\n    total_detected = sum(1 for d in detection_results.values() if d.get(\"detected\"))\n\n    report[\"summary\"] = {\n        \"total_techniques_with_atomics\": total_available,\n        \"total_techniques_executed\": total_executed,\n        \"total_techniques_detected\": total_detected,\n        \"execution_coverage_pct\": round(\n            (total_executed \u002F total_available * 100) if total_available else 0, 1\n        ),\n        \"detection_coverage_pct\": round(\n            (total_detected \u002F total_executed * 100) if total_executed else 0, 1\n        ),\n    }\n\n    # Per-tactic analysis\n    for tactic, technique_ids in TACTIC_TECHNIQUE_MAP.items():\n        tactic_data = {\n            \"techniques_available\": 0,\n            \"techniques_executed\": 0,\n            \"techniques_detected\": 0,\n            \"gaps\": [],\n        }\n\n        for tech_id in technique_ids:\n            if tech_id in atomics_inventory:\n                tactic_data[\"techniques_available\"] += 1\n\n                executed = tech_id in execution_logs\n                detected = detection_results.get(tech_id, {}).get(\"detected\", False)\n\n                if executed:\n                    tactic_data[\"techniques_executed\"] += 1\n                if detected:\n                    tactic_data[\"techniques_detected\"] += 1\n\n                if executed and not detected:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"BLIND_SPOT\",\n                        \"detail\": \"Test executed but no detection triggered\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n                    report[\"gaps\"].append(gap)\n                elif not executed and tech_id in atomics_inventory:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"NOT_TESTED\",\n                        \"detail\": \"Atomic test available but not yet executed\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n\n        avail = tactic_data[\"techniques_available\"]\n        tactic_data[\"coverage_pct\"] = round(\n            (tactic_data[\"techniques_detected\"] \u002F avail * 100) if avail else 0, 1\n        )\n        report[\"tactics\"][tactic] = tactic_data\n\n    # Generate prioritized recommendations\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        report[\"recommendations\"].append({\n            \"priority\": \"CRITICAL\",\n            \"action\": f\"Write detection rules for {len(blind_spots)} blind spot techniques\",\n            \"techniques\": [g[\"technique_id\"] for g in blind_spots],\n        })\n\n    low_coverage_tactics = [\n        t for t, d in report[\"tactics\"].items() if d[\"coverage_pct\"] \u003C 30\n    ]\n    if low_coverage_tactics:\n        report[\"recommendations\"].append({\n            \"priority\": \"HIGH\",\n            \"action\": f\"Expand testing in low-coverage tactics: {', '.join(low_coverage_tactics)}\",\n            \"detail\": \"These tactics have less than 30% detection coverage\",\n        })\n\n    return report\n\n\ndef generate_navigator_layer(atomics_inventory, execution_logs, detection_results,\n                             layer_name=\"Purple Team Coverage\"):\n    \"\"\"Generate ATT&CK Navigator layer JSON for heatmap visualization.\"\"\"\n    layer = {\n        \"name\": layer_name,\n        \"versions\": {\n            \"attack\": \"15\",\n            \"navigator\": \"5.1\",\n            \"layer\": \"4.5\",\n        },\n        \"domain\": \"enterprise-attack\",\n        \"description\": f\"Purple team atomic testing coverage - Generated {datetime.utcnow().isoformat()}Z\",\n        \"filters\": {\"platforms\": [\"Windows\", \"Linux\", \"macOS\"]},\n        \"sorting\": 0,\n        \"layout\": {\n            \"layout\": \"side\",\n            \"aggregateFunction\": \"average\",\n            \"showID\": True,\n            \"showName\": True,\n        },\n        \"hideDisabled\": False,\n        \"techniques\": [],\n        \"gradient\": {\n            \"colors\": [\"#ff6666\", \"#ffeb3b\", \"#66bb6a\"],\n            \"minValue\": 0,\n            \"maxValue\": 100,\n        },\n        \"legendItems\": [\n            {\"label\": \"No Coverage (Blind Spot)\", \"color\": \"#ff6666\"},\n            {\"label\": \"Logged Only (Partial)\", \"color\": \"#ffeb3b\"},\n            {\"label\": \"Alert\u002FDetection Active\", \"color\": \"#66bb6a\"},\n            {\"label\": \"Not Tested\", \"color\": \"#d3d3d3\"},\n        ],\n        \"metadata\": [],\n        \"links\": [],\n        \"showTacticRowBackground\": True,\n        \"tacticRowBackground\": \"#dddddd\",\n        \"selectTechniquesAcrossTactics\": True,\n        \"selectSubtechniquesWithParent\": False,\n    }\n\n    for tech_id, tech_data in atomics_inventory.items():\n        executed = tech_id in execution_logs\n        detection = detection_results.get(tech_id, {})\n        detected = detection.get(\"detected\", False)\n        confidence = detection.get(\"confidence\", \"none\")\n\n        if detected and confidence in (\"high\", \"medium\"):\n            score = 100\n            color = \"#66bb6a\"  # Green - high confidence detection\n            comment = f\"DETECTED - {detection.get('rule_name', 'Alert active')}\"\n        elif detected:\n            score = 50\n            color = \"#ffeb3b\"  # Yellow - logged\u002Fpartial\n            comment = \"PARTIAL - Detection exists but low confidence\"\n        elif executed:\n            score = 0\n            color = \"#ff6666\"  # Red - blind spot\n            comment = \"BLIND SPOT - Test executed, no detection\"\n        else:\n            score = 0\n            color = \"#d3d3d3\"  # Gray - not tested\n            comment = f\"NOT TESTED - {tech_data['test_count']} atomic tests available\"\n\n        technique_entry = {\n            \"techniqueID\": tech_id,\n            \"tactic\": \"\",\n            \"color\": color,\n            \"comment\": comment,\n            \"score\": score,\n            \"enabled\": True,\n            \"metadata\": [\n                {\"name\": \"tests_available\", \"value\": str(tech_data[\"test_count\"])},\n                {\"name\": \"executed\", \"value\": str(executed)},\n                {\"name\": \"detected\", \"value\": str(detected)},\n            ],\n            \"links\": [],\n            \"showSubtechniques\": False,\n        }\n        layer[\"techniques\"].append(technique_entry)\n\n    return layer\n\n\ndef print_coverage_report(report):\n    \"\"\"Print formatted coverage report to console.\"\"\"\n    print(\"=\" * 72)\n    print(\"PURPLE TEAM ATOMIC TESTING - COVERAGE GAP ANALYSIS\")\n    print(\"=\" * 72)\n    print(f\"Generated: {report['generated_at']}\")\n    print()\n\n    s = report[\"summary\"]\n    print(\"EXECUTIVE SUMMARY\")\n    print(\"-\" * 40)\n    print(f\"  Techniques with atomics:  {s['total_techniques_with_atomics']}\")\n    print(f\"  Techniques executed:      {s['total_techniques_executed']}\")\n    print(f\"  Techniques detected:      {s['total_techniques_detected']}\")\n    print(f\"  Execution coverage:       {s['execution_coverage_pct']}%\")\n    print(f\"  Detection coverage:       {s['detection_coverage_pct']}%\")\n    print()\n\n    print(\"PER-TACTIC COVERAGE\")\n    print(\"-\" * 72)\n    print(f\"{'Tactic':\u003C25} {'Available':>9} {'Executed':>9} {'Detected':>9} {'Coverage':>9}\")\n    print(\"-\" * 72)\n    for tactic in TACTIC_ORDER:\n        if tactic in report[\"tactics\"]:\n            t = report[\"tactics\"][tactic]\n            bar = \"#\" * int(t[\"coverage_pct\"] \u002F 5) + \".\" * (20 - int(t[\"coverage_pct\"] \u002F 5))\n            print(\n                f\"  {tactic:\u003C23} {t['techniques_available']:>9} \"\n                f\"{t['techniques_executed']:>9} {t['techniques_detected']:>9} \"\n                f\"{t['coverage_pct']:>8.1f}%\"\n            )\n    print()\n\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        print(\"CRITICAL BLIND SPOTS (executed but not detected)\")\n        print(\"-\" * 72)\n        for gap in blind_spots:\n            print(f\"  [!] {gap['technique_id']} - {gap['technique_name']}\")\n            print(f\"      Tactic: {gap['tactic']}\")\n        print()\n\n    if report[\"recommendations\"]:\n        print(\"RECOMMENDATIONS\")\n        print(\"-\" * 72)\n        for rec in report[\"recommendations\"]:\n            print(f\"  [{rec['priority']}] {rec['action']}\")\n            if \"techniques\" in rec:\n                print(f\"         Techniques: {', '.join(rec['techniques'][:10])}\")\n            if \"detail\" in rec:\n                print(f\"         {rec['detail']}\")\n        print()\n\n\nif __name__ == \"__main__\":\n    import argparse\n\n    parser = argparse.ArgumentParser(description=\"ATT&CK coverage gap analysis for purple team testing\")\n    parser.add_argument(\"--atomics-path\", default=r\"C:\\AtomicRedTeam\\atomics\",\n                        help=\"Path to Atomic Red Team atomics directory\")\n    parser.add_argument(\"--log-dir\", default=r\"C:\\AtomicRedTeam\\logs\",\n                        help=\"Path to atomic test execution logs\")\n    parser.add_argument(\"--detections-file\", default=\"detection_results.json\",\n                        help=\"Path to SIEM detection validation export (JSON)\")\n    parser.add_argument(\"--output-layer\", default=\"navigator_layer.json\",\n                        help=\"Output path for ATT&CK Navigator layer JSON\")\n    parser.add_argument(\"--output-report\", default=\"coverage_report.json\",\n                        help=\"Output path for coverage report JSON\")\n    args = parser.parse_args()\n\n    print(\"[*] Loading atomics inventory...\")\n    inventory = load_atomics_inventory(args.atomics_path)\n    print(f\"    Found {len(inventory)} techniques with atomic tests\")\n\n    print(\"[*] Loading execution logs...\")\n    exec_logs = load_execution_logs(args.log_dir)\n    print(f\"    Found logs for {len(exec_logs)} techniques\")\n\n    print(\"[*] Loading detection results...\")\n    det_results = load_detection_results(args.detections_file)\n    print(f\"    Found detection data for {len(det_results)} techniques\")\n\n    print(\"[*] Generating coverage report...\")\n    report = generate_coverage_report(inventory, exec_logs, det_results)\n    print_coverage_report(report)\n\n    # Save report JSON\n    with open(args.output_report, \"w\") as f:\n        json.dump(report, f, indent=2)\n    print(f\"[+] Report saved to {args.output_report}\")\n\n    # Generate and save Navigator layer\n    print(\"[*] Generating ATT&CK Navigator layer...\")\n    layer = generate_navigator_layer(inventory, exec_logs, det_results)\n    with open(args.output_layer, \"w\") as f:\n        json.dump(layer, f, indent=2)\n    print(f\"[+] Navigator layer saved to {args.output_layer}\")\n    print(f\"    Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\")\n```\n\n### Step 6: Run Continuous Atomic Testing Pipeline\n\nSchedule recurring tests against priority techniques:\n\n```powershell\n# Continuous Atomic Testing - scheduled execution with validation\n# Run as a scheduled task or via CI\u002FCD pipeline\n\n$PriorityTechniques = @(\n    # Top MITRE ATT&CK techniques by prevalence (Red Canary Threat Detection Report)\n    @{ Id = \"T1059.001\"; Name = \"PowerShell\" },\n    @{ Id = \"T1059.003\"; Name = \"Windows Command Shell\" },\n    @{ Id = \"T1547.001\"; Name = \"Registry Run Keys\" },\n    @{ Id = \"T1053.005\"; Name = \"Scheduled Task\" },\n    @{ Id = \"T1003.001\"; Name = \"LSASS Memory\" },\n    @{ Id = \"T1003.003\"; Name = \"NTDS\" },\n    @{ Id = \"T1070.004\"; Name = \"File Deletion\" },\n    @{ Id = \"T1218.011\"; Name = \"Rundll32\" },\n    @{ Id = \"T1082\";     Name = \"System Information Discovery\" },\n    @{ Id = \"T1105\";     Name = \"Ingress Tool Transfer\" }\n)\n\n$ResultsLog = @()\n$RunTimestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n\nforeach ($technique in $PriorityTechniques) {\n    Write-Host \"`n[*] Testing $($technique.Id) - $($technique.Name)\" -ForegroundColor Cyan\n\n    # Check prerequisites\n    try {\n        $prereqs = Invoke-AtomicTest $technique.Id -TestNumbers 1 -CheckPrereqs 2>&1\n        $prereqsMet = $prereqs -notmatch \"not met\"\n    } catch {\n        $prereqsMet = $false\n    }\n\n    if (-not $prereqsMet) {\n        Write-Host \"    [!] Prerequisites not met, attempting install...\" -ForegroundColor Yellow\n        try {\n            Invoke-AtomicTest $technique.Id -TestNumbers 1 -GetPrereqs 2>&1 | Out-Null\n        } catch {\n            Write-Host \"    [!] Prereq install failed, skipping\" -ForegroundColor Red\n            $ResultsLog += [PSCustomObject]@{\n                TechniqueId = $technique.Id\n                Name        = $technique.Name\n                Status      = \"PREREQS_FAILED\"\n                Timestamp   = (Get-Date).ToString(\"o\")\n            }\n            continue\n        }\n    }\n\n    # Execute the test\n    try {\n        $startTime = Get-Date\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Confirm:$false\n        $endTime = Get-Date\n        $duration = ($endTime - $startTime).TotalSeconds\n\n        Write-Host \"    [+] Executed successfully (${duration}s)\" -ForegroundColor Green\n\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"EXECUTED\"\n            Duration    = $duration\n            Timestamp   = $startTime.ToString(\"o\")\n        }\n    } catch {\n        Write-Host \"    [-] Execution failed: $($_.Exception.Message)\" -ForegroundColor Red\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"FAILED\"\n            Error       = $_.Exception.Message\n            Timestamp   = (Get-Date).ToString(\"o\")\n        }\n    }\n\n    # Cleanup\n    try {\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Cleanup 2>&1 | Out-Null\n        Write-Host \"    [+] Cleanup completed\" -ForegroundColor DarkGray\n    } catch {\n        Write-Host \"    [!] Cleanup failed\" -ForegroundColor Yellow\n    }\n\n    # Brief pause between tests for log ingestion\n    Start-Sleep -Seconds 10\n}\n\n# Export results\n$ResultsLog | Export-Csv \"C:\\AtomicRedTeam\\logs\\continuous_test_$RunTimestamp.csv\" -NoTypeInformation\n$ResultsLog | Format-Table -AutoSize\n\n# Summary\n$executed = ($ResultsLog | Where-Object Status -eq \"EXECUTED\").Count\n$failed = ($ResultsLog | Where-Object Status -ne \"EXECUTED\").Count\nWrite-Host \"`n=== CONTINUOUS TEST SUMMARY ===\" -ForegroundColor Cyan\nWrite-Host \"  Executed: $executed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Green\nWrite-Host \"  Failed:   $failed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Red\n```\n\n### Step 7: Detection Validation Loop\n\nClose the purple team loop by correlating tests with detections and iterating:\n\n```\nDetection Validation Loop Workflow:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n  ┌──────────────────┐\n  │ 1. SELECT        │  Choose technique from threat intel or gap report\n  │    TECHNIQUE     │  Map to Atomic Red Team test ID\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 2. EXECUTE       │  Run Invoke-AtomicTest with logging\n  │    ATOMIC TEST   │  Record timestamp, hostname, test details\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 3. WAIT FOR      │  Allow 30-60 seconds for log ingestion\n  │    INGESTION     │  Ensure Sysmon, WinEventLog, EDR agents forward data\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 4. QUERY SIEM    │  Search for correlated alerts matching technique\n  │    FOR ALERTS    │  Check: Did our detection rules fire?\n  └───────┬──────────┘\n          │\n     ┌────┴────┐\n     │DETECTED?│\n     └────┬────┘\n    YES   │   NO\n  ┌───────▼──────────┐   ┌──────────────────┐\n  │ 5a. MARK GREEN   │   │ 5b. WRITE NEW    │\n  │  Update Navigator│   │  Sigma\u002FSIEM Rule │\n  │  layer, log pass │   │  for technique   │\n  └───────┬──────────┘   └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5c. DEPLOY RULE  │\n          │               │  Push to SIEM    │\n          │               └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5d. RE-EXECUTE   │\n          │               │  Re-run atomic   │\n          │               │  test, validate  │\n          │               └───────┬──────────┘\n          │                       │\n  ┌───────▼───────────────────────▼──┐\n  │ 6. CLEANUP                       │\n  │    Run Invoke-AtomicTest -Cleanup│\n  │    Document results              │\n  └───────┬──────────────────────────┘\n          │\n  ┌───────▼──────────┐\n  │ 7. NEXT          │  Select next technique\n  │    TECHNIQUE     │  Repeat from step 1\n  └──────────────────┘\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Atomic Red Team** | Open-source library by Red Canary containing small, focused tests mapped to MITRE ATT&CK techniques for validating detection capabilities |\n| **Invoke-AtomicRedTeam** | PowerShell execution framework for running atomic tests locally or remotely, with prereq checking and cleanup |\n| **ATT&CK Navigator** | Web-based tool for annotating and visualizing MITRE ATT&CK matrices as layered heatmaps showing detection coverage |\n| **Navigator Layer** | JSON file defining colors, scores, and comments for each ATT&CK technique; used to generate coverage heatmaps |\n| **Detection Validation Loop** | Iterative purple team process: execute attack, check for detection, write\u002Ftune rule if missed, re-execute to confirm |\n| **Coverage Gap** | ATT&CK technique where no detection rule exists or where the rule fails to fire when the technique is executed |\n| **Blind Spot** | Technique that was tested via atomic execution but produced zero SIEM alerts, indicating a critical detection failure |\n| **Sigma Rule** | Vendor-agnostic detection rule format that can be converted to Splunk SPL, Elastic KQL, Microsoft KQL, and other SIEM queries |\n| **Purple Team** | Collaborative security exercise where red team executes known techniques and blue team validates and improves detections in real time |\n| **Continuous Atomic Testing** | Scheduled, automated execution of atomic tests to validate that detection rules remain functional as environments change |\n\n## Tools & Systems\n\n- **Invoke-AtomicRedTeam**: PowerShell module for executing Atomic Red Team tests with prereq management and cleanup\n- **Atomic Red Team Atomics**: Library of 700+ tests across 200+ MITRE ATT&CK techniques, organized by technique ID\n- **ATT&CK Navigator**: Web tool at mitre-attack.github.io\u002Fattack-navigator for creating technique coverage heatmaps\n- **VECTR**: Purple team reporting platform by SCYTHE for tracking test campaigns, results, and coverage over time\n- **Sigma**: Generic signature format for SIEM systems; convert with sigmac or pySigma to target SIEM platforms\n- **Splunk \u002F Elastic \u002F Microsoft Sentinel**: SIEM platforms for querying detection results after atomic test execution\n- **Sysmon**: Windows system monitoring driver providing detailed process, network, registry, and file telemetry\n- **Caldera**: MITRE-developed adversary emulation platform for automated, multi-step attack chains beyond single atomic tests\n\n## Common Scenarios\n\n### Scenario: Validating Credential Access Detections After EDR Deployment\n\n**Context**: The organization deployed a new EDR agent and needs to verify it detects credential dumping techniques (LSASS access, NTDS extraction, SAM dump). The purple team must confirm detections are working before closing the deployment ticket.\n\n**Approach**:\n1. Install Invoke-AtomicRedTeam on a test endpoint enrolled in the new EDR\n2. Execute credential access atomics: T1003.001 (LSASS Memory), T1003.002 (SAM), T1003.003 (NTDS)\n3. Wait 60 seconds, then query EDR console and SIEM for alerts on the test hostname\n4. For each technique: mark as DETECTED (green) or BLIND SPOT (red) in the Navigator layer\n5. For blind spots, create Sigma rules targeting Sysmon EventCode 10 (ProcessAccess to lsass.exe) and EventCode 1 (known dumping tools)\n6. Deploy rules, re-run atomics, confirm detection\n7. Export Navigator layer and coverage report for the deployment ticket\n\n**Pitfalls**:\n- Running credential dumping atomics without local admin privileges (tests will fail silently)\n- Forgetting to enable Sysmon ProcessAccess logging (EventCode 10) which is disabled by default\n- Not running cleanup, leaving test artifacts (created accounts, registry keys, scheduled tasks)\n- Testing only one sub-technique of T1003 and assuming all credential access is covered\n- Not accounting for EDR agent exclusions that may whitelist PowerShell or the AtomicRedTeam directory\n\n### Scenario: Building Monthly ATT&CK Coverage Reporting for Leadership\n\n**Context**: The CISO requires monthly metrics on detection coverage mapped to MITRE ATT&CK. The security team needs to run recurring tests, track improvements, and produce a visual heatmap showing coverage growth over time.\n\n**Approach**:\n1. Define a test plan covering the top 50 ATT&CK techniques from Red Canary Threat Detection Report\n2. Schedule continuous atomic testing via Windows Task Scheduler running the PowerShell pipeline weekly\n3. Export execution logs and SIEM detection query results to JSON after each run\n4. Run the Python gap analysis script to produce Navigator layer and coverage report\n5. Import the Navigator layer into ATT&CK Navigator, screenshot for executive slide deck\n6. Track month-over-month: number of green (detected) vs. red (blind spot) techniques\n7. Prioritize detection engineering sprints on the highest-impact blind spots\n\n**Pitfalls**:\n- Counting \"logged\" as \"detected\" (seeing an event in logs is not the same as having an alert rule)\n- Not updating the atomics repository (new tests are added frequently)\n- Focusing only on technique count rather than detection quality (a noisy rule with 90% false positives is worse than no rule)\n- Not involving the SOC analysts who will triage the alerts in the validation process\n\n## Output Format\n\n```\nPURPLE TEAM ATOMIC TESTING REPORT\n====================================\nCampaign:         Q1 2026 Detection Validation\nDate Range:       2026-01-15 to 2026-03-15\nTest Environment: YOURLAB-WIN10-01, YOURLAB-SRV-01\nSIEM:             Splunk Enterprise 9.x\n\nEXECUTION SUMMARY\nTechniques Tested:        47 \u002F 200+ available\nIndividual Tests Run:     112\nTests Succeeded:          104\nTests Failed (prereqs):   8\nCleanup Completed:        104 \u002F 104\n\nDETECTION COVERAGE\n                            Tested    Detected    Coverage\nExecution:                     12          10       83.3%\nPersistence:                    8           5       62.5%\nCredential Access:              6           4       66.7%\nDefense Evasion:               10           3       30.0%\nDiscovery:                      5           5      100.0%\nLateral Movement:               3           1       33.3%\nCommand and Control:            2           1       50.0%\nExfiltration:                   1           0        0.0%\n\nCRITICAL BLIND SPOTS\n[!] T1218.011 - Rundll32          (defense-evasion)\n[!] T1218.005 - Mshta             (defense-evasion)\n[!] T1070.004 - File Deletion     (defense-evasion)\n[!] T1574.001 - DLL Search Order  (persistence)\n[!] T1021.002 - SMB\u002FAdmin Shares  (lateral-movement)\n[!] T1048.003 - Exfil Over HTTP   (exfiltration)\n\nNAVIGATOR LAYER: coverage_layer_20260315.json\n  Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\n\nRECOMMENDATIONS\n[CRITICAL] Write Sigma rules for 6 blind spot techniques\n[HIGH]     Expand defense-evasion testing (30% coverage)\n[HIGH]     Enable exfiltration monitoring data sources\n[MEDIUM]   Increase lateral movement test coverage (3 of 7 tested)\n```\n","# Performing Purple Team Atomic Testing\n\n## When to Use\n\n- Validating detection coverage against specific MITRE ATT&CK techniques\n- Running purple team exercises using Atomic Red Team test library\n- Performing ATT&CK coverage gap analysis to identify blind spots in SIEM\u002FEDR\n- Building a detection validation loop: execute atomic test, check SIEM, tune rule, retest\n- Generating ATT&CK Navigator heatmap layers for executive reporting\n- Automating continuous atomic testing in CI\u002FCD or scheduled pipelines\n- Mapping threat intelligence reports to executable atomic tests\n\n**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.\n\n**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.\n\n## Prerequisites\n\n- Windows host with PowerShell 5.1+ or PowerShell Core 7+ (Linux\u002FmacOS supported for cross-platform atomics)\n- Invoke-AtomicRedTeam PowerShell module installed from PSGallery\n- Atomic Red Team atomics repository cloned locally\n- SIEM\u002FEDR with log ingestion from test endpoints (Splunk, Elastic, Microsoft Sentinel, CrowdStrike)\n- MITRE ATT&CK Navigator (web-based or local instance) for layer visualization\n- Python 3.9+ with `mitreattack-python`, `pyyaml`, and `requests` for automation scripts\n- Sigma rules repository for detection correlation\n- Administrative\u002Froot access on test endpoints\n- Isolated test environment (lab, sandbox, or dedicated test range)\n\n## Workflow\n\n### Step 1: Install and Configure Invoke-AtomicRedTeam\n\nSet up the execution framework and download the atomics library:\n\n```powershell\n# Install the PowerShell execution module\nInstall-Module -Name invoke-atomicredteam -Scope CurrentUser -Force\nInstall-Module -Name powershell-yaml -Scope CurrentUser -Force\n\n# Import the module\nImport-Module invoke-atomicredteam\n\n# Install atomics to default location (C:\\AtomicRedTeam\\atomics)\nIEX (IEX (New-Object System.Net.WebClient).DownloadString(\n    'https:\u002F\u002Fraw.githubusercontent.com\u002Fredcanaryco\u002Finvoke-atomicredteam\u002Fmaster\u002Finstall-atomicredteam.ps1'\n)); Install-AtomicRedTeam -getAtomics -Force\n\n# Verify installation - list available techniques\n$atomicsPath = \"C:\\AtomicRedTeam\\atomics\"\n$techniques = Get-ChildItem $atomicsPath -Directory | Where-Object { $_.Name -match '^T\\d{4}' }\nWrite-Host \"Available techniques: $($techniques.Count)\"\n\n# Configure execution logging\n$env:ARTLOG = \"C:\\AtomicRedTeam\\logs\"\nif (-not (Test-Path $env:ARTLOG)) { New-Item -Path $env:ARTLOG -ItemType Directory }\n```\n\n### Step 2: Enumerate and Select Atomic Tests\n\nInventory available tests and select targets based on threat intelligence or gap analysis:\n\n```powershell\n# List all tests for a specific technique\nInvoke-AtomicTest T1059.001 -ShowDetailsBrief\n\n# Show full details including attack commands and cleanup\nInvoke-AtomicTest T1059.001 -ShowDetails\n\n# List tests for a tactic (e.g., Persistence)\n$persistenceTechniques = @(\n    \"T1547.001\",  # Boot or Logon Autostart - Registry Run Keys\n    \"T1053.005\",  # Scheduled Task\n    \"T1136.001\",  # Create Account - Local Account\n    \"T1543.003\",  # Create or Modify System Process - Windows Service\n    \"T1546.001\",  # Event Triggered Execution - Change Default File Association\n    \"T1574.001\",  # Hijack Execution Flow - DLL Search Order Hijacking\n    \"T1197\"       # BITS Jobs\n)\n\nforeach ($tech in $persistenceTechniques) {\n    Write-Host \"`n=== $tech ===\" -ForegroundColor Cyan\n    try {\n        Invoke-AtomicTest $tech -ShowDetailsBrief\n    } catch {\n        Write-Host \"  No tests available\" -ForegroundColor Yellow\n    }\n}\n\n# Get all atomic techniques from YAML files programmatically\n$allAtomics = Get-ChildItem \"$atomicsPath\\T*\\T*.yaml\" -Recurse |\n    ForEach-Object {\n        $yaml = Get-Content $_.FullName -Raw | ConvertFrom-Yaml\n        [PSCustomObject]@{\n            TechniqueId   = $yaml.attack_technique\n            TechniqueName = $yaml.display_name\n            TestCount     = $yaml.atomic_tests.Count\n            Platforms     = ($yaml.atomic_tests.supported_platforms | Sort-Object -Unique) -join \", \"\n        }\n    }\n\n$allAtomics | Sort-Object TechniqueId | Format-Table -AutoSize\nWrite-Host \"Total techniques with tests: $($allAtomics.Count)\"\nWrite-Host \"Total individual tests: $(($allAtomics | Measure-Object -Property TestCount -Sum).Sum)\"\n```\n\n### Step 3: Execute Atomic Tests with Logging\n\nRun tests with pre\u002Fpost logging for detection validation:\n\n```powershell\n# Execute a single test by technique ID (runs all tests for that technique)\nInvoke-AtomicTest T1059.001\n\n# Execute a specific test by number\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute by test name\nInvoke-AtomicTest T1059.001 -TestNames \"Mimikatz - Cradled Invoke Expression\"\n\n# Execute by GUID\nInvoke-AtomicTest T1059.001 -TestGuids \"2e803f96-4e33-4c2c-b0c8-1c10cbb3945f\"\n\n# Execute with prerequisite check and installation\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -CheckPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -GetPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute with timeout (seconds)\nInvoke-AtomicTest T1003.001 -TimeoutSeconds 120\n\n# Cleanup after testing\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup\n\n# Execute with full logging wrapper\nfunction Invoke-AtomicWithLogging {\n    param(\n        [string]$TechniqueId,\n        [int[]]$TestNumbers,\n        [string]$LogPath = \"C:\\AtomicRedTeam\\logs\"\n    )\n\n    $timestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n    $logFile = Join-Path $LogPath \"${TechniqueId}_${timestamp}.json\"\n\n    $result = @{\n        technique_id  = $TechniqueId\n        test_numbers  = $TestNumbers\n        start_time    = (Get-Date).ToString(\"o\")\n        hostname      = $env:COMPUTERNAME\n        username      = $env:USERNAME\n        results       = @()\n    }\n\n    foreach ($testNum in $TestNumbers) {\n        $testResult = @{\n            test_number = $testNum\n            status      = \"unknown\"\n            start_time  = (Get-Date).ToString(\"o\")\n        }\n\n        try {\n            # Show what will execute\n            $details = Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -ShowDetails 2>&1\n            $testResult[\"details\"] = $details | Out-String\n\n            # Execute the test\n            Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -Confirm:$false\n            $testResult[\"status\"] = \"executed\"\n        } catch {\n            $testResult[\"status\"] = \"failed\"\n            $testResult[\"error\"] = $_.Exception.Message\n        }\n\n        $testResult[\"end_time\"] = (Get-Date).ToString(\"o\")\n        $result.results += $testResult\n\n        # Wait for SIEM ingestion\n        Start-Sleep -Seconds 30\n    }\n\n    $result[\"end_time\"] = (Get-Date).ToString(\"o\")\n    $result | ConvertTo-Json -Depth 10 | Set-Content $logFile\n    Write-Host \"Log written to: $logFile\" -ForegroundColor Green\n    return $result\n}\n\n# Usage\nInvoke-AtomicWithLogging -TechniqueId \"T1059.001\" -TestNumbers @(1, 2, 3)\n```\n\n### Step 4: Validate Detections in SIEM\n\nQuery your SIEM to confirm whether atomic tests generated alerts:\n\n```\nSplunk SPL Queries for Detection Validation:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n-- T1059.001: PowerShell Execution\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-PowerShell\u002FOperational\"\n  EventCode=4104\n  | eval script_block=ScriptBlockText\n  | where len(script_block) > 500\n  | stats count by host, script_block\n  | sort -count\n\n-- T1003.001: LSASS Memory Credential Dumping\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4663\n  ObjectName=\"*lsass*\"\n  | stats count by host, SubjectUserName, ProcessName\n  | where count > 0\n\n-- T1547.001: Registry Run Key Persistence\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  EventCode=13\n  TargetObject=\"*\\\\CurrentVersion\\\\Run*\"\n  | stats count by host, Image, TargetObject, Details\n\n-- T1053.005: Scheduled Task Creation\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4698\n  | stats count by host, SubjectUserName, TaskName, TaskContent\n  | sort -count\n\n-- Generic: Hunt for Atomic Red Team artifacts\nindex=windows (sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  OR sourcetype=\"WinEventLog:Security\")\n  | search \"*AtomicRedTeam*\" OR \"*atomic*\" OR \"*Invoke-AtomicTest*\"\n  | stats count by sourcetype, EventCode, host\n```\n\n```\nElastic \u002F KQL Queries:\n━━━━━━━━━━━━━━━━━━━━━\n\n-- PowerShell script block logging\nevent.code: \"4104\" and powershell.file.script_block_text: *\n\n-- Sysmon process creation from AtomicRedTeam paths\nevent.code: \"1\" and process.executable: *AtomicRedTeam*\n\n-- Registry modification (persistence)\nevent.code: \"13\" and registry.path: *CurrentVersion\\\\Run*\n\n-- Credential access indicators\nevent.code: \"10\" and winlog.event_data.TargetImage: *lsass.exe*\n```\n\n### Step 5: ATT&CK Coverage Gap Analysis\n\nGenerate a coverage matrix comparing tested vs. detected techniques:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"ATT&CK coverage gap analysis - compares atomic test results against SIEM detections.\"\"\"\n\nimport json\nimport os\nimport yaml\nfrom pathlib import Path\nfrom datetime import datetime\n\n\ndef load_atomics_inventory(atomics_path):\n    \"\"\"Parse all atomic test YAML files to build technique inventory.\"\"\"\n    inventory = {}\n    atomics_dir = Path(atomics_path)\n\n    for yaml_file in atomics_dir.glob(\"T*\u002FT*.yaml\"):\n        try:\n            with open(yaml_file, \"r\", encoding=\"utf-8\") as f:\n                data = yaml.safe_load(f)\n\n            tech_id = data.get(\"attack_technique\", \"\")\n            if not tech_id:\n                continue\n\n            tests = data.get(\"atomic_tests\", [])\n            inventory[tech_id] = {\n                \"name\": data.get(\"display_name\", \"Unknown\"),\n                \"test_count\": len(tests),\n                \"platforms\": list(set(\n                    p for t in tests\n                    for p in t.get(\"supported_platforms\", [])\n                )),\n                \"tests\": [\n                    {\n                        \"name\": t.get(\"name\", \"Unnamed\"),\n                        \"description\": t.get(\"description\", \"\"),\n                        \"platforms\": t.get(\"supported_platforms\", []),\n                        \"executor\": t.get(\"executor\", {}).get(\"name\", \"unknown\"),\n                    }\n                    for t in tests\n                ],\n            }\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {yaml_file}: {e}\")\n\n    return inventory\n\n\ndef load_execution_logs(log_dir):\n    \"\"\"Load atomic test execution logs.\"\"\"\n    executed = {}\n    log_path = Path(log_dir)\n\n    if not log_path.exists():\n        return executed\n\n    for log_file in log_path.glob(\"T*_*.json\"):\n        try:\n            with open(log_file, \"r\") as f:\n                data = json.load(f)\n            tech_id = data.get(\"technique_id\", \"\")\n            if tech_id:\n                if tech_id not in executed:\n                    executed[tech_id] = {\n                        \"executions\": [],\n                        \"last_executed\": data.get(\"end_time\", \"\"),\n                    }\n                executed[tech_id][\"executions\"].append({\n                    \"timestamp\": data.get(\"start_time\", \"\"),\n                    \"results\": data.get(\"results\", []),\n                })\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {log_file}: {e}\")\n\n    return executed\n\n\ndef load_detection_results(detection_file):\n    \"\"\"Load SIEM detection validation results (JSON export from SIEM queries).\"\"\"\n    if not os.path.exists(detection_file):\n        return {}\n\n    with open(detection_file, \"r\") as f:\n        data = json.load(f)\n\n    detections = {}\n    for entry in data:\n        tech_id = entry.get(\"technique_id\", \"\")\n        if tech_id:\n            detections[tech_id] = {\n                \"detected\": entry.get(\"detected\", False),\n                \"alert_count\": entry.get(\"alert_count\", 0),\n                \"rule_name\": entry.get(\"rule_name\", \"\"),\n                \"confidence\": entry.get(\"confidence\", \"unknown\"),\n                \"data_sources\": entry.get(\"data_sources\", []),\n            }\n\n    return detections\n\n\n# MITRE ATT&CK tactic ordering for structured output\nTACTIC_ORDER = [\n    \"reconnaissance\", \"resource-development\", \"initial-access\",\n    \"execution\", \"persistence\", \"privilege-escalation\",\n    \"defense-evasion\", \"credential-access\", \"discovery\",\n    \"lateral-movement\", \"collection\", \"command-and-control\",\n    \"exfiltration\", \"impact\",\n]\n\n# Tactic-to-technique mapping for common techniques (subset for illustration)\nTACTIC_TECHNIQUE_MAP = {\n    \"execution\": [\n        \"T1059\", \"T1059.001\", \"T1059.003\", \"T1059.004\", \"T1059.005\",\n        \"T1059.006\", \"T1059.007\", \"T1047\", \"T1053\", \"T1053.005\",\n        \"T1129\", \"T1203\", \"T1569\", \"T1569.002\",\n    ],\n    \"persistence\": [\n        \"T1547\", \"T1547.001\", \"T1547.004\", \"T1547.009\",\n        \"T1053.005\", \"T1136\", \"T1136.001\", \"T1543\", \"T1543.003\",\n        \"T1546\", \"T1546.001\", \"T1546.003\", \"T1574\", \"T1574.001\",\n        \"T1197\", \"T1505\", \"T1505.003\",\n    ],\n    \"credential-access\": [\n        \"T1003\", \"T1003.001\", \"T1003.002\", \"T1003.003\",\n        \"T1003.004\", \"T1003.005\", \"T1003.006\",\n        \"T1110\", \"T1110.001\", \"T1110.003\",\n        \"T1555\", \"T1555.003\", \"T1552\", \"T1552.001\",\n        \"T1558\", \"T1558.003\",\n    ],\n    \"defense-evasion\": [\n        \"T1070\", \"T1070.001\", \"T1070.004\",\n        \"T1218\", \"T1218.001\", \"T1218.003\", \"T1218.005\",\n        \"T1218.010\", \"T1218.011\",\n        \"T1027\", \"T1140\", \"T1562\", \"T1562.001\",\n        \"T1036\", \"T1036.005\",\n    ],\n    \"discovery\": [\n        \"T1082\", \"T1083\", \"T1087\", \"T1087.001\", \"T1087.002\",\n        \"T1016\", \"T1049\", \"T1057\", \"T1069\", \"T1069.001\",\n        \"T1069.002\", \"T1518\", \"T1518.001\",\n    ],\n    \"lateral-movement\": [\n        \"T1021\", \"T1021.001\", \"T1021.002\", \"T1021.003\",\n        \"T1021.004\", \"T1021.006\", \"T1570\",\n    ],\n    \"command-and-control\": [\n        \"T1071\", \"T1071.001\", \"T1071.004\",\n        \"T1105\", \"T1132\", \"T1573\", \"T1573.001\",\n        \"T1219\", \"T1090\",\n    ],\n    \"exfiltration\": [\n        \"T1041\", \"T1048\", \"T1048.003\", \"T1567\",\n    ],\n    \"impact\": [\n        \"T1485\", \"T1486\", \"T1489\", \"T1490\", \"T1491\",\n    ],\n}\n\n\ndef generate_coverage_report(atomics_inventory, execution_logs, detection_results):\n    \"\"\"Generate comprehensive coverage gap analysis.\"\"\"\n    report = {\n        \"generated_at\": datetime.utcnow().isoformat() + \"Z\",\n        \"summary\": {},\n        \"tactics\": {},\n        \"gaps\": [],\n        \"recommendations\": [],\n    }\n\n    total_available = len(atomics_inventory)\n    total_executed = len(execution_logs)\n    total_detected = sum(1 for d in detection_results.values() if d.get(\"detected\"))\n\n    report[\"summary\"] = {\n        \"total_techniques_with_atomics\": total_available,\n        \"total_techniques_executed\": total_executed,\n        \"total_techniques_detected\": total_detected,\n        \"execution_coverage_pct\": round(\n            (total_executed \u002F total_available * 100) if total_available else 0, 1\n        ),\n        \"detection_coverage_pct\": round(\n            (total_detected \u002F total_executed * 100) if total_executed else 0, 1\n        ),\n    }\n\n    # Per-tactic analysis\n    for tactic, technique_ids in TACTIC_TECHNIQUE_MAP.items():\n        tactic_data = {\n            \"techniques_available\": 0,\n            \"techniques_executed\": 0,\n            \"techniques_detected\": 0,\n            \"gaps\": [],\n        }\n\n        for tech_id in technique_ids:\n            if tech_id in atomics_inventory:\n                tactic_data[\"techniques_available\"] += 1\n\n                executed = tech_id in execution_logs\n                detected = detection_results.get(tech_id, {}).get(\"detected\", False)\n\n                if executed:\n                    tactic_data[\"techniques_executed\"] += 1\n                if detected:\n                    tactic_data[\"techniques_detected\"] += 1\n\n                if executed and not detected:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"BLIND_SPOT\",\n                        \"detail\": \"Test executed but no detection triggered\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n                    report[\"gaps\"].append(gap)\n                elif not executed and tech_id in atomics_inventory:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"NOT_TESTED\",\n                        \"detail\": \"Atomic test available but not yet executed\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n\n        avail = tactic_data[\"techniques_available\"]\n        tactic_data[\"coverage_pct\"] = round(\n            (tactic_data[\"techniques_detected\"] \u002F avail * 100) if avail else 0, 1\n        )\n        report[\"tactics\"][tactic] = tactic_data\n\n    # Generate prioritized recommendations\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        report[\"recommendations\"].append({\n            \"priority\": \"CRITICAL\",\n            \"action\": f\"Write detection rules for {len(blind_spots)} blind spot techniques\",\n            \"techniques\": [g[\"technique_id\"] for g in blind_spots],\n        })\n\n    low_coverage_tactics = [\n        t for t, d in report[\"tactics\"].items() if d[\"coverage_pct\"] \u003C 30\n    ]\n    if low_coverage_tactics:\n        report[\"recommendations\"].append({\n            \"priority\": \"HIGH\",\n            \"action\": f\"Expand testing in low-coverage tactics: {', '.join(low_coverage_tactics)}\",\n            \"detail\": \"These tactics have less than 30% detection coverage\",\n        })\n\n    return report\n\n\ndef generate_navigator_layer(atomics_inventory, execution_logs, detection_results,\n                             layer_name=\"Purple Team Coverage\"):\n    \"\"\"Generate ATT&CK Navigator layer JSON for heatmap visualization.\"\"\"\n    layer = {\n        \"name\": layer_name,\n        \"versions\": {\n            \"attack\": \"15\",\n            \"navigator\": \"5.1\",\n            \"layer\": \"4.5\",\n        },\n        \"domain\": \"enterprise-attack\",\n        \"description\": f\"Purple team atomic testing coverage - Generated {datetime.utcnow().isoformat()}Z\",\n        \"filters\": {\"platforms\": [\"Windows\", \"Linux\", \"macOS\"]},\n        \"sorting\": 0,\n        \"layout\": {\n            \"layout\": \"side\",\n            \"aggregateFunction\": \"average\",\n            \"showID\": True,\n            \"showName\": True,\n        },\n        \"hideDisabled\": False,\n        \"techniques\": [],\n        \"gradient\": {\n            \"colors\": [\"#ff6666\", \"#ffeb3b\", \"#66bb6a\"],\n            \"minValue\": 0,\n            \"maxValue\": 100,\n        },\n        \"legendItems\": [\n            {\"label\": \"No Coverage (Blind Spot)\", \"color\": \"#ff6666\"},\n            {\"label\": \"Logged Only (Partial)\", \"color\": \"#ffeb3b\"},\n            {\"label\": \"Alert\u002FDetection Active\", \"color\": \"#66bb6a\"},\n            {\"label\": \"Not Tested\", \"color\": \"#d3d3d3\"},\n        ],\n        \"metadata\": [],\n        \"links\": [],\n        \"showTacticRowBackground\": True,\n        \"tacticRowBackground\": \"#dddddd\",\n        \"selectTechniquesAcrossTactics\": True,\n        \"selectSubtechniquesWithParent\": False,\n    }\n\n    for tech_id, tech_data in atomics_inventory.items():\n        executed = tech_id in execution_logs\n        detection = detection_results.get(tech_id, {})\n        detected = detection.get(\"detected\", False)\n        confidence = detection.get(\"confidence\", \"none\")\n\n        if detected and confidence in (\"high\", \"medium\"):\n            score = 100\n            color = \"#66bb6a\"  # Green - high confidence detection\n            comment = f\"DETECTED - {detection.get('rule_name', 'Alert active')}\"\n        elif detected:\n            score = 50\n            color = \"#ffeb3b\"  # Yellow - logged\u002Fpartial\n            comment = \"PARTIAL - Detection exists but low confidence\"\n        elif executed:\n            score = 0\n            color = \"#ff6666\"  # Red - blind spot\n            comment = \"BLIND SPOT - Test executed, no detection\"\n        else:\n            score = 0\n            color = \"#d3d3d3\"  # Gray - not tested\n            comment = f\"NOT TESTED - {tech_data['test_count']} atomic tests available\"\n\n        technique_entry = {\n            \"techniqueID\": tech_id,\n            \"tactic\": \"\",\n            \"color\": color,\n            \"comment\": comment,\n            \"score\": score,\n            \"enabled\": True,\n            \"metadata\": [\n                {\"name\": \"tests_available\", \"value\": str(tech_data[\"test_count\"])},\n                {\"name\": \"executed\", \"value\": str(executed)},\n                {\"name\": \"detected\", \"value\": str(detected)},\n            ],\n            \"links\": [],\n            \"showSubtechniques\": False,\n        }\n        layer[\"techniques\"].append(technique_entry)\n\n    return layer\n\n\ndef print_coverage_report(report):\n    \"\"\"Print formatted coverage report to console.\"\"\"\n    print(\"=\" * 72)\n    print(\"PURPLE TEAM ATOMIC TESTING - COVERAGE GAP ANALYSIS\")\n    print(\"=\" * 72)\n    print(f\"Generated: {report['generated_at']}\")\n    print()\n\n    s = report[\"summary\"]\n    print(\"EXECUTIVE SUMMARY\")\n    print(\"-\" * 40)\n    print(f\"  Techniques with atomics:  {s['total_techniques_with_atomics']}\")\n    print(f\"  Techniques executed:      {s['total_techniques_executed']}\")\n    print(f\"  Techniques detected:      {s['total_techniques_detected']}\")\n    print(f\"  Execution coverage:       {s['execution_coverage_pct']}%\")\n    print(f\"  Detection coverage:       {s['detection_coverage_pct']}%\")\n    print()\n\n    print(\"PER-TACTIC COVERAGE\")\n    print(\"-\" * 72)\n    print(f\"{'Tactic':\u003C25} {'Available':>9} {'Executed':>9} {'Detected':>9} {'Coverage':>9}\")\n    print(\"-\" * 72)\n    for tactic in TACTIC_ORDER:\n        if tactic in report[\"tactics\"]:\n            t = report[\"tactics\"][tactic]\n            bar = \"#\" * int(t[\"coverage_pct\"] \u002F 5) + \".\" * (20 - int(t[\"coverage_pct\"] \u002F 5))\n            print(\n                f\"  {tactic:\u003C23} {t['techniques_available']:>9} \"\n                f\"{t['techniques_executed']:>9} {t['techniques_detected']:>9} \"\n                f\"{t['coverage_pct']:>8.1f}%\"\n            )\n    print()\n\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        print(\"CRITICAL BLIND SPOTS (executed but not detected)\")\n        print(\"-\" * 72)\n        for gap in blind_spots:\n            print(f\"  [!] {gap['technique_id']} - {gap['technique_name']}\")\n            print(f\"      Tactic: {gap['tactic']}\")\n        print()\n\n    if report[\"recommendations\"]:\n        print(\"RECOMMENDATIONS\")\n        print(\"-\" * 72)\n        for rec in report[\"recommendations\"]:\n            print(f\"  [{rec['priority']}] {rec['action']}\")\n            if \"techniques\" in rec:\n                print(f\"         Techniques: {', '.join(rec['techniques'][:10])}\")\n            if \"detail\" in rec:\n                print(f\"         {rec['detail']}\")\n        print()\n\n\nif __name__ == \"__main__\":\n    import argparse\n\n    parser = argparse.ArgumentParser(description=\"ATT&CK coverage gap analysis for purple team testing\")\n    parser.add_argument(\"--atomics-path\", default=r\"C:\\AtomicRedTeam\\atomics\",\n                        help=\"Path to Atomic Red Team atomics directory\")\n    parser.add_argument(\"--log-dir\", default=r\"C:\\AtomicRedTeam\\logs\",\n                        help=\"Path to atomic test execution logs\")\n    parser.add_argument(\"--detections-file\", default=\"detection_results.json\",\n                        help=\"Path to SIEM detection validation export (JSON)\")\n    parser.add_argument(\"--output-layer\", default=\"navigator_layer.json\",\n                        help=\"Output path for ATT&CK Navigator layer JSON\")\n    parser.add_argument(\"--output-report\", default=\"coverage_report.json\",\n                        help=\"Output path for coverage report JSON\")\n    args = parser.parse_args()\n\n    print(\"[*] Loading atomics inventory...\")\n    inventory = load_atomics_inventory(args.atomics_path)\n    print(f\"    Found {len(inventory)} techniques with atomic tests\")\n\n    print(\"[*] Loading execution logs...\")\n    exec_logs = load_execution_logs(args.log_dir)\n    print(f\"    Found logs for {len(exec_logs)} techniques\")\n\n    print(\"[*] Loading detection results...\")\n    det_results = load_detection_results(args.detections_file)\n    print(f\"    Found detection data for {len(det_results)} techniques\")\n\n    print(\"[*] Generating coverage report...\")\n    report = generate_coverage_report(inventory, exec_logs, det_results)\n    print_coverage_report(report)\n\n    # Save report JSON\n    with open(args.output_report, \"w\") as f:\n        json.dump(report, f, indent=2)\n    print(f\"[+] Report saved to {args.output_report}\")\n\n    # Generate and save Navigator layer\n    print(\"[*] Generating ATT&CK Navigator layer...\")\n    layer = generate_navigator_layer(inventory, exec_logs, det_results)\n    with open(args.output_layer, \"w\") as f:\n        json.dump(layer, f, indent=2)\n    print(f\"[+] Navigator layer saved to {args.output_layer}\")\n    print(f\"    Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\")\n```\n\n### Step 6: Run Continuous Atomic Testing Pipeline\n\nSchedule recurring tests against priority techniques:\n\n```powershell\n# Continuous Atomic Testing - scheduled execution with validation\n# Run as a scheduled task or via CI\u002FCD pipeline\n\n$PriorityTechniques = @(\n    # Top MITRE ATT&CK techniques by prevalence (Red Canary Threat Detection Report)\n    @{ Id = \"T1059.001\"; Name = \"PowerShell\" },\n    @{ Id = \"T1059.003\"; Name = \"Windows Command Shell\" },\n    @{ Id = \"T1547.001\"; Name = \"Registry Run Keys\" },\n    @{ Id = \"T1053.005\"; Name = \"Scheduled Task\" },\n    @{ Id = \"T1003.001\"; Name = \"LSASS Memory\" },\n    @{ Id = \"T1003.003\"; Name = \"NTDS\" },\n    @{ Id = \"T1070.004\"; Name = \"File Deletion\" },\n    @{ Id = \"T1218.011\"; Name = \"Rundll32\" },\n    @{ Id = \"T1082\";     Name = \"System Information Discovery\" },\n    @{ Id = \"T1105\";     Name = \"Ingress Tool Transfer\" }\n)\n\n$ResultsLog = @()\n$RunTimestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n\nforeach ($technique in $PriorityTechniques) {\n    Write-Host \"`n[*] Testing $($technique.Id) - $($technique.Name)\" -ForegroundColor Cyan\n\n    # Check prerequisites\n    try {\n        $prereqs = Invoke-AtomicTest $technique.Id -TestNumbers 1 -CheckPrereqs 2>&1\n        $prereqsMet = $prereqs -notmatch \"not met\"\n    } catch {\n        $prereqsMet = $false\n    }\n\n    if (-not $prereqsMet) {\n        Write-Host \"    [!] Prerequisites not met, attempting install...\" -ForegroundColor Yellow\n        try {\n            Invoke-AtomicTest $technique.Id -TestNumbers 1 -GetPrereqs 2>&1 | Out-Null\n        } catch {\n            Write-Host \"    [!] Prereq install failed, skipping\" -ForegroundColor Red\n            $ResultsLog += [PSCustomObject]@{\n                TechniqueId = $technique.Id\n                Name        = $technique.Name\n                Status      = \"PREREQS_FAILED\"\n                Timestamp   = (Get-Date).ToString(\"o\")\n            }\n            continue\n        }\n    }\n\n    # Execute the test\n    try {\n        $startTime = Get-Date\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Confirm:$false\n        $endTime = Get-Date\n        $duration = ($endTime - $startTime).TotalSeconds\n\n        Write-Host \"    [+] Executed successfully (${duration}s)\" -ForegroundColor Green\n\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"EXECUTED\"\n            Duration    = $duration\n            Timestamp   = $startTime.ToString(\"o\")\n        }\n    } catch {\n        Write-Host \"    [-] Execution failed: $($_.Exception.Message)\" -ForegroundColor Red\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"FAILED\"\n            Error       = $_.Exception.Message\n            Timestamp   = (Get-Date).ToString(\"o\")\n        }\n    }\n\n    # Cleanup\n    try {\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Cleanup 2>&1 | Out-Null\n        Write-Host \"    [+] Cleanup completed\" -ForegroundColor DarkGray\n    } catch {\n        Write-Host \"    [!] Cleanup failed\" -ForegroundColor Yellow\n    }\n\n    # Brief pause between tests for log ingestion\n    Start-Sleep -Seconds 10\n}\n\n# Export results\n$ResultsLog | Export-Csv \"C:\\AtomicRedTeam\\logs\\continuous_test_$RunTimestamp.csv\" -NoTypeInformation\n$ResultsLog | Format-Table -AutoSize\n\n# Summary\n$executed = ($ResultsLog | Where-Object Status -eq \"EXECUTED\").Count\n$failed = ($ResultsLog | Where-Object Status -ne \"EXECUTED\").Count\nWrite-Host \"`n=== CONTINUOUS TEST SUMMARY ===\" -ForegroundColor Cyan\nWrite-Host \"  Executed: $executed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Green\nWrite-Host \"  Failed:   $failed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Red\n```\n\n### Step 7: Detection Validation Loop\n\nClose the purple team loop by correlating tests with detections and iterating:\n\n```\nDetection Validation Loop Workflow:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n  ┌──────────────────┐\n  │ 1. SELECT        │  Choose technique from threat intel or gap report\n  │    TECHNIQUE     │  Map to Atomic Red Team test ID\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 2. EXECUTE       │  Run Invoke-AtomicTest with logging\n  │    ATOMIC TEST   │  Record timestamp, hostname, test details\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 3. WAIT FOR      │  Allow 30-60 seconds for log ingestion\n  │    INGESTION     │  Ensure Sysmon, WinEventLog, EDR agents forward data\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 4. QUERY SIEM    │  Search for correlated alerts matching technique\n  │    FOR ALERTS    │  Check: Did our detection rules fire?\n  └───────┬──────────┘\n          │\n     ┌────┴────┐\n     │DETECTED?│\n     └────┬────┘\n    YES   │   NO\n  ┌───────▼──────────┐   ┌──────────────────┐\n  │ 5a. MARK GREEN   │   │ 5b. WRITE NEW    │\n  │  Update Navigator│   │  Sigma\u002FSIEM Rule │\n  │  layer, log pass │   │  for technique   │\n  └───────┬──────────┘   └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5c. DEPLOY RULE  │\n          │               │  Push to SIEM    │\n          │               └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5d. RE-EXECUTE   │\n          │               │  Re-run atomic   │\n          │               │  test, validate  │\n          │               └───────┬──────────┘\n          │                       │\n  ┌───────▼───────────────────────▼──┐\n  │ 6. CLEANUP                       │\n  │    Run Invoke-AtomicTest -Cleanup│\n  │    Document results              │\n  └───────┬──────────────────────────┘\n          │\n  ┌───────▼──────────┐\n  │ 7. NEXT          │  Select next technique\n  │    TECHNIQUE     │  Repeat from step 1\n  └──────────────────┘\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Atomic Red Team** | Open-source library by Red Canary containing small, focused tests mapped to MITRE ATT&CK techniques for validating detection capabilities |\n| **Invoke-AtomicRedTeam** | PowerShell execution framework for running atomic tests locally or remotely, with prereq checking and cleanup |\n| **ATT&CK Navigator** | Web-based tool for annotating and visualizing MITRE ATT&CK matrices as layered heatmaps showing detection coverage |\n| **Navigator Layer** | JSON file defining colors, scores, and comments for each ATT&CK technique; used to generate coverage heatmaps |\n| **Detection Validation Loop** | Iterative purple team process: execute attack, check for detection, write\u002Ftune rule if missed, re-execute to confirm |\n| **Coverage Gap** | ATT&CK technique where no detection rule exists or where the rule fails to fire when the technique is executed |\n| **Blind Spot** | Technique that was tested via atomic execution but produced zero SIEM alerts, indicating a critical detection failure |\n| **Sigma Rule** | Vendor-agnostic detection rule format that can be converted to Splunk SPL, Elastic KQL, Microsoft KQL, and other SIEM queries |\n| **Purple Team** | Collaborative security exercise where red team executes known techniques and blue team validates and improves detections in real time |\n| **Continuous Atomic Testing** | Scheduled, automated execution of atomic tests to validate that detection rules remain functional as environments change |\n\n## Tools & Systems\n\n- **Invoke-AtomicRedTeam**: PowerShell module for executing Atomic Red Team tests with prereq management and cleanup\n- **Atomic Red Team Atomics**: Library of 700+ tests across 200+ MITRE ATT&CK techniques, organized by technique ID\n- **ATT&CK Navigator**: Web tool at mitre-attack.github.io\u002Fattack-navigator for creating technique coverage heatmaps\n- **VECTR**: Purple team reporting platform by SCYTHE for tracking test campaigns, results, and coverage over time\n- **Sigma**: Generic signature format for SIEM systems; convert with sigmac or pySigma to target SIEM platforms\n- **Splunk \u002F Elastic \u002F Microsoft Sentinel**: SIEM platforms for querying detection results after atomic test execution\n- **Sysmon**: Windows system monitoring driver providing detailed process, network, registry, and file telemetry\n- **Caldera**: MITRE-developed adversary emulation platform for automated, multi-step attack chains beyond single atomic tests\n\n## Common Scenarios\n\n### Scenario: Validating Credential Access Detections After EDR Deployment\n\n**Context**: The organization deployed a new EDR agent and needs to verify it detects credential dumping techniques (LSASS access, NTDS extraction, SAM dump). The purple team must confirm detections are working before closing the deployment ticket.\n\n**Approach**:\n1. Install Invoke-AtomicRedTeam on a test endpoint enrolled in the new EDR\n2. Execute credential access atomics: T1003.001 (LSASS Memory), T1003.002 (SAM), T1003.003 (NTDS)\n3. Wait 60 seconds, then query EDR console and SIEM for alerts on the test hostname\n4. For each technique: mark as DETECTED (green) or BLIND SPOT (red) in the Navigator layer\n5. For blind spots, create Sigma rules targeting Sysmon EventCode 10 (ProcessAccess to lsass.exe) and EventCode 1 (known dumping tools)\n6. Deploy rules, re-run atomics, confirm detection\n7. Export Navigator layer and coverage report for the deployment ticket\n\n**Pitfalls**:\n- Running credential dumping atomics without local admin privileges (tests will fail silently)\n- Forgetting to enable Sysmon ProcessAccess logging (EventCode 10) which is disabled by default\n- Not running cleanup, leaving test artifacts (created accounts, registry keys, scheduled tasks)\n- Testing only one sub-technique of T1003 and assuming all credential access is covered\n- Not accounting for EDR agent exclusions that may whitelist PowerShell or the AtomicRedTeam directory\n\n### Scenario: Building Monthly ATT&CK Coverage Reporting for Leadership\n\n**Context**: The CISO requires monthly metrics on detection coverage mapped to MITRE ATT&CK. The security team needs to run recurring tests, track improvements, and produce a visual heatmap showing coverage growth over time.\n\n**Approach**:\n1. Define a test plan covering the top 50 ATT&CK techniques from Red Canary Threat Detection Report\n2. Schedule continuous atomic testing via Windows Task Scheduler running the PowerShell pipeline weekly\n3. Export execution logs and SIEM detection query results to JSON after each run\n4. Run the Python gap analysis script to produce Navigator layer and coverage report\n5. Import the Navigator layer into ATT&CK Navigator, screenshot for executive slide deck\n6. Track month-over-month: number of green (detected) vs. red (blind spot) techniques\n7. Prioritize detection engineering sprints on the highest-impact blind spots\n\n**Pitfalls**:\n- Counting \"logged\" as \"detected\" (seeing an event in logs is not the same as having an alert rule)\n- Not updating the atomics repository (new tests are added frequently)\n- Focusing only on technique count rather than detection quality (a noisy rule with 90% false positives is worse than no rule)\n- Not involving the SOC analysts who will triage the alerts in the validation process\n\n## Output Format\n\n```\nPURPLE TEAM ATOMIC TESTING REPORT\n====================================\nCampaign:         Q1 2026 Detection Validation\nDate Range:       2026-01-15 to 2026-03-15\nTest Environment: YOURLAB-WIN10-01, YOURLAB-SRV-01\nSIEM:             Splunk Enterprise 9.x\n\nEXECUTION SUMMARY\nTechniques Tested:        47 \u002F 200+ available\nIndividual Tests Run:     112\nTests Succeeded:          104\nTests Failed (prereqs):   8\nCleanup Completed:        104 \u002F 104\n\nDETECTION COVERAGE\n                            Tested    Detected    Coverage\nExecution:                     12          10       83.3%\nPersistence:                    8           5       62.5%\nCredential Access:              6           4       66.7%\nDefense Evasion:               10           3       30.0%\nDiscovery:                      5           5      100.0%\nLateral Movement:               3           1       33.3%\nCommand and Control:            2           1       50.0%\nExfiltration:                   1           0        0.0%\n\nCRITICAL BLIND SPOTS\n[!] T1218.011 - Rundll32          (defense-evasion)\n[!] T1218.005 - Mshta             (defense-evasion)\n[!] T1070.004 - File Deletion     (defense-evasion)\n[!] T1574.001 - DLL Search Order  (persistence)\n[!] T1021.002 - SMB\u002FAdmin Shares  (lateral-movement)\n[!] T1048.003 - Exfil Over HTTP   (exfiltration)\n\nNAVIGATOR LAYER: coverage_layer_20260315.json\n  Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\n\nRECOMMENDATIONS\n[CRITICAL] Write Sigma rules for 6 blind spot techniques\n[HIGH]     Expand defense-evasion testing (30% coverage)\n[HIGH]     Enable exfiltration monitoring data sources\n[MEDIUM]   Increase lateral movement test coverage (3 of 7 tested)\n```\n",{"name":5,"tags":25,"author":31,"domain":32,"license":15,"version":33,"nist_csf":34,"subdomain":26,"description":38,"nist_ai_rmf":39,"mitre_attack":43,"atlas_techniques":47,"d3fend_techniques":51},[26,27,28,29,30],"purple-team","atomic-red-team","mitre-attack","detection-engineering","adversary-emulation","mukul975","cybersecurity","1.0.0",[35,36,37],"ID.RA-01","DE.AE-07","GV.OV-02","Executes Atomic Red Team tests mapped to MITRE ATT&CK via Invoke-AtomicRedTeam PowerShell, generates ATT&CK Navigator coverage heatmaps, correlates results against Sigma rules, and runs detection validation loops to measure blue team visibility. Use for purple team exercises, atomic test execution, ATT&CK coverage assessment, or detection engineering validation.\n",[40,41,42],"MEASURE-2.7","MAP-5.1","MANAGE-2.4",[44,45,46],"T1078","T1190","T1059",[48,49,50],"AML.T0070","AML.T0066","AML.T0082",[52,53,54,55,56],"Executable Denylisting","Execution Isolation","File Metadata Consistency Validation","Content Format Conversion","File Content Analysis","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fperforming-purple-team-atomic-testing","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add NeelakshSaxena\u002FVayu --skill performing-purple-team-atomic-testing",{"tool":70,"command":71},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill performing-purple-team-atomic-testing",{"tool":73,"command":74},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill performing-purple-team-atomic-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FSKILL.md",true,[78,82,88],{"path":79,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fapi-reference.md","REFERENCE","参考文档",8255,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002Freferences\u002Fapi-reference.md",{"path":89,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":92,"sourceHtmlUrl":93},"scripts\u002Fagent.py","SCRIPT","脚本",32727,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002Fscripts\u002Fagent.py",[95,102,109,116,123,130],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]