[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AG0FAEV621XFS6NAYWNJBY":3,"skill-same:01M6AG0FAEV621XFS6NAYWNJBY":122},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":81,"commitSha":82,"skillDirectory":83,"forksCount":84,"repositoryHtmlUrl":85,"repositoryHomepageUrl":86,"ownerHtmlUrl":87,"ownerBlogUrl":88,"ownerDescription":89,"updatedAt":90,"install":91,"resources":104},"01M6AG0FAEV621XFS6NAYWNJBY","performing-purple-team-atomic-testing","紫队原子测试执行","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.","通过 Invoke-AtomicRedTeam PowerShell 执行映射到 MITRE ATT&CK 的 Atomic Red Team 测试，生成 ATT&CK Navigator 覆盖热力图，将结果与 Sigma 规则关联分析，并运行检测验证循环以衡量蓝队的可见性。适用于紫队演练、原子测试执行、ATT&CK 覆盖度评估或检测工程验证。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSJ8FPTACYEEYRWQRNFXKY","安全检测工程","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"performing purple team atomic testing","testing","adversary-emulation","atomic-red-team","analysis","t1059","execution","t1078","blue team","ATT&CK","purple-team","sigma","detection-engineering","powershell","navigator","mitre-attack","red team","red-team","assessment","cybersecurity","2026-11-10 10:12:30",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":56,"author":10,"domain":50,"license":16,"version":57,"nist_csf":58,"subdomain":41,"description":62,"nist_ai_rmf":63,"mitre_attack":67,"atlas_techniques":71,"d3fend_techniques":75},[41,34,46,43,33],"1.0.0",[59,60,61],"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",[64,65,66],"MEASURE-2.7","MAP-5.1","MANAGE-2.4",[68,69,70],"T1078","T1190","T1059",[72,73,74],"AML.T0070","AML.T0066","AML.T0082",[76,77,78,79,80],"Executable Denylisting","Execution Isolation","File Metadata Consistency Validation","Content Format Conversion","File Content Analysis","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fperforming-purple-team-atomic-testing",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":92,"prompt":102,"zipAvailable":103},[93,96,99],{"tool":94,"command":95},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-purple-team-atomic-testing",{"tool":97,"command":98},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-purple-team-atomic-testing",{"tool":100,"command":101},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-purple-team-atomic-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FSKILL.md",true,[105,110,116],{"path":106,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":109},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FLICENSE",{"path":111,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Fapi-reference.md","REFERENCE","参考文档",8255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002Freferences\u002Fapi-reference.md",{"path":117,"resourceType":118,"resourceTypeDesc":119,"sizeBytes":120,"sourceHtmlUrl":121},"scripts\u002Fagent.py","SCRIPT","脚本",32727,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002Fscripts\u002Fagent.py",[123,155,184,214,245,277],{"skillNo":124,"name":125,"nameZh":126,"description":127,"descriptionZh":128,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":129,"categories":130,"keywords":135,"publishedAt":51},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[131,132],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":133,"categoryName":134,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[136,137,138,139,140,50,141,142,143,144,145,146,147,148,149,150,151,152,153,154],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","pr","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":156,"name":157,"nameZh":158,"description":159,"descriptionZh":160,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":161,"categories":162,"keywords":167,"publishedAt":51},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[163,164],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":165,"categoryName":166,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[168,151,169,170,140,171,50,143,172,173,174,175,176,177,178,179,180,181,182,183],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":185,"name":186,"nameZh":187,"description":188,"descriptionZh":189,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":190,"categories":191,"keywords":198,"publishedAt":51},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[192,195],{"categoryNo":193,"categoryName":194,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":196,"categoryName":197,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[178,199,200,201,32,50,202,203,172,204,205,206,207,208,209,38,210,211,212,213],"backup","recovery","validating backup integrity for recovery","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":215,"name":216,"nameZh":217,"description":218,"descriptionZh":219,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":220,"categories":221,"keywords":226,"publishedAt":51},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[222,223],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":224,"categoryName":225,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[227,228,229,50,230,231,232,233,234,235,236,237,238,239,240,241,175,242,243,244],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":246,"name":247,"nameZh":248,"description":249,"descriptionZh":250,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":251,"categories":252,"keywords":257,"publishedAt":51},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[253,256],{"categoryNo":254,"categoryName":255,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[258,259,260,50,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":278,"name":279,"nameZh":280,"description":281,"descriptionZh":282,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":283,"categories":284,"keywords":289,"publishedAt":51},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[285,286],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":287,"categoryName":288,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎",[140,290,50,291,292,293,294,295,296,297,298,38,37,210,35,299,300,301,302,303],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]