[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B8WAKEF99P3VP3BHDBFQYY":3,"skill-same:01M7B8WAKEF99P3VP3BHDBFQYY":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":13,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":61,"install":62,"resources":75},"01M7B8WAKEF99P3VP3BHDBFQYY","performing-purple-team-atomic-testing",null,"Executes Atomic Red Team tests mapped to MITRE ATT&CK via Invoke-AtomicRedTeam PowerShell, generates ATT&CK Navigator coverage heatmaps, correlates results against Sigma rules, and runs detection validation loops to measure blue team visibility. Use for purple team exercises, atomic test execution, ATT&CK coverage assessment, or detection engineering validation.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-purple-team-atomic-testing\ndescription: 'Executes Atomic Red Team tests mapped to MITRE ATT&CK via Invoke-AtomicRedTeam\n  PowerShell, generates ATT&CK Navigator coverage heatmaps, correlates results against\n  Sigma rules, and runs detection validation loops to measure blue team visibility.\n  Use for purple team exercises, atomic test execution, ATT&CK coverage assessment,\n  or detection engineering validation.\n\n  '\ndomain: cybersecurity\nsubdomain: purple-team\ntags:\n- purple-team\n- atomic-red-team\n- mitre-attack\n- detection-engineering\n- adversary-emulation\nversion: 1.0.0\nauthor: mukul975\nlicense: Apache-2.0\nnist_ai_rmf:\n- MEASURE-2.7\n- MAP-5.1\n- MANAGE-2.4\natlas_techniques:\n- AML.T0070\n- AML.T0066\n- AML.T0082\nd3fend_techniques:\n- Executable Denylisting\n- Execution Isolation\n- File Metadata Consistency Validation\n- Content Format Conversion\n- File Content Analysis\nnist_csf:\n- ID.RA-01\n- DE.AE-07\n- GV.OV-02\nmitre_attack:\n- T1078\n- T1190\n- T1059\n---\n\n# Performing Purple Team Atomic Testing\n\n## When to Use\n\n- Validating detection coverage against specific MITRE ATT&CK techniques\n- Running purple team exercises using Atomic Red Team test library\n- Performing ATT&CK coverage gap analysis to identify blind spots in SIEM\u002FEDR\n- Building a detection validation loop: execute atomic test, check SIEM, tune rule, retest\n- Generating ATT&CK Navigator heatmap layers for executive reporting\n- Automating continuous atomic testing in CI\u002FCD or scheduled pipelines\n- Mapping threat intelligence reports to executable atomic tests\n\n**Do not use** for full-scope red team engagements requiring custom implants or live adversary simulation beyond atomic tests; use Caldera, SCYTHE, or Cobalt Strike for advanced adversary emulation.\n\n**DISCLAIMER**: Atomic Red Team tests execute real attack techniques. Run only on systems you own or have explicit written authorization to test. Many tests modify system state, create artifacts, or trigger security alerts. Always execute cleanup commands after testing. Never run atomic tests in production without risk acceptance from stakeholders.\n\n## Prerequisites\n\n- Windows host with PowerShell 5.1+ or PowerShell Core 7+ (Linux\u002FmacOS supported for cross-platform atomics)\n- Invoke-AtomicRedTeam PowerShell module installed from PSGallery\n- Atomic Red Team atomics repository cloned locally\n- SIEM\u002FEDR with log ingestion from test endpoints (Splunk, Elastic, Microsoft Sentinel, CrowdStrike)\n- MITRE ATT&CK Navigator (web-based or local instance) for layer visualization\n- Python 3.9+ with `mitreattack-python`, `pyyaml`, and `requests` for automation scripts\n- Sigma rules repository for detection correlation\n- Administrative\u002Froot access on test endpoints\n- Isolated test environment (lab, sandbox, or dedicated test range)\n\n## Workflow\n\n### Step 1: Install and Configure Invoke-AtomicRedTeam\n\nSet up the execution framework and download the atomics library:\n\n```powershell\n# Install the PowerShell execution module\nInstall-Module -Name invoke-atomicredteam -Scope CurrentUser -Force\nInstall-Module -Name powershell-yaml -Scope CurrentUser -Force\n\n# Import the module\nImport-Module invoke-atomicredteam\n\n# Install atomics to default location (C:\\AtomicRedTeam\\atomics)\nIEX (IEX (New-Object System.Net.WebClient).DownloadString(\n    'https:\u002F\u002Fraw.githubusercontent.com\u002Fredcanaryco\u002Finvoke-atomicredteam\u002Fmaster\u002Finstall-atomicredteam.ps1'\n)); Install-AtomicRedTeam -getAtomics -Force\n\n# Verify installation - list available techniques\n$atomicsPath = \"C:\\AtomicRedTeam\\atomics\"\n$techniques = Get-ChildItem $atomicsPath -Directory | Where-Object { $_.Name -match '^T\\d{4}' }\nWrite-Host \"Available techniques: $($techniques.Count)\"\n\n# Configure execution logging\n$env:ARTLOG = \"C:\\AtomicRedTeam\\logs\"\nif (-not (Test-Path $env:ARTLOG)) { New-Item -Path $env:ARTLOG -ItemType Directory }\n```\n\n### Step 2: Enumerate and Select Atomic Tests\n\nInventory available tests and select targets based on threat intelligence or gap analysis:\n\n```powershell\n# List all tests for a specific technique\nInvoke-AtomicTest T1059.001 -ShowDetailsBrief\n\n# Show full details including attack commands and cleanup\nInvoke-AtomicTest T1059.001 -ShowDetails\n\n# List tests for a tactic (e.g., Persistence)\n$persistenceTechniques = @(\n    \"T1547.001\",  # Boot or Logon Autostart - Registry Run Keys\n    \"T1053.005\",  # Scheduled Task\n    \"T1136.001\",  # Create Account - Local Account\n    \"T1543.003\",  # Create or Modify System Process - Windows Service\n    \"T1546.001\",  # Event Triggered Execution - Change Default File Association\n    \"T1574.001\",  # Hijack Execution Flow - DLL Search Order Hijacking\n    \"T1197\"       # BITS Jobs\n)\n\nforeach ($tech in $persistenceTechniques) {\n    Write-Host \"`n=== $tech ===\" -ForegroundColor Cyan\n    try {\n        Invoke-AtomicTest $tech -ShowDetailsBrief\n    } catch {\n        Write-Host \"  No tests available\" -ForegroundColor Yellow\n    }\n}\n\n# Get all atomic techniques from YAML files programmatically\n$allAtomics = Get-ChildItem \"$atomicsPath\\T*\\T*.yaml\" -Recurse |\n    ForEach-Object {\n        $yaml = Get-Content $_.FullName -Raw | ConvertFrom-Yaml\n        [PSCustomObject]@{\n            TechniqueId   = $yaml.attack_technique\n            TechniqueName = $yaml.display_name\n            TestCount     = $yaml.atomic_tests.Count\n            Platforms     = ($yaml.atomic_tests.supported_platforms | Sort-Object -Unique) -join \", \"\n        }\n    }\n\n$allAtomics | Sort-Object TechniqueId | Format-Table -AutoSize\nWrite-Host \"Total techniques with tests: $($allAtomics.Count)\"\nWrite-Host \"Total individual tests: $(($allAtomics | Measure-Object -Property TestCount -Sum).Sum)\"\n```\n\n### Step 3: Execute Atomic Tests with Logging\n\nRun tests with pre\u002Fpost logging for detection validation:\n\n```powershell\n# Execute a single test by technique ID (runs all tests for that technique)\nInvoke-AtomicTest T1059.001\n\n# Execute a specific test by number\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute by test name\nInvoke-AtomicTest T1059.001 -TestNames \"Mimikatz - Cradled Invoke Expression\"\n\n# Execute by GUID\nInvoke-AtomicTest T1059.001 -TestGuids \"2e803f96-4e33-4c2c-b0c8-1c10cbb3945f\"\n\n# Execute with prerequisite check and installation\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -CheckPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -GetPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute with timeout (seconds)\nInvoke-AtomicTest T1003.001 -TimeoutSeconds 120\n\n# Cleanup after testing\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup\n\n# Execute with full logging wrapper\nfunction Invoke-AtomicWithLogging {\n    param(\n        [string]$TechniqueId,\n        [int[]]$TestNumbers,\n        [string]$LogPath = \"C:\\AtomicRedTeam\\logs\"\n    )\n\n    $timestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n    $logFile = Join-Path $LogPath \"${TechniqueId}_${timestamp}.json\"\n\n    $result = @{\n        technique_id  = $TechniqueId\n        test_numbers  = $TestNumbers\n        start_time    = (Get-Date).ToString(\"o\")\n        hostname      = $env:COMPUTERNAME\n        username      = $env:USERNAME\n        results       = @()\n    }\n\n    foreach ($testNum in $TestNumbers) {\n        $testResult = @{\n            test_number = $testNum\n            status      = \"unknown\"\n            start_time  = (Get-Date).ToString(\"o\")\n        }\n\n        try {\n            # Show what will execute\n            $details = Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -ShowDetails 2>&1\n            $testResult[\"details\"] = $details | Out-String\n\n            # Execute the test\n            Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -Confirm:$false\n            $testResult[\"status\"] = \"executed\"\n        } catch {\n            $testResult[\"status\"] = \"failed\"\n            $testResult[\"error\"] = $_.Exception.Message\n        }\n\n        $testResult[\"end_time\"] = (Get-Date).ToString(\"o\")\n        $result.results += $testResult\n\n        # Wait for SIEM ingestion\n        Start-Sleep -Seconds 30\n    }\n\n    $result[\"end_time\"] = (Get-Date).ToString(\"o\")\n    $result | ConvertTo-Json -Depth 10 | Set-Content $logFile\n    Write-Host \"Log written to: $logFile\" -ForegroundColor Green\n    return $result\n}\n\n# Usage\nInvoke-AtomicWithLogging -TechniqueId \"T1059.001\" -TestNumbers @(1, 2, 3)\n```\n\n### Step 4: Validate Detections in SIEM\n\nQuery your SIEM to confirm whether atomic tests generated alerts:\n\n```\nSplunk SPL Queries for Detection Validation:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n-- T1059.001: PowerShell Execution\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-PowerShell\u002FOperational\"\n  EventCode=4104\n  | eval script_block=ScriptBlockText\n  | where len(script_block) > 500\n  | stats count by host, script_block\n  | sort -count\n\n-- T1003.001: LSASS Memory Credential Dumping\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4663\n  ObjectName=\"*lsass*\"\n  | stats count by host, SubjectUserName, ProcessName\n  | where count > 0\n\n-- T1547.001: Registry Run Key Persistence\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  EventCode=13\n  TargetObject=\"*\\\\CurrentVersion\\\\Run*\"\n  | stats count by host, Image, TargetObject, Details\n\n-- T1053.005: Scheduled Task Creation\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4698\n  | stats count by host, SubjectUserName, TaskName, TaskContent\n  | sort -count\n\n-- Generic: Hunt for Atomic Red Team artifacts\nindex=windows (sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  OR sourcetype=\"WinEventLog:Security\")\n  | search \"*AtomicRedTeam*\" OR \"*atomic*\" OR \"*Invoke-AtomicTest*\"\n  | stats count by sourcetype, EventCode, host\n```\n\n```\nElastic \u002F KQL Queries:\n━━━━━━━━━━━━━━━━━━━━━\n\n-- PowerShell script block logging\nevent.code: \"4104\" and powershell.file.script_block_text: *\n\n-- Sysmon process creation from AtomicRedTeam paths\nevent.code: \"1\" and process.executable: *AtomicRedTeam*\n\n-- Registry modification (persistence)\nevent.code: \"13\" and registry.path: *CurrentVersion\\\\Run*\n\n-- Credential access indicators\nevent.code: \"10\" and winlog.event_data.TargetImage: *lsass.exe*\n```\n\n### Step 5: ATT&CK Coverage Gap Analysis\n\nGenerate a coverage matrix comparing tested vs. detected techniques:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"ATT&CK coverage gap analysis - compares atomic test results against SIEM detections.\"\"\"\n\nimport json\nimport os\nimport yaml\nfrom pathlib import Path\nfrom datetime import datetime\n\n\ndef load_atomics_inventory(atomics_path):\n    \"\"\"Parse all atomic test YAML files to build technique inventory.\"\"\"\n    inventory = {}\n    atomics_dir = Path(atomics_path)\n\n    for yaml_file in atomics_dir.glob(\"T*\u002FT*.yaml\"):\n        try:\n            with open(yaml_file, \"r\", encoding=\"utf-8\") as f:\n                data = yaml.safe_load(f)\n\n            tech_id = data.get(\"attack_technique\", \"\")\n            if not tech_id:\n                continue\n\n            tests = data.get(\"atomic_tests\", [])\n            inventory[tech_id] = {\n                \"name\": data.get(\"display_name\", \"Unknown\"),\n                \"test_count\": len(tests),\n                \"platforms\": list(set(\n                    p for t in tests\n                    for p in t.get(\"supported_platforms\", [])\n                )),\n                \"tests\": [\n                    {\n                        \"name\": t.get(\"name\", \"Unnamed\"),\n                        \"description\": t.get(\"description\", \"\"),\n                        \"platforms\": t.get(\"supported_platforms\", []),\n                        \"executor\": t.get(\"executor\", {}).get(\"name\", \"unknown\"),\n                    }\n                    for t in tests\n                ],\n            }\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {yaml_file}: {e}\")\n\n    return inventory\n\n\ndef load_execution_logs(log_dir):\n    \"\"\"Load atomic test execution logs.\"\"\"\n    executed = {}\n    log_path = Path(log_dir)\n\n    if not log_path.exists():\n        return executed\n\n    for log_file in log_path.glob(\"T*_*.json\"):\n        try:\n            with open(log_file, \"r\") as f:\n                data = json.load(f)\n            tech_id = data.get(\"technique_id\", \"\")\n            if tech_id:\n                if tech_id not in executed:\n                    executed[tech_id] = {\n                        \"executions\": [],\n                        \"last_executed\": data.get(\"end_time\", \"\"),\n                    }\n                executed[tech_id][\"executions\"].append({\n                    \"timestamp\": data.get(\"start_time\", \"\"),\n                    \"results\": data.get(\"results\", []),\n                })\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {log_file}: {e}\")\n\n    return executed\n\n\ndef load_detection_results(detection_file):\n    \"\"\"Load SIEM detection validation results (JSON export from SIEM queries).\"\"\"\n    if not os.path.exists(detection_file):\n        return {}\n\n    with open(detection_file, \"r\") as f:\n        data = json.load(f)\n\n    detections = {}\n    for entry in data:\n        tech_id = entry.get(\"technique_id\", \"\")\n        if tech_id:\n            detections[tech_id] = {\n                \"detected\": entry.get(\"detected\", False),\n                \"alert_count\": entry.get(\"alert_count\", 0),\n                \"rule_name\": entry.get(\"rule_name\", \"\"),\n                \"confidence\": entry.get(\"confidence\", \"unknown\"),\n                \"data_sources\": entry.get(\"data_sources\", []),\n            }\n\n    return detections\n\n\n# MITRE ATT&CK tactic ordering for structured output\nTACTIC_ORDER = [\n    \"reconnaissance\", \"resource-development\", \"initial-access\",\n    \"execution\", \"persistence\", \"privilege-escalation\",\n    \"defense-evasion\", \"credential-access\", \"discovery\",\n    \"lateral-movement\", \"collection\", \"command-and-control\",\n    \"exfiltration\", \"impact\",\n]\n\n# Tactic-to-technique mapping for common techniques (subset for illustration)\nTACTIC_TECHNIQUE_MAP = {\n    \"execution\": [\n        \"T1059\", \"T1059.001\", \"T1059.003\", \"T1059.004\", \"T1059.005\",\n        \"T1059.006\", \"T1059.007\", \"T1047\", \"T1053\", \"T1053.005\",\n        \"T1129\", \"T1203\", \"T1569\", \"T1569.002\",\n    ],\n    \"persistence\": [\n        \"T1547\", \"T1547.001\", \"T1547.004\", \"T1547.009\",\n        \"T1053.005\", \"T1136\", \"T1136.001\", \"T1543\", \"T1543.003\",\n        \"T1546\", \"T1546.001\", \"T1546.003\", \"T1574\", \"T1574.001\",\n        \"T1197\", \"T1505\", \"T1505.003\",\n    ],\n    \"credential-access\": [\n        \"T1003\", \"T1003.001\", \"T1003.002\", \"T1003.003\",\n        \"T1003.004\", \"T1003.005\", \"T1003.006\",\n        \"T1110\", \"T1110.001\", \"T1110.003\",\n        \"T1555\", \"T1555.003\", \"T1552\", \"T1552.001\",\n        \"T1558\", \"T1558.003\",\n    ],\n    \"defense-evasion\": [\n        \"T1070\", \"T1070.001\", \"T1070.004\",\n        \"T1218\", \"T1218.001\", \"T1218.003\", \"T1218.005\",\n        \"T1218.010\", \"T1218.011\",\n        \"T1027\", \"T1140\", \"T1562\", \"T1562.001\",\n        \"T1036\", \"T1036.005\",\n    ],\n    \"discovery\": [\n        \"T1082\", \"T1083\", \"T1087\", \"T1087.001\", \"T1087.002\",\n        \"T1016\", \"T1049\", \"T1057\", \"T1069\", \"T1069.001\",\n        \"T1069.002\", \"T1518\", \"T1518.001\",\n    ],\n    \"lateral-movement\": [\n        \"T1021\", \"T1021.001\", \"T1021.002\", \"T1021.003\",\n        \"T1021.004\", \"T1021.006\", \"T1570\",\n    ],\n    \"command-and-control\": [\n        \"T1071\", \"T1071.001\", \"T1071.004\",\n        \"T1105\", \"T1132\", \"T1573\", \"T1573.001\",\n        \"T1219\", \"T1090\",\n    ],\n    \"exfiltration\": [\n        \"T1041\", \"T1048\", \"T1048.003\", \"T1567\",\n    ],\n    \"impact\": [\n        \"T1485\", \"T1486\", \"T1489\", \"T1490\", \"T1491\",\n    ],\n}\n\n\ndef generate_coverage_report(atomics_inventory, execution_logs, detection_results):\n    \"\"\"Generate comprehensive coverage gap analysis.\"\"\"\n    report = {\n        \"generated_at\": datetime.utcnow().isoformat() + \"Z\",\n        \"summary\": {},\n        \"tactics\": {},\n        \"gaps\": [],\n        \"recommendations\": [],\n    }\n\n    total_available = len(atomics_inventory)\n    total_executed = len(execution_logs)\n    total_detected = sum(1 for d in detection_results.values() if d.get(\"detected\"))\n\n    report[\"summary\"] = {\n        \"total_techniques_with_atomics\": total_available,\n        \"total_techniques_executed\": total_executed,\n        \"total_techniques_detected\": total_detected,\n        \"execution_coverage_pct\": round(\n            (total_executed \u002F total_available * 100) if total_available else 0, 1\n        ),\n        \"detection_coverage_pct\": round(\n            (total_detected \u002F total_executed * 100) if total_executed else 0, 1\n        ),\n    }\n\n    # Per-tactic analysis\n    for tactic, technique_ids in TACTIC_TECHNIQUE_MAP.items():\n        tactic_data = {\n            \"techniques_available\": 0,\n            \"techniques_executed\": 0,\n            \"techniques_detected\": 0,\n            \"gaps\": [],\n        }\n\n        for tech_id in technique_ids:\n            if tech_id in atomics_inventory:\n                tactic_data[\"techniques_available\"] += 1\n\n                executed = tech_id in execution_logs\n                detected = detection_results.get(tech_id, {}).get(\"detected\", False)\n\n                if executed:\n                    tactic_data[\"techniques_executed\"] += 1\n                if detected:\n                    tactic_data[\"techniques_detected\"] += 1\n\n                if executed and not detected:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"BLIND_SPOT\",\n                        \"detail\": \"Test executed but no detection triggered\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n                    report[\"gaps\"].append(gap)\n                elif not executed and tech_id in atomics_inventory:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"NOT_TESTED\",\n                        \"detail\": \"Atomic test available but not yet executed\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n\n        avail = tactic_data[\"techniques_available\"]\n        tactic_data[\"coverage_pct\"] = round(\n            (tactic_data[\"techniques_detected\"] \u002F avail * 100) if avail else 0, 1\n        )\n        report[\"tactics\"][tactic] = tactic_data\n\n    # Generate prioritized recommendations\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        report[\"recommendations\"].append({\n            \"priority\": \"CRITICAL\",\n            \"action\": f\"Write detection rules for {len(blind_spots)} blind spot techniques\",\n            \"techniques\": [g[\"technique_id\"] for g in blind_spots],\n        })\n\n    low_coverage_tactics = [\n        t for t, d in report[\"tactics\"].items() if d[\"coverage_pct\"] \u003C 30\n    ]\n    if low_coverage_tactics:\n        report[\"recommendations\"].append({\n            \"priority\": \"HIGH\",\n            \"action\": f\"Expand testing in low-coverage tactics: {', '.join(low_coverage_tactics)}\",\n            \"detail\": \"These tactics have less than 30% detection coverage\",\n        })\n\n    return report\n\n\ndef generate_navigator_layer(atomics_inventory, execution_logs, detection_results,\n                             layer_name=\"Purple Team Coverage\"):\n    \"\"\"Generate ATT&CK Navigator layer JSON for heatmap visualization.\"\"\"\n    layer = {\n        \"name\": layer_name,\n        \"versions\": {\n            \"attack\": \"15\",\n            \"navigator\": \"5.1\",\n            \"layer\": \"4.5\",\n        },\n        \"domain\": \"enterprise-attack\",\n        \"description\": f\"Purple team atomic testing coverage - Generated {datetime.utcnow().isoformat()}Z\",\n        \"filters\": {\"platforms\": [\"Windows\", \"Linux\", \"macOS\"]},\n        \"sorting\": 0,\n        \"layout\": {\n            \"layout\": \"side\",\n            \"aggregateFunction\": \"average\",\n            \"showID\": True,\n            \"showName\": True,\n        },\n        \"hideDisabled\": False,\n        \"techniques\": [],\n        \"gradient\": {\n            \"colors\": [\"#ff6666\", \"#ffeb3b\", \"#66bb6a\"],\n            \"minValue\": 0,\n            \"maxValue\": 100,\n        },\n        \"legendItems\": [\n            {\"label\": \"No Coverage (Blind Spot)\", \"color\": \"#ff6666\"},\n            {\"label\": \"Logged Only (Partial)\", \"color\": \"#ffeb3b\"},\n            {\"label\": \"Alert\u002FDetection Active\", \"color\": \"#66bb6a\"},\n            {\"label\": \"Not Tested\", \"color\": \"#d3d3d3\"},\n        ],\n        \"metadata\": [],\n        \"links\": [],\n        \"showTacticRowBackground\": True,\n        \"tacticRowBackground\": \"#dddddd\",\n        \"selectTechniquesAcrossTactics\": True,\n        \"selectSubtechniquesWithParent\": False,\n    }\n\n    for tech_id, tech_data in atomics_inventory.items():\n        executed = tech_id in execution_logs\n        detection = detection_results.get(tech_id, {})\n        detected = detection.get(\"detected\", False)\n        confidence = detection.get(\"confidence\", \"none\")\n\n        if detected and confidence in (\"high\", \"medium\"):\n            score = 100\n            color = \"#66bb6a\"  # Green - high confidence detection\n            comment = f\"DETECTED - {detection.get('rule_name', 'Alert active')}\"\n        elif detected:\n            score = 50\n            color = \"#ffeb3b\"  # Yellow - logged\u002Fpartial\n            comment = \"PARTIAL - Detection exists but low confidence\"\n        elif executed:\n            score = 0\n            color = \"#ff6666\"  # Red - blind spot\n            comment = \"BLIND SPOT - Test executed, no detection\"\n        else:\n            score = 0\n            color = \"#d3d3d3\"  # Gray - not tested\n            comment = f\"NOT TESTED - {tech_data['test_count']} atomic tests available\"\n\n        technique_entry = {\n            \"techniqueID\": tech_id,\n            \"tactic\": \"\",\n            \"color\": color,\n            \"comment\": comment,\n            \"score\": score,\n            \"enabled\": True,\n            \"metadata\": [\n                {\"name\": \"tests_available\", \"value\": str(tech_data[\"test_count\"])},\n                {\"name\": \"executed\", \"value\": str(executed)},\n                {\"name\": \"detected\", \"value\": str(detected)},\n            ],\n            \"links\": [],\n            \"showSubtechniques\": False,\n        }\n        layer[\"techniques\"].append(technique_entry)\n\n    return layer\n\n\ndef print_coverage_report(report):\n    \"\"\"Print formatted coverage report to console.\"\"\"\n    print(\"=\" * 72)\n    print(\"PURPLE TEAM ATOMIC TESTING - COVERAGE GAP ANALYSIS\")\n    print(\"=\" * 72)\n    print(f\"Generated: {report['generated_at']}\")\n    print()\n\n    s = report[\"summary\"]\n    print(\"EXECUTIVE SUMMARY\")\n    print(\"-\" * 40)\n    print(f\"  Techniques with atomics:  {s['total_techniques_with_atomics']}\")\n    print(f\"  Techniques executed:      {s['total_techniques_executed']}\")\n    print(f\"  Techniques detected:      {s['total_techniques_detected']}\")\n    print(f\"  Execution coverage:       {s['execution_coverage_pct']}%\")\n    print(f\"  Detection coverage:       {s['detection_coverage_pct']}%\")\n    print()\n\n    print(\"PER-TACTIC COVERAGE\")\n    print(\"-\" * 72)\n    print(f\"{'Tactic':\u003C25} {'Available':>9} {'Executed':>9} {'Detected':>9} {'Coverage':>9}\")\n    print(\"-\" * 72)\n    for tactic in TACTIC_ORDER:\n        if tactic in report[\"tactics\"]:\n            t = report[\"tactics\"][tactic]\n            bar = \"#\" * int(t[\"coverage_pct\"] \u002F 5) + \".\" * (20 - int(t[\"coverage_pct\"] \u002F 5))\n            print(\n                f\"  {tactic:\u003C23} {t['techniques_available']:>9} \"\n                f\"{t['techniques_executed']:>9} {t['techniques_detected']:>9} \"\n                f\"{t['coverage_pct']:>8.1f}%\"\n            )\n    print()\n\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        print(\"CRITICAL BLIND SPOTS (executed but not detected)\")\n        print(\"-\" * 72)\n        for gap in blind_spots:\n            print(f\"  [!] {gap['technique_id']} - {gap['technique_name']}\")\n            print(f\"      Tactic: {gap['tactic']}\")\n        print()\n\n    if report[\"recommendations\"]:\n        print(\"RECOMMENDATIONS\")\n        print(\"-\" * 72)\n        for rec in report[\"recommendations\"]:\n            print(f\"  [{rec['priority']}] {rec['action']}\")\n            if \"techniques\" in rec:\n                print(f\"         Techniques: {', '.join(rec['techniques'][:10])}\")\n            if \"detail\" in rec:\n                print(f\"         {rec['detail']}\")\n        print()\n\n\nif __name__ == \"__main__\":\n    import argparse\n\n    parser = argparse.ArgumentParser(description=\"ATT&CK coverage gap analysis for purple team testing\")\n    parser.add_argument(\"--atomics-path\", default=r\"C:\\AtomicRedTeam\\atomics\",\n                        help=\"Path to Atomic Red Team atomics directory\")\n    parser.add_argument(\"--log-dir\", default=r\"C:\\AtomicRedTeam\\logs\",\n                        help=\"Path to atomic test execution logs\")\n    parser.add_argument(\"--detections-file\", default=\"detection_results.json\",\n                        help=\"Path to SIEM detection validation export (JSON)\")\n    parser.add_argument(\"--output-layer\", default=\"navigator_layer.json\",\n                        help=\"Output path for ATT&CK Navigator layer JSON\")\n    parser.add_argument(\"--output-report\", default=\"coverage_report.json\",\n                        help=\"Output path for coverage report JSON\")\n    args = parser.parse_args()\n\n    print(\"[*] Loading atomics inventory...\")\n    inventory = load_atomics_inventory(args.atomics_path)\n    print(f\"    Found {len(inventory)} techniques with atomic tests\")\n\n    print(\"[*] Loading execution logs...\")\n    exec_logs = load_execution_logs(args.log_dir)\n    print(f\"    Found logs for {len(exec_logs)} techniques\")\n\n    print(\"[*] Loading detection results...\")\n    det_results = load_detection_results(args.detections_file)\n    print(f\"    Found detection data for {len(det_results)} techniques\")\n\n    print(\"[*] Generating coverage report...\")\n    report = generate_coverage_report(inventory, exec_logs, det_results)\n    print_coverage_report(report)\n\n    # Save report JSON\n    with open(args.output_report, \"w\") as f:\n        json.dump(report, f, indent=2)\n    print(f\"[+] Report saved to {args.output_report}\")\n\n    # Generate and save Navigator layer\n    print(\"[*] Generating ATT&CK Navigator layer...\")\n    layer = generate_navigator_layer(inventory, exec_logs, det_results)\n    with open(args.output_layer, \"w\") as f:\n        json.dump(layer, f, indent=2)\n    print(f\"[+] Navigator layer saved to {args.output_layer}\")\n    print(f\"    Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\")\n```\n\n### Step 6: Run Continuous Atomic Testing Pipeline\n\nSchedule recurring tests against priority techniques:\n\n```powershell\n# Continuous Atomic Testing - scheduled execution with validation\n# Run as a scheduled task or via CI\u002FCD pipeline\n\n$PriorityTechniques = @(\n    # Top MITRE ATT&CK techniques by prevalence (Red Canary Threat Detection Report)\n    @{ Id = \"T1059.001\"; Name = \"PowerShell\" },\n    @{ Id = \"T1059.003\"; Name = \"Windows Command Shell\" },\n    @{ Id = \"T1547.001\"; Name = \"Registry Run Keys\" },\n    @{ Id = \"T1053.005\"; Name = \"Scheduled Task\" },\n    @{ Id = \"T1003.001\"; Name = \"LSASS Memory\" },\n    @{ Id = \"T1003.003\"; Name = \"NTDS\" },\n    @{ Id = \"T1070.004\"; Name = \"File Deletion\" },\n    @{ Id = \"T1218.011\"; Name = \"Rundll32\" },\n    @{ Id = \"T1082\";     Name = \"System Information Discovery\" },\n    @{ Id = \"T1105\";     Name = \"Ingress Tool Transfer\" }\n)\n\n$ResultsLog = @()\n$RunTimestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n\nforeach ($technique in $PriorityTechniques) {\n    Write-Host \"`n[*] Testing $($technique.Id) - $($technique.Name)\" -ForegroundColor Cyan\n\n    # Check prerequisites\n    try {\n        $prereqs = Invoke-AtomicTest $technique.Id -TestNumbers 1 -CheckPrereqs 2>&1\n        $prereqsMet = $prereqs -notmatch \"not met\"\n    } catch {\n        $prereqsMet = $false\n    }\n\n    if (-not $prereqsMet) {\n        Write-Host \"    [!] Prerequisites not met, attempting install...\" -ForegroundColor Yellow\n        try {\n            Invoke-AtomicTest $technique.Id -TestNumbers 1 -GetPrereqs 2>&1 | Out-Null\n        } catch {\n            Write-Host \"    [!] Prereq install failed, skipping\" -ForegroundColor Red\n            $ResultsLog += [PSCustomObject]@{\n                TechniqueId = $technique.Id\n                Name        = $technique.Name\n                Status      = \"PREREQS_FAILED\"\n                Timestamp   = (Get-Date).ToString(\"o\")\n            }\n            continue\n        }\n    }\n\n    # Execute the test\n    try {\n        $startTime = Get-Date\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Confirm:$false\n        $endTime = Get-Date\n        $duration = ($endTime - $startTime).TotalSeconds\n\n        Write-Host \"    [+] Executed successfully (${duration}s)\" -ForegroundColor Green\n\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"EXECUTED\"\n            Duration    = $duration\n            Timestamp   = $startTime.ToString(\"o\")\n        }\n    } catch {\n        Write-Host \"    [-] Execution failed: $($_.Exception.Message)\" -ForegroundColor Red\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"FAILED\"\n            Error       = $_.Exception.Message\n            Timestamp   = (Get-Date).ToString(\"o\")\n        }\n    }\n\n    # Cleanup\n    try {\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Cleanup 2>&1 | Out-Null\n        Write-Host \"    [+] Cleanup completed\" -ForegroundColor DarkGray\n    } catch {\n        Write-Host \"    [!] Cleanup failed\" -ForegroundColor Yellow\n    }\n\n    # Brief pause between tests for log ingestion\n    Start-Sleep -Seconds 10\n}\n\n# Export results\n$ResultsLog | Export-Csv \"C:\\AtomicRedTeam\\logs\\continuous_test_$RunTimestamp.csv\" -NoTypeInformation\n$ResultsLog | Format-Table -AutoSize\n\n# Summary\n$executed = ($ResultsLog | Where-Object Status -eq \"EXECUTED\").Count\n$failed = ($ResultsLog | Where-Object Status -ne \"EXECUTED\").Count\nWrite-Host \"`n=== CONTINUOUS TEST SUMMARY ===\" -ForegroundColor Cyan\nWrite-Host \"  Executed: $executed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Green\nWrite-Host \"  Failed:   $failed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Red\n```\n\n### Step 7: Detection Validation Loop\n\nClose the purple team loop by correlating tests with detections and iterating:\n\n```\nDetection Validation Loop Workflow:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n  ┌──────────────────┐\n  │ 1. SELECT        │  Choose technique from threat intel or gap report\n  │    TECHNIQUE     │  Map to Atomic Red Team test ID\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 2. EXECUTE       │  Run Invoke-AtomicTest with logging\n  │    ATOMIC TEST   │  Record timestamp, hostname, test details\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 3. WAIT FOR      │  Allow 30-60 seconds for log ingestion\n  │    INGESTION     │  Ensure Sysmon, WinEventLog, EDR agents forward data\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 4. QUERY SIEM    │  Search for correlated alerts matching technique\n  │    FOR ALERTS    │  Check: Did our detection rules fire?\n  └───────┬──────────┘\n          │\n     ┌────┴────┐\n     │DETECTED?│\n     └────┬────┘\n    YES   │   NO\n  ┌───────▼──────────┐   ┌──────────────────┐\n  │ 5a. MARK GREEN   │   │ 5b. WRITE NEW    │\n  │  Update Navigator│   │  Sigma\u002FSIEM Rule │\n  │  layer, log pass │   │  for technique   │\n  └───────┬──────────┘   └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5c. DEPLOY RULE  │\n          │               │  Push to SIEM    │\n          │               └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5d. RE-EXECUTE   │\n          │               │  Re-run atomic   │\n          │               │  test, validate  │\n          │               └───────┬──────────┘\n          │                       │\n  ┌───────▼───────────────────────▼──┐\n  │ 6. CLEANUP                       │\n  │    Run Invoke-AtomicTest -Cleanup│\n  │    Document results              │\n  └───────┬──────────────────────────┘\n          │\n  ┌───────▼──────────┐\n  │ 7. NEXT          │  Select next technique\n  │    TECHNIQUE     │  Repeat from step 1\n  └──────────────────┘\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Atomic Red Team** | Open-source library by Red Canary containing small, focused tests mapped to MITRE ATT&CK techniques for validating detection capabilities |\n| **Invoke-AtomicRedTeam** | PowerShell execution framework for running atomic tests locally or remotely, with prereq checking and cleanup |\n| **ATT&CK Navigator** | Web-based tool for annotating and visualizing MITRE ATT&CK matrices as layered heatmaps showing detection coverage |\n| **Navigator Layer** | JSON file defining colors, scores, and comments for each ATT&CK technique; used to generate coverage heatmaps |\n| **Detection Validation Loop** | Iterative purple team process: execute attack, check for detection, write\u002Ftune rule if missed, re-execute to confirm |\n| **Coverage Gap** | ATT&CK technique where no detection rule exists or where the rule fails to fire when the technique is executed |\n| **Blind Spot** | Technique that was tested via atomic execution but produced zero SIEM alerts, indicating a critical detection failure |\n| **Sigma Rule** | Vendor-agnostic detection rule format that can be converted to Splunk SPL, Elastic KQL, Microsoft KQL, and other SIEM queries |\n| **Purple Team** | Collaborative security exercise where red team executes known techniques and blue team validates and improves detections in real time |\n| **Continuous Atomic Testing** | Scheduled, automated execution of atomic tests to validate that detection rules remain functional as environments change |\n\n## Tools & Systems\n\n- **Invoke-AtomicRedTeam**: PowerShell module for executing Atomic Red Team tests with prereq management and cleanup\n- **Atomic Red Team Atomics**: Library of 700+ tests across 200+ MITRE ATT&CK techniques, organized by technique ID\n- **ATT&CK Navigator**: Web tool at mitre-attack.github.io\u002Fattack-navigator for creating technique coverage heatmaps\n- **VECTR**: Purple team reporting platform by SCYTHE for tracking test campaigns, results, and coverage over time\n- **Sigma**: Generic signature format for SIEM systems; convert with sigmac or pySigma to target SIEM platforms\n- **Splunk \u002F Elastic \u002F Microsoft Sentinel**: SIEM platforms for querying detection results after atomic test execution\n- **Sysmon**: Windows system monitoring driver providing detailed process, network, registry, and file telemetry\n- **Caldera**: MITRE-developed adversary emulation platform for automated, multi-step attack chains beyond single atomic tests\n\n## Common Scenarios\n\n### Scenario: Validating Credential Access Detections After EDR Deployment\n\n**Context**: The organization deployed a new EDR agent and needs to verify it detects credential dumping techniques (LSASS access, NTDS extraction, SAM dump). The purple team must confirm detections are working before closing the deployment ticket.\n\n**Approach**:\n1. Install Invoke-AtomicRedTeam on a test endpoint enrolled in the new EDR\n2. Execute credential access atomics: T1003.001 (LSASS Memory), T1003.002 (SAM), T1003.003 (NTDS)\n3. Wait 60 seconds, then query EDR console and SIEM for alerts on the test hostname\n4. For each technique: mark as DETECTED (green) or BLIND SPOT (red) in the Navigator layer\n5. For blind spots, create Sigma rules targeting Sysmon EventCode 10 (ProcessAccess to lsass.exe) and EventCode 1 (known dumping tools)\n6. Deploy rules, re-run atomics, confirm detection\n7. Export Navigator layer and coverage report for the deployment ticket\n\n**Pitfalls**:\n- Running credential dumping atomics without local admin privileges (tests will fail silently)\n- Forgetting to enable Sysmon ProcessAccess logging (EventCode 10) which is disabled by default\n- Not running cleanup, leaving test artifacts (created accounts, registry keys, scheduled tasks)\n- Testing only one sub-technique of T1003 and assuming all credential access is covered\n- Not accounting for EDR agent exclusions that may whitelist PowerShell or the AtomicRedTeam directory\n\n### Scenario: Building Monthly ATT&CK Coverage Reporting for Leadership\n\n**Context**: The CISO requires monthly metrics on detection coverage mapped to MITRE ATT&CK. The security team needs to run recurring tests, track improvements, and produce a visual heatmap showing coverage growth over time.\n\n**Approach**:\n1. Define a test plan covering the top 50 ATT&CK techniques from Red Canary Threat Detection Report\n2. Schedule continuous atomic testing via Windows Task Scheduler running the PowerShell pipeline weekly\n3. Export execution logs and SIEM detection query results to JSON after each run\n4. Run the Python gap analysis script to produce Navigator layer and coverage report\n5. Import the Navigator layer into ATT&CK Navigator, screenshot for executive slide deck\n6. Track month-over-month: number of green (detected) vs. red (blind spot) techniques\n7. Prioritize detection engineering sprints on the highest-impact blind spots\n\n**Pitfalls**:\n- Counting \"logged\" as \"detected\" (seeing an event in logs is not the same as having an alert rule)\n- Not updating the atomics repository (new tests are added frequently)\n- Focusing only on technique count rather than detection quality (a noisy rule with 90% false positives is worse than no rule)\n- Not involving the SOC analysts who will triage the alerts in the validation process\n\n## Output Format\n\n```\nPURPLE TEAM ATOMIC TESTING REPORT\n====================================\nCampaign:         Q1 2026 Detection Validation\nDate Range:       2026-01-15 to 2026-03-15\nTest Environment: YOURLAB-WIN10-01, YOURLAB-SRV-01\nSIEM:             Splunk Enterprise 9.x\n\nEXECUTION SUMMARY\nTechniques Tested:        47 \u002F 200+ available\nIndividual Tests Run:     112\nTests Succeeded:          104\nTests Failed (prereqs):   8\nCleanup Completed:        104 \u002F 104\n\nDETECTION COVERAGE\n                            Tested    Detected    Coverage\nExecution:                     12          10       83.3%\nPersistence:                    8           5       62.5%\nCredential Access:              6           4       66.7%\nDefense Evasion:               10           3       30.0%\nDiscovery:                      5           5      100.0%\nLateral Movement:               3           1       33.3%\nCommand and Control:            2           1       50.0%\nExfiltration:                   1           0        0.0%\n\nCRITICAL BLIND SPOTS\n[!] T1218.011 - Rundll32          (defense-evasion)\n[!] T1218.005 - Mshta             (defense-evasion)\n[!] T1070.004 - File Deletion     (defense-evasion)\n[!] T1574.001 - DLL Search Order  (persistence)\n[!] T1021.002 - SMB\u002FAdmin Shares  (lateral-movement)\n[!] T1048.003 - Exfil Over HTTP   (exfiltration)\n\nNAVIGATOR LAYER: coverage_layer_20260315.json\n  Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\n\nRECOMMENDATIONS\n[CRITICAL] Write Sigma rules for 6 blind spot techniques\n[HIGH]     Expand defense-evasion testing (30% coverage)\n[HIGH]     Enable exfiltration monitoring data sources\n[MEDIUM]   Increase lateral movement test coverage (3 of 7 tested)\n```\n","# Performing Purple Team Atomic Testing\n\n## When to Use\n\n- Validating detection coverage against specific MITRE ATT&CK techniques\n- Running purple team exercises using Atomic Red Team test library\n- Performing ATT&CK coverage gap analysis to identify blind spots in SIEM\u002FEDR\n- Building a detection validation loop: execute atomic test, check SIEM, tune rule, retest\n- Generating ATT&CK Navigator heatmap layers for executive reporting\n- Automating continuous atomic testing in CI\u002FCD or scheduled pipelines\n- Mapping threat intelligence reports to executable atomic tests\n\n**Do not use** for full-scope red team engagements requiring custom implants or live adversary simulation beyond atomic tests; use Caldera, SCYTHE, or Cobalt Strike for advanced adversary emulation.\n\n**DISCLAIMER**: Atomic Red Team tests execute real attack techniques. Run only on systems you own or have explicit written authorization to test. Many tests modify system state, create artifacts, or trigger security alerts. Always execute cleanup commands after testing. Never run atomic tests in production without risk acceptance from stakeholders.\n\n## Prerequisites\n\n- Windows host with PowerShell 5.1+ or PowerShell Core 7+ (Linux\u002FmacOS supported for cross-platform atomics)\n- Invoke-AtomicRedTeam PowerShell module installed from PSGallery\n- Atomic Red Team atomics repository cloned locally\n- SIEM\u002FEDR with log ingestion from test endpoints (Splunk, Elastic, Microsoft Sentinel, CrowdStrike)\n- MITRE ATT&CK Navigator (web-based or local instance) for layer visualization\n- Python 3.9+ with `mitreattack-python`, `pyyaml`, and `requests` for automation scripts\n- Sigma rules repository for detection correlation\n- Administrative\u002Froot access on test endpoints\n- Isolated test environment (lab, sandbox, or dedicated test range)\n\n## Workflow\n\n### Step 1: Install and Configure Invoke-AtomicRedTeam\n\nSet up the execution framework and download the atomics library:\n\n```powershell\n# Install the PowerShell execution module\nInstall-Module -Name invoke-atomicredteam -Scope CurrentUser -Force\nInstall-Module -Name powershell-yaml -Scope CurrentUser -Force\n\n# Import the module\nImport-Module invoke-atomicredteam\n\n# Install atomics to default location (C:\\AtomicRedTeam\\atomics)\nIEX (IEX (New-Object System.Net.WebClient).DownloadString(\n    'https:\u002F\u002Fraw.githubusercontent.com\u002Fredcanaryco\u002Finvoke-atomicredteam\u002Fmaster\u002Finstall-atomicredteam.ps1'\n)); Install-AtomicRedTeam -getAtomics -Force\n\n# Verify installation - list available techniques\n$atomicsPath = \"C:\\AtomicRedTeam\\atomics\"\n$techniques = Get-ChildItem $atomicsPath -Directory | Where-Object { $_.Name -match '^T\\d{4}' }\nWrite-Host \"Available techniques: $($techniques.Count)\"\n\n# Configure execution logging\n$env:ARTLOG = \"C:\\AtomicRedTeam\\logs\"\nif (-not (Test-Path $env:ARTLOG)) { New-Item -Path $env:ARTLOG -ItemType Directory }\n```\n\n### Step 2: Enumerate and Select Atomic Tests\n\nInventory available tests and select targets based on threat intelligence or gap analysis:\n\n```powershell\n# List all tests for a specific technique\nInvoke-AtomicTest T1059.001 -ShowDetailsBrief\n\n# Show full details including attack commands and cleanup\nInvoke-AtomicTest T1059.001 -ShowDetails\n\n# List tests for a tactic (e.g., Persistence)\n$persistenceTechniques = @(\n    \"T1547.001\",  # Boot or Logon Autostart - Registry Run Keys\n    \"T1053.005\",  # Scheduled Task\n    \"T1136.001\",  # Create Account - Local Account\n    \"T1543.003\",  # Create or Modify System Process - Windows Service\n    \"T1546.001\",  # Event Triggered Execution - Change Default File Association\n    \"T1574.001\",  # Hijack Execution Flow - DLL Search Order Hijacking\n    \"T1197\"       # BITS Jobs\n)\n\nforeach ($tech in $persistenceTechniques) {\n    Write-Host \"`n=== $tech ===\" -ForegroundColor Cyan\n    try {\n        Invoke-AtomicTest $tech -ShowDetailsBrief\n    } catch {\n        Write-Host \"  No tests available\" -ForegroundColor Yellow\n    }\n}\n\n# Get all atomic techniques from YAML files programmatically\n$allAtomics = Get-ChildItem \"$atomicsPath\\T*\\T*.yaml\" -Recurse |\n    ForEach-Object {\n        $yaml = Get-Content $_.FullName -Raw | ConvertFrom-Yaml\n        [PSCustomObject]@{\n            TechniqueId   = $yaml.attack_technique\n            TechniqueName = $yaml.display_name\n            TestCount     = $yaml.atomic_tests.Count\n            Platforms     = ($yaml.atomic_tests.supported_platforms | Sort-Object -Unique) -join \", \"\n        }\n    }\n\n$allAtomics | Sort-Object TechniqueId | Format-Table -AutoSize\nWrite-Host \"Total techniques with tests: $($allAtomics.Count)\"\nWrite-Host \"Total individual tests: $(($allAtomics | Measure-Object -Property TestCount -Sum).Sum)\"\n```\n\n### Step 3: Execute Atomic Tests with Logging\n\nRun tests with pre\u002Fpost logging for detection validation:\n\n```powershell\n# Execute a single test by technique ID (runs all tests for that technique)\nInvoke-AtomicTest T1059.001\n\n# Execute a specific test by number\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute by test name\nInvoke-AtomicTest T1059.001 -TestNames \"Mimikatz - Cradled Invoke Expression\"\n\n# Execute by GUID\nInvoke-AtomicTest T1059.001 -TestGuids \"2e803f96-4e33-4c2c-b0c8-1c10cbb3945f\"\n\n# Execute with prerequisite check and installation\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -CheckPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -GetPrereqs\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n\n# Execute with timeout (seconds)\nInvoke-AtomicTest T1003.001 -TimeoutSeconds 120\n\n# Cleanup after testing\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup\n\n# Execute with full logging wrapper\nfunction Invoke-AtomicWithLogging {\n    param(\n        [string]$TechniqueId,\n        [int[]]$TestNumbers,\n        [string]$LogPath = \"C:\\AtomicRedTeam\\logs\"\n    )\n\n    $timestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n    $logFile = Join-Path $LogPath \"${TechniqueId}_${timestamp}.json\"\n\n    $result = @{\n        technique_id  = $TechniqueId\n        test_numbers  = $TestNumbers\n        start_time    = (Get-Date).ToString(\"o\")\n        hostname      = $env:COMPUTERNAME\n        username      = $env:USERNAME\n        results       = @()\n    }\n\n    foreach ($testNum in $TestNumbers) {\n        $testResult = @{\n            test_number = $testNum\n            status      = \"unknown\"\n            start_time  = (Get-Date).ToString(\"o\")\n        }\n\n        try {\n            # Show what will execute\n            $details = Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -ShowDetails 2>&1\n            $testResult[\"details\"] = $details | Out-String\n\n            # Execute the test\n            Invoke-AtomicTest $TechniqueId -TestNumbers $testNum -Confirm:$false\n            $testResult[\"status\"] = \"executed\"\n        } catch {\n            $testResult[\"status\"] = \"failed\"\n            $testResult[\"error\"] = $_.Exception.Message\n        }\n\n        $testResult[\"end_time\"] = (Get-Date).ToString(\"o\")\n        $result.results += $testResult\n\n        # Wait for SIEM ingestion\n        Start-Sleep -Seconds 30\n    }\n\n    $result[\"end_time\"] = (Get-Date).ToString(\"o\")\n    $result | ConvertTo-Json -Depth 10 | Set-Content $logFile\n    Write-Host \"Log written to: $logFile\" -ForegroundColor Green\n    return $result\n}\n\n# Usage\nInvoke-AtomicWithLogging -TechniqueId \"T1059.001\" -TestNumbers @(1, 2, 3)\n```\n\n### Step 4: Validate Detections in SIEM\n\nQuery your SIEM to confirm whether atomic tests generated alerts:\n\n```\nSplunk SPL Queries for Detection Validation:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n-- T1059.001: PowerShell Execution\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-PowerShell\u002FOperational\"\n  EventCode=4104\n  | eval script_block=ScriptBlockText\n  | where len(script_block) > 500\n  | stats count by host, script_block\n  | sort -count\n\n-- T1003.001: LSASS Memory Credential Dumping\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4663\n  ObjectName=\"*lsass*\"\n  | stats count by host, SubjectUserName, ProcessName\n  | where count > 0\n\n-- T1547.001: Registry Run Key Persistence\nindex=windows sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  EventCode=13\n  TargetObject=\"*\\\\CurrentVersion\\\\Run*\"\n  | stats count by host, Image, TargetObject, Details\n\n-- T1053.005: Scheduled Task Creation\nindex=windows sourcetype=\"WinEventLog:Security\" EventCode=4698\n  | stats count by host, SubjectUserName, TaskName, TaskContent\n  | sort -count\n\n-- Generic: Hunt for Atomic Red Team artifacts\nindex=windows (sourcetype=\"WinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n  OR sourcetype=\"WinEventLog:Security\")\n  | search \"*AtomicRedTeam*\" OR \"*atomic*\" OR \"*Invoke-AtomicTest*\"\n  | stats count by sourcetype, EventCode, host\n```\n\n```\nElastic \u002F KQL Queries:\n━━━━━━━━━━━━━━━━━━━━━\n\n-- PowerShell script block logging\nevent.code: \"4104\" and powershell.file.script_block_text: *\n\n-- Sysmon process creation from AtomicRedTeam paths\nevent.code: \"1\" and process.executable: *AtomicRedTeam*\n\n-- Registry modification (persistence)\nevent.code: \"13\" and registry.path: *CurrentVersion\\\\Run*\n\n-- Credential access indicators\nevent.code: \"10\" and winlog.event_data.TargetImage: *lsass.exe*\n```\n\n### Step 5: ATT&CK Coverage Gap Analysis\n\nGenerate a coverage matrix comparing tested vs. detected techniques:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"ATT&CK coverage gap analysis - compares atomic test results against SIEM detections.\"\"\"\n\nimport json\nimport os\nimport yaml\nfrom pathlib import Path\nfrom datetime import datetime\n\n\ndef load_atomics_inventory(atomics_path):\n    \"\"\"Parse all atomic test YAML files to build technique inventory.\"\"\"\n    inventory = {}\n    atomics_dir = Path(atomics_path)\n\n    for yaml_file in atomics_dir.glob(\"T*\u002FT*.yaml\"):\n        try:\n            with open(yaml_file, \"r\", encoding=\"utf-8\") as f:\n                data = yaml.safe_load(f)\n\n            tech_id = data.get(\"attack_technique\", \"\")\n            if not tech_id:\n                continue\n\n            tests = data.get(\"atomic_tests\", [])\n            inventory[tech_id] = {\n                \"name\": data.get(\"display_name\", \"Unknown\"),\n                \"test_count\": len(tests),\n                \"platforms\": list(set(\n                    p for t in tests\n                    for p in t.get(\"supported_platforms\", [])\n                )),\n                \"tests\": [\n                    {\n                        \"name\": t.get(\"name\", \"Unnamed\"),\n                        \"description\": t.get(\"description\", \"\"),\n                        \"platforms\": t.get(\"supported_platforms\", []),\n                        \"executor\": t.get(\"executor\", {}).get(\"name\", \"unknown\"),\n                    }\n                    for t in tests\n                ],\n            }\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {yaml_file}: {e}\")\n\n    return inventory\n\n\ndef load_execution_logs(log_dir):\n    \"\"\"Load atomic test execution logs.\"\"\"\n    executed = {}\n    log_path = Path(log_dir)\n\n    if not log_path.exists():\n        return executed\n\n    for log_file in log_path.glob(\"T*_*.json\"):\n        try:\n            with open(log_file, \"r\") as f:\n                data = json.load(f)\n            tech_id = data.get(\"technique_id\", \"\")\n            if tech_id:\n                if tech_id not in executed:\n                    executed[tech_id] = {\n                        \"executions\": [],\n                        \"last_executed\": data.get(\"end_time\", \"\"),\n                    }\n                executed[tech_id][\"executions\"].append({\n                    \"timestamp\": data.get(\"start_time\", \"\"),\n                    \"results\": data.get(\"results\", []),\n                })\n        except Exception as e:\n            print(f\"[WARN] Failed to parse {log_file}: {e}\")\n\n    return executed\n\n\ndef load_detection_results(detection_file):\n    \"\"\"Load SIEM detection validation results (JSON export from SIEM queries).\"\"\"\n    if not os.path.exists(detection_file):\n        return {}\n\n    with open(detection_file, \"r\") as f:\n        data = json.load(f)\n\n    detections = {}\n    for entry in data:\n        tech_id = entry.get(\"technique_id\", \"\")\n        if tech_id:\n            detections[tech_id] = {\n                \"detected\": entry.get(\"detected\", False),\n                \"alert_count\": entry.get(\"alert_count\", 0),\n                \"rule_name\": entry.get(\"rule_name\", \"\"),\n                \"confidence\": entry.get(\"confidence\", \"unknown\"),\n                \"data_sources\": entry.get(\"data_sources\", []),\n            }\n\n    return detections\n\n\n# MITRE ATT&CK tactic ordering for structured output\nTACTIC_ORDER = [\n    \"reconnaissance\", \"resource-development\", \"initial-access\",\n    \"execution\", \"persistence\", \"privilege-escalation\",\n    \"defense-evasion\", \"credential-access\", \"discovery\",\n    \"lateral-movement\", \"collection\", \"command-and-control\",\n    \"exfiltration\", \"impact\",\n]\n\n# Tactic-to-technique mapping for common techniques (subset for illustration)\nTACTIC_TECHNIQUE_MAP = {\n    \"execution\": [\n        \"T1059\", \"T1059.001\", \"T1059.003\", \"T1059.004\", \"T1059.005\",\n        \"T1059.006\", \"T1059.007\", \"T1047\", \"T1053\", \"T1053.005\",\n        \"T1129\", \"T1203\", \"T1569\", \"T1569.002\",\n    ],\n    \"persistence\": [\n        \"T1547\", \"T1547.001\", \"T1547.004\", \"T1547.009\",\n        \"T1053.005\", \"T1136\", \"T1136.001\", \"T1543\", \"T1543.003\",\n        \"T1546\", \"T1546.001\", \"T1546.003\", \"T1574\", \"T1574.001\",\n        \"T1197\", \"T1505\", \"T1505.003\",\n    ],\n    \"credential-access\": [\n        \"T1003\", \"T1003.001\", \"T1003.002\", \"T1003.003\",\n        \"T1003.004\", \"T1003.005\", \"T1003.006\",\n        \"T1110\", \"T1110.001\", \"T1110.003\",\n        \"T1555\", \"T1555.003\", \"T1552\", \"T1552.001\",\n        \"T1558\", \"T1558.003\",\n    ],\n    \"defense-evasion\": [\n        \"T1070\", \"T1070.001\", \"T1070.004\",\n        \"T1218\", \"T1218.001\", \"T1218.003\", \"T1218.005\",\n        \"T1218.010\", \"T1218.011\",\n        \"T1027\", \"T1140\", \"T1562\", \"T1562.001\",\n        \"T1036\", \"T1036.005\",\n    ],\n    \"discovery\": [\n        \"T1082\", \"T1083\", \"T1087\", \"T1087.001\", \"T1087.002\",\n        \"T1016\", \"T1049\", \"T1057\", \"T1069\", \"T1069.001\",\n        \"T1069.002\", \"T1518\", \"T1518.001\",\n    ],\n    \"lateral-movement\": [\n        \"T1021\", \"T1021.001\", \"T1021.002\", \"T1021.003\",\n        \"T1021.004\", \"T1021.006\", \"T1570\",\n    ],\n    \"command-and-control\": [\n        \"T1071\", \"T1071.001\", \"T1071.004\",\n        \"T1105\", \"T1132\", \"T1573\", \"T1573.001\",\n        \"T1219\", \"T1090\",\n    ],\n    \"exfiltration\": [\n        \"T1041\", \"T1048\", \"T1048.003\", \"T1567\",\n    ],\n    \"impact\": [\n        \"T1485\", \"T1486\", \"T1489\", \"T1490\", \"T1491\",\n    ],\n}\n\n\ndef generate_coverage_report(atomics_inventory, execution_logs, detection_results):\n    \"\"\"Generate comprehensive coverage gap analysis.\"\"\"\n    report = {\n        \"generated_at\": datetime.utcnow().isoformat() + \"Z\",\n        \"summary\": {},\n        \"tactics\": {},\n        \"gaps\": [],\n        \"recommendations\": [],\n    }\n\n    total_available = len(atomics_inventory)\n    total_executed = len(execution_logs)\n    total_detected = sum(1 for d in detection_results.values() if d.get(\"detected\"))\n\n    report[\"summary\"] = {\n        \"total_techniques_with_atomics\": total_available,\n        \"total_techniques_executed\": total_executed,\n        \"total_techniques_detected\": total_detected,\n        \"execution_coverage_pct\": round(\n            (total_executed \u002F total_available * 100) if total_available else 0, 1\n        ),\n        \"detection_coverage_pct\": round(\n            (total_detected \u002F total_executed * 100) if total_executed else 0, 1\n        ),\n    }\n\n    # Per-tactic analysis\n    for tactic, technique_ids in TACTIC_TECHNIQUE_MAP.items():\n        tactic_data = {\n            \"techniques_available\": 0,\n            \"techniques_executed\": 0,\n            \"techniques_detected\": 0,\n            \"gaps\": [],\n        }\n\n        for tech_id in technique_ids:\n            if tech_id in atomics_inventory:\n                tactic_data[\"techniques_available\"] += 1\n\n                executed = tech_id in execution_logs\n                detected = detection_results.get(tech_id, {}).get(\"detected\", False)\n\n                if executed:\n                    tactic_data[\"techniques_executed\"] += 1\n                if detected:\n                    tactic_data[\"techniques_detected\"] += 1\n\n                if executed and not detected:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"BLIND_SPOT\",\n                        \"detail\": \"Test executed but no detection triggered\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n                    report[\"gaps\"].append(gap)\n                elif not executed and tech_id in atomics_inventory:\n                    gap = {\n                        \"technique_id\": tech_id,\n                        \"technique_name\": atomics_inventory[tech_id][\"name\"],\n                        \"tactic\": tactic,\n                        \"status\": \"NOT_TESTED\",\n                        \"detail\": \"Atomic test available but not yet executed\",\n                    }\n                    tactic_data[\"gaps\"].append(gap)\n\n        avail = tactic_data[\"techniques_available\"]\n        tactic_data[\"coverage_pct\"] = round(\n            (tactic_data[\"techniques_detected\"] \u002F avail * 100) if avail else 0, 1\n        )\n        report[\"tactics\"][tactic] = tactic_data\n\n    # Generate prioritized recommendations\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        report[\"recommendations\"].append({\n            \"priority\": \"CRITICAL\",\n            \"action\": f\"Write detection rules for {len(blind_spots)} blind spot techniques\",\n            \"techniques\": [g[\"technique_id\"] for g in blind_spots],\n        })\n\n    low_coverage_tactics = [\n        t for t, d in report[\"tactics\"].items() if d[\"coverage_pct\"] \u003C 30\n    ]\n    if low_coverage_tactics:\n        report[\"recommendations\"].append({\n            \"priority\": \"HIGH\",\n            \"action\": f\"Expand testing in low-coverage tactics: {', '.join(low_coverage_tactics)}\",\n            \"detail\": \"These tactics have less than 30% detection coverage\",\n        })\n\n    return report\n\n\ndef generate_navigator_layer(atomics_inventory, execution_logs, detection_results,\n                             layer_name=\"Purple Team Coverage\"):\n    \"\"\"Generate ATT&CK Navigator layer JSON for heatmap visualization.\"\"\"\n    layer = {\n        \"name\": layer_name,\n        \"versions\": {\n            \"attack\": \"15\",\n            \"navigator\": \"5.1\",\n            \"layer\": \"4.5\",\n        },\n        \"domain\": \"enterprise-attack\",\n        \"description\": f\"Purple team atomic testing coverage - Generated {datetime.utcnow().isoformat()}Z\",\n        \"filters\": {\"platforms\": [\"Windows\", \"Linux\", \"macOS\"]},\n        \"sorting\": 0,\n        \"layout\": {\n            \"layout\": \"side\",\n            \"aggregateFunction\": \"average\",\n            \"showID\": True,\n            \"showName\": True,\n        },\n        \"hideDisabled\": False,\n        \"techniques\": [],\n        \"gradient\": {\n            \"colors\": [\"#ff6666\", \"#ffeb3b\", \"#66bb6a\"],\n            \"minValue\": 0,\n            \"maxValue\": 100,\n        },\n        \"legendItems\": [\n            {\"label\": \"No Coverage (Blind Spot)\", \"color\": \"#ff6666\"},\n            {\"label\": \"Logged Only (Partial)\", \"color\": \"#ffeb3b\"},\n            {\"label\": \"Alert\u002FDetection Active\", \"color\": \"#66bb6a\"},\n            {\"label\": \"Not Tested\", \"color\": \"#d3d3d3\"},\n        ],\n        \"metadata\": [],\n        \"links\": [],\n        \"showTacticRowBackground\": True,\n        \"tacticRowBackground\": \"#dddddd\",\n        \"selectTechniquesAcrossTactics\": True,\n        \"selectSubtechniquesWithParent\": False,\n    }\n\n    for tech_id, tech_data in atomics_inventory.items():\n        executed = tech_id in execution_logs\n        detection = detection_results.get(tech_id, {})\n        detected = detection.get(\"detected\", False)\n        confidence = detection.get(\"confidence\", \"none\")\n\n        if detected and confidence in (\"high\", \"medium\"):\n            score = 100\n            color = \"#66bb6a\"  # Green - high confidence detection\n            comment = f\"DETECTED - {detection.get('rule_name', 'Alert active')}\"\n        elif detected:\n            score = 50\n            color = \"#ffeb3b\"  # Yellow - logged\u002Fpartial\n            comment = \"PARTIAL - Detection exists but low confidence\"\n        elif executed:\n            score = 0\n            color = \"#ff6666\"  # Red - blind spot\n            comment = \"BLIND SPOT - Test executed, no detection\"\n        else:\n            score = 0\n            color = \"#d3d3d3\"  # Gray - not tested\n            comment = f\"NOT TESTED - {tech_data['test_count']} atomic tests available\"\n\n        technique_entry = {\n            \"techniqueID\": tech_id,\n            \"tactic\": \"\",\n            \"color\": color,\n            \"comment\": comment,\n            \"score\": score,\n            \"enabled\": True,\n            \"metadata\": [\n                {\"name\": \"tests_available\", \"value\": str(tech_data[\"test_count\"])},\n                {\"name\": \"executed\", \"value\": str(executed)},\n                {\"name\": \"detected\", \"value\": str(detected)},\n            ],\n            \"links\": [],\n            \"showSubtechniques\": False,\n        }\n        layer[\"techniques\"].append(technique_entry)\n\n    return layer\n\n\ndef print_coverage_report(report):\n    \"\"\"Print formatted coverage report to console.\"\"\"\n    print(\"=\" * 72)\n    print(\"PURPLE TEAM ATOMIC TESTING - COVERAGE GAP ANALYSIS\")\n    print(\"=\" * 72)\n    print(f\"Generated: {report['generated_at']}\")\n    print()\n\n    s = report[\"summary\"]\n    print(\"EXECUTIVE SUMMARY\")\n    print(\"-\" * 40)\n    print(f\"  Techniques with atomics:  {s['total_techniques_with_atomics']}\")\n    print(f\"  Techniques executed:      {s['total_techniques_executed']}\")\n    print(f\"  Techniques detected:      {s['total_techniques_detected']}\")\n    print(f\"  Execution coverage:       {s['execution_coverage_pct']}%\")\n    print(f\"  Detection coverage:       {s['detection_coverage_pct']}%\")\n    print()\n\n    print(\"PER-TACTIC COVERAGE\")\n    print(\"-\" * 72)\n    print(f\"{'Tactic':\u003C25} {'Available':>9} {'Executed':>9} {'Detected':>9} {'Coverage':>9}\")\n    print(\"-\" * 72)\n    for tactic in TACTIC_ORDER:\n        if tactic in report[\"tactics\"]:\n            t = report[\"tactics\"][tactic]\n            bar = \"#\" * int(t[\"coverage_pct\"] \u002F 5) + \".\" * (20 - int(t[\"coverage_pct\"] \u002F 5))\n            print(\n                f\"  {tactic:\u003C23} {t['techniques_available']:>9} \"\n                f\"{t['techniques_executed']:>9} {t['techniques_detected']:>9} \"\n                f\"{t['coverage_pct']:>8.1f}%\"\n            )\n    print()\n\n    blind_spots = [g for g in report[\"gaps\"] if g[\"status\"] == \"BLIND_SPOT\"]\n    if blind_spots:\n        print(\"CRITICAL BLIND SPOTS (executed but not detected)\")\n        print(\"-\" * 72)\n        for gap in blind_spots:\n            print(f\"  [!] {gap['technique_id']} - {gap['technique_name']}\")\n            print(f\"      Tactic: {gap['tactic']}\")\n        print()\n\n    if report[\"recommendations\"]:\n        print(\"RECOMMENDATIONS\")\n        print(\"-\" * 72)\n        for rec in report[\"recommendations\"]:\n            print(f\"  [{rec['priority']}] {rec['action']}\")\n            if \"techniques\" in rec:\n                print(f\"         Techniques: {', '.join(rec['techniques'][:10])}\")\n            if \"detail\" in rec:\n                print(f\"         {rec['detail']}\")\n        print()\n\n\nif __name__ == \"__main__\":\n    import argparse\n\n    parser = argparse.ArgumentParser(description=\"ATT&CK coverage gap analysis for purple team testing\")\n    parser.add_argument(\"--atomics-path\", default=r\"C:\\AtomicRedTeam\\atomics\",\n                        help=\"Path to Atomic Red Team atomics directory\")\n    parser.add_argument(\"--log-dir\", default=r\"C:\\AtomicRedTeam\\logs\",\n                        help=\"Path to atomic test execution logs\")\n    parser.add_argument(\"--detections-file\", default=\"detection_results.json\",\n                        help=\"Path to SIEM detection validation export (JSON)\")\n    parser.add_argument(\"--output-layer\", default=\"navigator_layer.json\",\n                        help=\"Output path for ATT&CK Navigator layer JSON\")\n    parser.add_argument(\"--output-report\", default=\"coverage_report.json\",\n                        help=\"Output path for coverage report JSON\")\n    args = parser.parse_args()\n\n    print(\"[*] Loading atomics inventory...\")\n    inventory = load_atomics_inventory(args.atomics_path)\n    print(f\"    Found {len(inventory)} techniques with atomic tests\")\n\n    print(\"[*] Loading execution logs...\")\n    exec_logs = load_execution_logs(args.log_dir)\n    print(f\"    Found logs for {len(exec_logs)} techniques\")\n\n    print(\"[*] Loading detection results...\")\n    det_results = load_detection_results(args.detections_file)\n    print(f\"    Found detection data for {len(det_results)} techniques\")\n\n    print(\"[*] Generating coverage report...\")\n    report = generate_coverage_report(inventory, exec_logs, det_results)\n    print_coverage_report(report)\n\n    # Save report JSON\n    with open(args.output_report, \"w\") as f:\n        json.dump(report, f, indent=2)\n    print(f\"[+] Report saved to {args.output_report}\")\n\n    # Generate and save Navigator layer\n    print(\"[*] Generating ATT&CK Navigator layer...\")\n    layer = generate_navigator_layer(inventory, exec_logs, det_results)\n    with open(args.output_layer, \"w\") as f:\n        json.dump(layer, f, indent=2)\n    print(f\"[+] Navigator layer saved to {args.output_layer}\")\n    print(f\"    Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\")\n```\n\n### Step 6: Run Continuous Atomic Testing Pipeline\n\nSchedule recurring tests against priority techniques:\n\n```powershell\n# Continuous Atomic Testing - scheduled execution with validation\n# Run as a scheduled task or via CI\u002FCD pipeline\n\n$PriorityTechniques = @(\n    # Top MITRE ATT&CK techniques by prevalence (Red Canary Threat Detection Report)\n    @{ Id = \"T1059.001\"; Name = \"PowerShell\" },\n    @{ Id = \"T1059.003\"; Name = \"Windows Command Shell\" },\n    @{ Id = \"T1547.001\"; Name = \"Registry Run Keys\" },\n    @{ Id = \"T1053.005\"; Name = \"Scheduled Task\" },\n    @{ Id = \"T1003.001\"; Name = \"LSASS Memory\" },\n    @{ Id = \"T1003.003\"; Name = \"NTDS\" },\n    @{ Id = \"T1070.004\"; Name = \"File Deletion\" },\n    @{ Id = \"T1218.011\"; Name = \"Rundll32\" },\n    @{ Id = \"T1082\";     Name = \"System Information Discovery\" },\n    @{ Id = \"T1105\";     Name = \"Ingress Tool Transfer\" }\n)\n\n$ResultsLog = @()\n$RunTimestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n\nforeach ($technique in $PriorityTechniques) {\n    Write-Host \"`n[*] Testing $($technique.Id) - $($technique.Name)\" -ForegroundColor Cyan\n\n    # Check prerequisites\n    try {\n        $prereqs = Invoke-AtomicTest $technique.Id -TestNumbers 1 -CheckPrereqs 2>&1\n        $prereqsMet = $prereqs -notmatch \"not met\"\n    } catch {\n        $prereqsMet = $false\n    }\n\n    if (-not $prereqsMet) {\n        Write-Host \"    [!] Prerequisites not met, attempting install...\" -ForegroundColor Yellow\n        try {\n            Invoke-AtomicTest $technique.Id -TestNumbers 1 -GetPrereqs 2>&1 | Out-Null\n        } catch {\n            Write-Host \"    [!] Prereq install failed, skipping\" -ForegroundColor Red\n            $ResultsLog += [PSCustomObject]@{\n                TechniqueId = $technique.Id\n                Name        = $technique.Name\n                Status      = \"PREREQS_FAILED\"\n                Timestamp   = (Get-Date).ToString(\"o\")\n            }\n            continue\n        }\n    }\n\n    # Execute the test\n    try {\n        $startTime = Get-Date\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Confirm:$false\n        $endTime = Get-Date\n        $duration = ($endTime - $startTime).TotalSeconds\n\n        Write-Host \"    [+] Executed successfully (${duration}s)\" -ForegroundColor Green\n\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"EXECUTED\"\n            Duration    = $duration\n            Timestamp   = $startTime.ToString(\"o\")\n        }\n    } catch {\n        Write-Host \"    [-] Execution failed: $($_.Exception.Message)\" -ForegroundColor Red\n        $ResultsLog += [PSCustomObject]@{\n            TechniqueId = $technique.Id\n            Name        = $technique.Name\n            Status      = \"FAILED\"\n            Error       = $_.Exception.Message\n            Timestamp   = (Get-Date).ToString(\"o\")\n        }\n    }\n\n    # Cleanup\n    try {\n        Invoke-AtomicTest $technique.Id -TestNumbers 1 -Cleanup 2>&1 | Out-Null\n        Write-Host \"    [+] Cleanup completed\" -ForegroundColor DarkGray\n    } catch {\n        Write-Host \"    [!] Cleanup failed\" -ForegroundColor Yellow\n    }\n\n    # Brief pause between tests for log ingestion\n    Start-Sleep -Seconds 10\n}\n\n# Export results\n$ResultsLog | Export-Csv \"C:\\AtomicRedTeam\\logs\\continuous_test_$RunTimestamp.csv\" -NoTypeInformation\n$ResultsLog | Format-Table -AutoSize\n\n# Summary\n$executed = ($ResultsLog | Where-Object Status -eq \"EXECUTED\").Count\n$failed = ($ResultsLog | Where-Object Status -ne \"EXECUTED\").Count\nWrite-Host \"`n=== CONTINUOUS TEST SUMMARY ===\" -ForegroundColor Cyan\nWrite-Host \"  Executed: $executed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Green\nWrite-Host \"  Failed:   $failed \u002F $($PriorityTechniques.Count)\" -ForegroundColor Red\n```\n\n### Step 7: Detection Validation Loop\n\nClose the purple team loop by correlating tests with detections and iterating:\n\n```\nDetection Validation Loop Workflow:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n  ┌──────────────────┐\n  │ 1. SELECT        │  Choose technique from threat intel or gap report\n  │    TECHNIQUE     │  Map to Atomic Red Team test ID\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 2. EXECUTE       │  Run Invoke-AtomicTest with logging\n  │    ATOMIC TEST   │  Record timestamp, hostname, test details\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 3. WAIT FOR      │  Allow 30-60 seconds for log ingestion\n  │    INGESTION     │  Ensure Sysmon, WinEventLog, EDR agents forward data\n  └───────┬──────────┘\n          │\n  ┌───────▼──────────┐\n  │ 4. QUERY SIEM    │  Search for correlated alerts matching technique\n  │    FOR ALERTS    │  Check: Did our detection rules fire?\n  └───────┬──────────┘\n          │\n     ┌────┴────┐\n     │DETECTED?│\n     └────┬────┘\n    YES   │   NO\n  ┌───────▼──────────┐   ┌──────────────────┐\n  │ 5a. MARK GREEN   │   │ 5b. WRITE NEW    │\n  │  Update Navigator│   │  Sigma\u002FSIEM Rule │\n  │  layer, log pass │   │  for technique   │\n  └───────┬──────────┘   └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5c. DEPLOY RULE  │\n          │               │  Push to SIEM    │\n          │               └───────┬──────────┘\n          │                       │\n          │               ┌───────▼──────────┐\n          │               │ 5d. RE-EXECUTE   │\n          │               │  Re-run atomic   │\n          │               │  test, validate  │\n          │               └───────┬──────────┘\n          │                       │\n  ┌───────▼───────────────────────▼──┐\n  │ 6. CLEANUP                       │\n  │    Run Invoke-AtomicTest -Cleanup│\n  │    Document results              │\n  └───────┬──────────────────────────┘\n          │\n  ┌───────▼──────────┐\n  │ 7. NEXT          │  Select next technique\n  │    TECHNIQUE     │  Repeat from step 1\n  └──────────────────┘\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Atomic Red Team** | Open-source library by Red Canary containing small, focused tests mapped to MITRE ATT&CK techniques for validating detection capabilities |\n| **Invoke-AtomicRedTeam** | PowerShell execution framework for running atomic tests locally or remotely, with prereq checking and cleanup |\n| **ATT&CK Navigator** | Web-based tool for annotating and visualizing MITRE ATT&CK matrices as layered heatmaps showing detection coverage |\n| **Navigator Layer** | JSON file defining colors, scores, and comments for each ATT&CK technique; used to generate coverage heatmaps |\n| **Detection Validation Loop** | Iterative purple team process: execute attack, check for detection, write\u002Ftune rule if missed, re-execute to confirm |\n| **Coverage Gap** | ATT&CK technique where no detection rule exists or where the rule fails to fire when the technique is executed |\n| **Blind Spot** | Technique that was tested via atomic execution but produced zero SIEM alerts, indicating a critical detection failure |\n| **Sigma Rule** | Vendor-agnostic detection rule format that can be converted to Splunk SPL, Elastic KQL, Microsoft KQL, and other SIEM queries |\n| **Purple Team** | Collaborative security exercise where red team executes known techniques and blue team validates and improves detections in real time |\n| **Continuous Atomic Testing** | Scheduled, automated execution of atomic tests to validate that detection rules remain functional as environments change |\n\n## Tools & Systems\n\n- **Invoke-AtomicRedTeam**: PowerShell module for executing Atomic Red Team tests with prereq management and cleanup\n- **Atomic Red Team Atomics**: Library of 700+ tests across 200+ MITRE ATT&CK techniques, organized by technique ID\n- **ATT&CK Navigator**: Web tool at mitre-attack.github.io\u002Fattack-navigator for creating technique coverage heatmaps\n- **VECTR**: Purple team reporting platform by SCYTHE for tracking test campaigns, results, and coverage over time\n- **Sigma**: Generic signature format for SIEM systems; convert with sigmac or pySigma to target SIEM platforms\n- **Splunk \u002F Elastic \u002F Microsoft Sentinel**: SIEM platforms for querying detection results after atomic test execution\n- **Sysmon**: Windows system monitoring driver providing detailed process, network, registry, and file telemetry\n- **Caldera**: MITRE-developed adversary emulation platform for automated, multi-step attack chains beyond single atomic tests\n\n## Common Scenarios\n\n### Scenario: Validating Credential Access Detections After EDR Deployment\n\n**Context**: The organization deployed a new EDR agent and needs to verify it detects credential dumping techniques (LSASS access, NTDS extraction, SAM dump). The purple team must confirm detections are working before closing the deployment ticket.\n\n**Approach**:\n1. Install Invoke-AtomicRedTeam on a test endpoint enrolled in the new EDR\n2. Execute credential access atomics: T1003.001 (LSASS Memory), T1003.002 (SAM), T1003.003 (NTDS)\n3. Wait 60 seconds, then query EDR console and SIEM for alerts on the test hostname\n4. For each technique: mark as DETECTED (green) or BLIND SPOT (red) in the Navigator layer\n5. For blind spots, create Sigma rules targeting Sysmon EventCode 10 (ProcessAccess to lsass.exe) and EventCode 1 (known dumping tools)\n6. Deploy rules, re-run atomics, confirm detection\n7. Export Navigator layer and coverage report for the deployment ticket\n\n**Pitfalls**:\n- Running credential dumping atomics without local admin privileges (tests will fail silently)\n- Forgetting to enable Sysmon ProcessAccess logging (EventCode 10) which is disabled by default\n- Not running cleanup, leaving test artifacts (created accounts, registry keys, scheduled tasks)\n- Testing only one sub-technique of T1003 and assuming all credential access is covered\n- Not accounting for EDR agent exclusions that may whitelist PowerShell or the AtomicRedTeam directory\n\n### Scenario: Building Monthly ATT&CK Coverage Reporting for Leadership\n\n**Context**: The CISO requires monthly metrics on detection coverage mapped to MITRE ATT&CK. The security team needs to run recurring tests, track improvements, and produce a visual heatmap showing coverage growth over time.\n\n**Approach**:\n1. Define a test plan covering the top 50 ATT&CK techniques from Red Canary Threat Detection Report\n2. Schedule continuous atomic testing via Windows Task Scheduler running the PowerShell pipeline weekly\n3. Export execution logs and SIEM detection query results to JSON after each run\n4. Run the Python gap analysis script to produce Navigator layer and coverage report\n5. Import the Navigator layer into ATT&CK Navigator, screenshot for executive slide deck\n6. Track month-over-month: number of green (detected) vs. red (blind spot) techniques\n7. Prioritize detection engineering sprints on the highest-impact blind spots\n\n**Pitfalls**:\n- Counting \"logged\" as \"detected\" (seeing an event in logs is not the same as having an alert rule)\n- Not updating the atomics repository (new tests are added frequently)\n- Focusing only on technique count rather than detection quality (a noisy rule with 90% false positives is worse than no rule)\n- Not involving the SOC analysts who will triage the alerts in the validation process\n\n## Output Format\n\n```\nPURPLE TEAM ATOMIC TESTING REPORT\n====================================\nCampaign:         Q1 2026 Detection Validation\nDate Range:       2026-01-15 to 2026-03-15\nTest Environment: YOURLAB-WIN10-01, YOURLAB-SRV-01\nSIEM:             Splunk Enterprise 9.x\n\nEXECUTION SUMMARY\nTechniques Tested:        47 \u002F 200+ available\nIndividual Tests Run:     112\nTests Succeeded:          104\nTests Failed (prereqs):   8\nCleanup Completed:        104 \u002F 104\n\nDETECTION COVERAGE\n                            Tested    Detected    Coverage\nExecution:                     12          10       83.3%\nPersistence:                    8           5       62.5%\nCredential Access:              6           4       66.7%\nDefense Evasion:               10           3       30.0%\nDiscovery:                      5           5      100.0%\nLateral Movement:               3           1       33.3%\nCommand and Control:            2           1       50.0%\nExfiltration:                   1           0        0.0%\n\nCRITICAL BLIND SPOTS\n[!] T1218.011 - Rundll32          (defense-evasion)\n[!] T1218.005 - Mshta             (defense-evasion)\n[!] T1070.004 - File Deletion     (defense-evasion)\n[!] T1574.001 - DLL Search Order  (persistence)\n[!] T1021.002 - SMB\u002FAdmin Shares  (lateral-movement)\n[!] T1048.003 - Exfil Over HTTP   (exfiltration)\n\nNAVIGATOR LAYER: coverage_layer_20260315.json\n  Import at: https:\u002F\u002Fmitre-attack.github.io\u002Fattack-navigator\u002F\n\nRECOMMENDATIONS\n[CRITICAL] Write Sigma rules for 6 blind spot techniques\n[HIGH]     Expand defense-evasion testing (30% coverage)\n[HIGH]     Enable exfiltration monitoring data sources\n[MEDIUM]   Increase lateral movement test coverage (3 of 7 tested)\n```\n",{"name":5,"tags":24,"author":30,"domain":31,"license":14,"version":32,"nist_csf":33,"subdomain":25,"description":37,"nist_ai_rmf":38,"mitre_attack":42,"atlas_techniques":46,"d3fend_techniques":50},[25,26,27,28,29],"purple-team","atomic-red-team","mitre-attack","detection-engineering","adversary-emulation","mukul975","cybersecurity","1.0.0",[34,35,36],"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",[39,40,41],"MEASURE-2.7","MAP-5.1","MANAGE-2.4",[43,44,45],"T1078","T1190","T1059",[47,48,49],"AML.T0070","AML.T0066","AML.T0082",[51,52,53,54,55],"Executable Denylisting","Execution Isolation","File Metadata Consistency Validation","Content Format Conversion","File Content Analysis","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-purple-team-atomic-testing","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill performing-purple-team-atomic-testing",{"tool":68,"command":69},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill performing-purple-team-atomic-testing",{"tool":71,"command":72},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill performing-purple-team-atomic-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002FSKILL.md",true,[76,80,86],{"path":77,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fapi-reference.md","REFERENCE","参考文档",8255,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002Freferences\u002Fapi-reference.md",{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fagent.py","SCRIPT","脚本",32727,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-purple-team-atomic-testing\u002Fscripts\u002Fagent.py",[93,101,108,115,122,129],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]