[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EW28M6GKH0YN6ZKWEBWKV0":3,"skill-same:01M6EW28M6GKH0YN6ZKWEBWKV0":107},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":14,"repositoryHtmlUrl":71,"repositoryHomepageUrl":72,"ownerHtmlUrl":73,"ownerBlogUrl":6,"ownerDescription":74,"updatedAt":75,"install":76,"resources":89},"01M6EW28M6GKH0YN6ZKWEBWKV0","performing-purple-team-exercise",null,"Performs purple team exercises by coordinating red team adversary emulation with blue team detection validation using MITRE ATT&CK-mapped attack scenarios, real-time detection testing, and collaborative gap remediation. Use when SOC teams need to validate detection capabilities, improve analyst skills, and close detection gaps through structured offensive-defensive collaboration.","henriquescastilho\u002Fmy-claude","henriquescastilho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153296945?v=4","01M6ESH7EXPXTH9CVQ4K16SRG8","Henrique Scheer","01M6ESH7JHEK2PTNNH4HEH787Z",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-purple-team-exercise\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"team","exercise","performing purple team exercise","de","testing","time","message","conversion","cm","command","improve","analysis","t1566","t1078","blue-team","purple-team","soc","mitre-attack","capabilities","cybersecurity","2026-11-10 10:12:30",false,"---\nname: performing-purple-team-exercise\ndescription: 'Performs purple team exercises by coordinating red team adversary emulation\n  with blue team detection validation using MITRE ATT&CK-mapped attack scenarios,\n  real-time detection testing, and collaborative gap remediation. Use when SOC teams\n  need to validate detection capabilities, improve analyst skills, and close detection\n  gaps through structured offensive-defensive collaboration.\n\n  '\ndomain: cybersecurity\nsubdomain: soc-operations\ntags:\n- soc\n- purple-team\n- red-team\n- blue-team\n- mitre-attack\n- adversary-emulation\n- detection-validation\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nd3fend_techniques:\n- File Metadata Consistency Validation\n- Application Protocol Command Analysis\n- Identifier Analysis\n- Content Format Conversion\n- Message Analysis\nnist_csf:\n- DE.CM-01\n- DE.AE-02\n- RS.MA-01\n- DE.AE-06\nmitre_attack:\n- T1078\n- T1685.002\n- T1685.005\n- T1566\n---\n# Performing Purple Team Exercise\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to validate that detection rules actually fire for the threats they target\n- Red team assessments produced findings that need translation into detection improvements\n- New detection tools or SIEM migrations require validation of detection coverage\n- Analyst training requires hands-on experience with real attack techniques and SIEM responses\n- Quarterly or semi-annual detection validation cycles are scheduled\n\n**Do not use** for unannounced red team engagements — purple team exercises require explicit coordination between offensive and defensive teams with real-time collaboration.\n\n## Prerequisites\n\n- Red team capability: internal team or contracted purple team operator\n- Attack simulation tools: Atomic Red Team, MITRE Caldera, or C2 framework (authorized)\n- SIEM access for real-time alert monitoring during exercise\n- ATT&CK-mapped detection rule inventory with expected alert names\n- Isolated test environment or approved production scope with change management approval\n- Communication channel (Slack\u002FTeams) for real-time red-blue coordination\n\n## Workflow\n\n### Step 1: Define Exercise Scope and Objectives\n\nDocument exercise parameters:\n\n```yaml\npurple_team_exercise:\n  exercise_id: PT-2024-Q1\n  date: 2024-03-20\n  duration: 8 hours (09:00-17:00 UTC)\n  scope:\n    environment: Production (Finance VLAN, 10.0.5.0\u002F24)\n    systems_in_scope:\n      - WORKSTATION-TEST01 (10.0.5.100) — Test endpoint\n      - DC-TEST (10.0.5.200) — Test domain controller\n      - FILESERVER-TEST (10.0.5.201) — Test file server\n    systems_excluded:\n      - All production domain controllers\n      - Customer-facing systems\n  objectives:\n    - Validate 15 detection rules mapped to FIN7 TTPs\n    - Test SOC analyst response to real attack indicators\n    - Identify detection gaps for credential access and lateral movement\n    - Measure detection latency for each technique\n  threat_scenario: FIN7 campaign targeting financial data via spearphishing\n  authorization: Approved by CISO, Change Request CR-2024-0567\n  communication: #purple-team-2024q1 Slack channel\n```\n\n### Step 2: Build ATT&CK-Mapped Test Plan\n\nCreate technique-by-technique test matrix:\n\n| # | ATT&CK ID | Technique | Test Tool | Expected Detection | Blue Team Metric |\n|---|-----------|-----------|-----------|-------------------|------------------|\n| 1 | T1566.001 | Spearphishing Attachment | Manual email | Email gateway alert | Detection Y\u002FN, latency |\n| 2 | T1204.002 | User Execution | Macro document | Sysmon process creation | Detection Y\u002FN, latency |\n| 3 | T1059.001 | PowerShell | Atomic RT #1-3 | PowerShell execution alert | Detection Y\u002FN, latency |\n| 4 | T1053.005 | Scheduled Task | Atomic RT | Scheduled task creation alert | Detection Y\u002FN, latency |\n| 5 | T1547.001 | Registry Run Keys | Atomic RT | Registry modification alert | Detection Y\u002FN, latency |\n| 6 | T1003.001 | LSASS Memory | Mimikatz | Credential dumping alert | Detection Y\u002FN, latency |\n| 7 | T1550.002 | Pass-the-Hash | Mimikatz | NTLM anomaly detection | Detection Y\u002FN, latency |\n| 8 | T1021.002 | SMB\u002FPsExec | PsExec | PsExec service creation alert | Detection Y\u002FN, latency |\n| 9 | T1047 | WMI | wmic \u002Fnode | WMI remote execution alert | Detection Y\u002FN, latency |\n| 10| T1021.001 | RDP | xfreerdp | RDP lateral movement alert | Detection Y\u002FN, latency |\n| 11| T1071.001 | Web C2 | Cobalt Strike | C2 beacon detection | Detection Y\u002FN, latency |\n| 12| T1041 | Exfiltration C2 | Rclone | Data exfiltration alert | Detection Y\u002FN, latency |\n| 13| T1490 | Inhibit Recovery | vssadmin | Shadow copy deletion alert | Detection Y\u002FN, latency |\n| 14| T1486 | Data Encrypted | Test encryption | Mass encryption detection | Detection Y\u002FN, latency |\n| 15| T1070.001 | Clear Logs | wevtutil | Log clearing detection | Detection Y\u002FN, latency |\n\n### Step 3: Execute Red Team Techniques\n\nRun each technique with Atomic Red Team (or manual execution):\n\n```powershell\n# Install Atomic Red Team\nIEX (IWR 'https:\u002F\u002Fraw.githubusercontent.com\u002Fredcanaryco\u002Finvoke-atomicredteam\u002Fmaster\u002Finstall-atomicredteam.ps1' -UseBasicParsing)\nInstall-AtomicRedTeam -getAtomics\n\n# Test 1: T1059.001 — PowerShell Execution\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1059.001 - PowerShell\"\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n# Notify blue team: \"T1059.001 executed at $(Get-Date)\"\n\n# Test 2: T1053.005 — Scheduled Task Creation\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1053.005 - Scheduled Task\"\nInvoke-AtomicTest T1053.005 -TestNumbers 1\n\n# Test 3: T1547.001 — Registry Run Key\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1547.001 - Registry Persistence\"\nInvoke-AtomicTest T1547.001 -TestNumbers 1,2\n\n# Test 4: T1003.001 — Credential Dumping\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1003.001 - LSASS Access\"\nInvoke-AtomicTest T1003.001 -TestNumbers 1,2\n\n# Test 5: T1490 — Shadow Copy Deletion\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1490 - Inhibit Recovery\"\nInvoke-AtomicTest T1490 -TestNumbers 1\n\n# Cleanup after each test\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup\nInvoke-AtomicTest T1053.005 -TestNumbers 1 -Cleanup\nInvoke-AtomicTest T1547.001 -TestNumbers 1,2 -Cleanup\n```\n\n### Step 4: Monitor Blue Team Detection in Real-Time\n\nBlue team monitors SIEM during execution:\n\n```spl\n--- Real-time purple team monitoring dashboard\nindex=notable earliest=-1h\n| where Computer IN (\"WORKSTATION-TEST01\", \"DC-TEST\", \"FILESERVER-TEST\")\n  OR src IN (\"10.0.5.100\", \"10.0.5.200\", \"10.0.5.201\")\n| eval detection_latency = _time - orig_time\n| eval latency_seconds = round(detection_latency, 0)\n| sort _time\n| table _time, rule_name, urgency, src, dest, user, latency_seconds\n\n--- Check specific technique detection\nindex=sysmon Computer=\"WORKSTATION-TEST01\" earliest=-15m\n(EventCode=1 OR EventCode=3 OR EventCode=10 OR EventCode=11 OR EventCode=13)\n| sort _time\n| table _time, EventCode, Image, CommandLine, TargetFilename, TargetObject\n```\n\nRecord results in real-time:\n\n```python\nexercise_results = {\n    \"exercise_id\": \"PT-2024-Q1\",\n    \"results\": [\n        {\n            \"technique\": \"T1059.001\",\n            \"name\": \"PowerShell Execution\",\n            \"execution_time\": \"09:15:00\",\n            \"detected\": True,\n            \"alert_name\": \"Suspicious PowerShell Encoded Command\",\n            \"detection_time\": \"09:15:47\",\n            \"latency_seconds\": 47,\n            \"notes\": \"Detected via Sysmon EventCode 1 with encoded command pattern\"\n        },\n        {\n            \"technique\": \"T1003.001\",\n            \"name\": \"LSASS Memory Access\",\n            \"execution_time\": \"10:30:00\",\n            \"detected\": False,\n            \"alert_name\": None,\n            \"detection_time\": None,\n            \"latency_seconds\": None,\n            \"notes\": \"GAP: No detection rule for LSASS access. Sysmon EventCode 10 present but no correlation rule.\"\n        }\n    ]\n}\n```\n\n### Step 5: Collaborative Gap Remediation\n\nFor each gap, the blue team builds detection rules immediately:\n\n```spl\n--- Gap: T1003.001 — No LSASS access detection\n--- Build rule during exercise\nindex=sysmon EventCode=10 TargetImage=\"*\\\\lsass.exe\"\nGrantedAccess IN (\"0x1010\", \"0x1038\", \"0x1fffff\", \"0x40\")\nNOT SourceImage IN (\"*\\\\svchost.exe\", \"*\\\\csrss.exe\", \"*\\\\MsMpEng.exe\")\n| stats count by Computer, SourceImage, SourceUser, GrantedAccess\n| where count > 0\n```\n\nAfter building, re-test:\n```\nRed Team: \"Re-executing T1003.001 at 11:45\"\nBlue Team: \"Confirmed — alert 'LSASS Memory Access Detected' fired at 11:45:32 (32s latency)\"\nResult: GAP CLOSED\n```\n\n### Step 6: Generate Exercise Report\n\n```python\ndef generate_purple_team_report(results):\n    total = len(results[\"results\"])\n    detected = sum(1 for r in results[\"results\"] if r[\"detected\"])\n    gaps = sum(1 for r in results[\"results\"] if not r[\"detected\"])\n    avg_latency = sum(r[\"latency_seconds\"] for r in results[\"results\"]\n                      if r[\"latency_seconds\"]) \u002F max(detected, 1)\n\n    report = f\"\"\"\nPURPLE TEAM EXERCISE REPORT — {results['exercise_id']}\n{'=' * 60}\n\nSUMMARY:\n  Techniques Tested:     {total}\n  Detected:              {detected} ({detected\u002Ftotal*100:.0f}%)\n  Gaps Identified:       {gaps} ({gaps\u002Ftotal*100:.0f}%)\n  Avg Detection Latency: {avg_latency:.0f} seconds\n\nDETAILED RESULTS:\n\"\"\"\n    for r in results[\"results\"]:\n        status = \"DETECTED\" if r[\"detected\"] else \"GAP\"\n        latency = f\"{r['latency_seconds']}s\" if r[\"latency_seconds\"] else \"N\u002FA\"\n        report += f\"  [{status}] {r['technique']} — {r['name']} (Latency: {latency})\\n\"\n        if not r[\"detected\"]:\n            report += f\"          Action: {r['notes']}\\n\"\n\n    return report\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **Purple Team** | Collaborative exercise where red (offensive) and blue (defensive) teams work together to validate and improve detection |\n| **Adversary Emulation** | Structured simulation of specific threat actor TTPs for testing defensive capabilities |\n| **Detection Validation** | Process of confirming that detection rules fire correctly when the targeted technique is executed |\n| **Detection Latency** | Time between technique execution and SIEM alert generation — measured during purple team exercises |\n| **Gap Remediation** | Immediate creation or tuning of detection rules for techniques that were not detected during testing |\n| **Atomic Red Team** | Open-source library of small, focused tests for individual ATT&CK techniques |\n\n## Tools & Systems\n\n- **Atomic Red Team**: Open-source attack test library from Red Canary for technique-by-technique validation\n- **MITRE Caldera**: Automated adversary emulation platform supporting ATT&CK-mapped attack chains\n- **Vectr**: Purple team management platform for tracking exercise results and detection coverage improvements\n- **Prelude Operator**: Adversary emulation tool supporting automated multi-step attack scenarios\n- **AttackIQ**: Breach and Attack Simulation (BAS) platform for continuous detection validation\n\n## Common Scenarios\n\n- **Quarterly Validation**: Test top 20 detection rules against ATT&CK techniques to ensure continued effectiveness\n- **New Tool Validation**: After deploying new EDR, validate detection coverage against baseline techniques\n- **Analyst Training**: Junior analysts observe real attacks in real-time with expert guidance on SIEM investigation\n- **Post-Incident Validation**: After a real incident, emulate the attack chain to verify detection improvements\n- **Compliance Evidence**: Document detection validation results for SOC 2, ISO 27001, or PCI DSS audits\n\n## Output Format\n\n```\nPURPLE TEAM EXERCISE REPORT — PT-2024-Q1\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nDate:         2024-03-20 (09:00-17:00 UTC)\nScenario:     FIN7 Financial Sector Campaign\nScope:        Finance VLAN (10.0.5.0\u002F24)\n\nRESULTS:\n  Techniques Tested:     15\n  Detected:              11 (73%)\n  Gaps Identified:       4 (27%)\n  Gaps Remediated Same Day: 3\n  Avg Detection Latency: 38 seconds\n\nDETAILED RESULTS:\n  [PASS]  T1566.001 Spearphishing Attachment      — 12s latency\n  [PASS]  T1204.002 User Execution (Macro)         — 8s latency\n  [PASS]  T1059.001 PowerShell Execution            — 47s latency\n  [PASS]  T1053.005 Scheduled Task                  — 23s latency\n  [PASS]  T1547.001 Registry Run Keys               — 31s latency\n  [FAIL]  T1003.001 LSASS Memory Access             — REMEDIATED during exercise\n  [FAIL]  T1550.002 Pass-the-Hash                   — REMEDIATED during exercise\n  [PASS]  T1021.002 PsExec                          — 15s latency\n  [PASS]  T1047 WMI Remote Execution                — 42s latency\n  [PASS]  T1021.001 RDP Lateral Movement            — 28s latency\n  [FAIL]  T1071.001 Web C2 Beaconing                — REMEDIATED during exercise\n  [PASS]  T1041 Exfiltration over C2                — 67s latency\n  [PASS]  T1490 Shadow Copy Deletion                — 5s latency\n  [FAIL]  T1486 Data Encryption for Impact          — OPEN — requires endpoint telemetry\n  [PASS]  T1070.001 Event Log Clearing              — 11s latency\n\nPOST-EXERCISE COVERAGE: 93% (14\u002F15) — up from 73% at start\nREMAINING GAP: T1486 requires EDR file monitoring enhancement\n```\n","# Performing Purple Team Exercise\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to validate that detection rules actually fire for the threats they target\n- Red team assessments produced findings that need translation into detection improvements\n- New detection tools or SIEM migrations require validation of detection coverage\n- Analyst training requires hands-on experience with real attack techniques and SIEM responses\n- Quarterly or semi-annual detection validation cycles are scheduled\n\n**Do not use** for unannounced red team engagements — purple team exercises require explicit coordination between offensive and defensive teams with real-time collaboration.\n\n## Prerequisites\n\n- Red team capability: internal team or contracted purple team operator\n- Attack simulation tools: Atomic Red Team, MITRE Caldera, or C2 framework (authorized)\n- SIEM access for real-time alert monitoring during exercise\n- ATT&CK-mapped detection rule inventory with expected alert names\n- Isolated test environment or approved production scope with change management approval\n- Communication channel (Slack\u002FTeams) for real-time red-blue coordination\n\n## Workflow\n\n### Step 1: Define Exercise Scope and Objectives\n\nDocument exercise parameters:\n\n```yaml\npurple_team_exercise:\n  exercise_id: PT-2024-Q1\n  date: 2024-03-20\n  duration: 8 hours (09:00-17:00 UTC)\n  scope:\n    environment: Production (Finance VLAN, 10.0.5.0\u002F24)\n    systems_in_scope:\n      - WORKSTATION-TEST01 (10.0.5.100) — Test endpoint\n      - DC-TEST (10.0.5.200) — Test domain controller\n      - FILESERVER-TEST (10.0.5.201) — Test file server\n    systems_excluded:\n      - All production domain controllers\n      - Customer-facing systems\n  objectives:\n    - Validate 15 detection rules mapped to FIN7 TTPs\n    - Test SOC analyst response to real attack indicators\n    - Identify detection gaps for credential access and lateral movement\n    - Measure detection latency for each technique\n  threat_scenario: FIN7 campaign targeting financial data via spearphishing\n  authorization: Approved by CISO, Change Request CR-2024-0567\n  communication: #purple-team-2024q1 Slack channel\n```\n\n### Step 2: Build ATT&CK-Mapped Test Plan\n\nCreate technique-by-technique test matrix:\n\n| # | ATT&CK ID | Technique | Test Tool | Expected Detection | Blue Team Metric |\n|---|-----------|-----------|-----------|-------------------|------------------|\n| 1 | T1566.001 | Spearphishing Attachment | Manual email | Email gateway alert | Detection Y\u002FN, latency |\n| 2 | T1204.002 | User Execution | Macro document | Sysmon process creation | Detection Y\u002FN, latency |\n| 3 | T1059.001 | PowerShell | Atomic RT #1-3 | PowerShell execution alert | Detection Y\u002FN, latency |\n| 4 | T1053.005 | Scheduled Task | Atomic RT | Scheduled task creation alert | Detection Y\u002FN, latency |\n| 5 | T1547.001 | Registry Run Keys | Atomic RT | Registry modification alert | Detection Y\u002FN, latency |\n| 6 | T1003.001 | LSASS Memory | Mimikatz | Credential dumping alert | Detection Y\u002FN, latency |\n| 7 | T1550.002 | Pass-the-Hash | Mimikatz | NTLM anomaly detection | Detection Y\u002FN, latency |\n| 8 | T1021.002 | SMB\u002FPsExec | PsExec | PsExec service creation alert | Detection Y\u002FN, latency |\n| 9 | T1047 | WMI | wmic \u002Fnode | WMI remote execution alert | Detection Y\u002FN, latency |\n| 10| T1021.001 | RDP | xfreerdp | RDP lateral movement alert | Detection Y\u002FN, latency |\n| 11| T1071.001 | Web C2 | Cobalt Strike | C2 beacon detection | Detection Y\u002FN, latency |\n| 12| T1041 | Exfiltration C2 | Rclone | Data exfiltration alert | Detection Y\u002FN, latency |\n| 13| T1490 | Inhibit Recovery | vssadmin | Shadow copy deletion alert | Detection Y\u002FN, latency |\n| 14| T1486 | Data Encrypted | Test encryption | Mass encryption detection | Detection Y\u002FN, latency |\n| 15| T1070.001 | Clear Logs | wevtutil | Log clearing detection | Detection Y\u002FN, latency |\n\n### Step 3: Execute Red Team Techniques\n\nRun each technique with Atomic Red Team (or manual execution):\n\n```powershell\n# Install Atomic Red Team\nIEX (IWR 'https:\u002F\u002Fraw.githubusercontent.com\u002Fredcanaryco\u002Finvoke-atomicredteam\u002Fmaster\u002Finstall-atomicredteam.ps1' -UseBasicParsing)\nInstall-AtomicRedTeam -getAtomics\n\n# Test 1: T1059.001 — PowerShell Execution\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1059.001 - PowerShell\"\nInvoke-AtomicTest T1059.001 -TestNumbers 1\n# Notify blue team: \"T1059.001 executed at $(Get-Date)\"\n\n# Test 2: T1053.005 — Scheduled Task Creation\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1053.005 - Scheduled Task\"\nInvoke-AtomicTest T1053.005 -TestNumbers 1\n\n# Test 3: T1547.001 — Registry Run Key\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1547.001 - Registry Persistence\"\nInvoke-AtomicTest T1547.001 -TestNumbers 1,2\n\n# Test 4: T1003.001 — Credential Dumping\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1003.001 - LSASS Access\"\nInvoke-AtomicTest T1003.001 -TestNumbers 1,2\n\n# Test 5: T1490 — Shadow Copy Deletion\nWrite-Host \"[$(Get-Date -Format 'HH:mm:ss')] Executing T1490 - Inhibit Recovery\"\nInvoke-AtomicTest T1490 -TestNumbers 1\n\n# Cleanup after each test\nInvoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup\nInvoke-AtomicTest T1053.005 -TestNumbers 1 -Cleanup\nInvoke-AtomicTest T1547.001 -TestNumbers 1,2 -Cleanup\n```\n\n### Step 4: Monitor Blue Team Detection in Real-Time\n\nBlue team monitors SIEM during execution:\n\n```spl\n--- Real-time purple team monitoring dashboard\nindex=notable earliest=-1h\n| where Computer IN (\"WORKSTATION-TEST01\", \"DC-TEST\", \"FILESERVER-TEST\")\n  OR src IN (\"10.0.5.100\", \"10.0.5.200\", \"10.0.5.201\")\n| eval detection_latency = _time - orig_time\n| eval latency_seconds = round(detection_latency, 0)\n| sort _time\n| table _time, rule_name, urgency, src, dest, user, latency_seconds\n\n--- Check specific technique detection\nindex=sysmon Computer=\"WORKSTATION-TEST01\" earliest=-15m\n(EventCode=1 OR EventCode=3 OR EventCode=10 OR EventCode=11 OR EventCode=13)\n| sort _time\n| table _time, EventCode, Image, CommandLine, TargetFilename, TargetObject\n```\n\nRecord results in real-time:\n\n```python\nexercise_results = {\n    \"exercise_id\": \"PT-2024-Q1\",\n    \"results\": [\n        {\n            \"technique\": \"T1059.001\",\n            \"name\": \"PowerShell Execution\",\n            \"execution_time\": \"09:15:00\",\n            \"detected\": True,\n            \"alert_name\": \"Suspicious PowerShell Encoded Command\",\n            \"detection_time\": \"09:15:47\",\n            \"latency_seconds\": 47,\n            \"notes\": \"Detected via Sysmon EventCode 1 with encoded command pattern\"\n        },\n        {\n            \"technique\": \"T1003.001\",\n            \"name\": \"LSASS Memory Access\",\n            \"execution_time\": \"10:30:00\",\n            \"detected\": False,\n            \"alert_name\": None,\n            \"detection_time\": None,\n            \"latency_seconds\": None,\n            \"notes\": \"GAP: No detection rule for LSASS access. Sysmon EventCode 10 present but no correlation rule.\"\n        }\n    ]\n}\n```\n\n### Step 5: Collaborative Gap Remediation\n\nFor each gap, the blue team builds detection rules immediately:\n\n```spl\n--- Gap: T1003.001 — No LSASS access detection\n--- Build rule during exercise\nindex=sysmon EventCode=10 TargetImage=\"*\\\\lsass.exe\"\nGrantedAccess IN (\"0x1010\", \"0x1038\", \"0x1fffff\", \"0x40\")\nNOT SourceImage IN (\"*\\\\svchost.exe\", \"*\\\\csrss.exe\", \"*\\\\MsMpEng.exe\")\n| stats count by Computer, SourceImage, SourceUser, GrantedAccess\n| where count > 0\n```\n\nAfter building, re-test:\n```\nRed Team: \"Re-executing T1003.001 at 11:45\"\nBlue Team: \"Confirmed — alert 'LSASS Memory Access Detected' fired at 11:45:32 (32s latency)\"\nResult: GAP CLOSED\n```\n\n### Step 6: Generate Exercise Report\n\n```python\ndef generate_purple_team_report(results):\n    total = len(results[\"results\"])\n    detected = sum(1 for r in results[\"results\"] if r[\"detected\"])\n    gaps = sum(1 for r in results[\"results\"] if not r[\"detected\"])\n    avg_latency = sum(r[\"latency_seconds\"] for r in results[\"results\"]\n                      if r[\"latency_seconds\"]) \u002F max(detected, 1)\n\n    report = f\"\"\"\nPURPLE TEAM EXERCISE REPORT — {results['exercise_id']}\n{'=' * 60}\n\nSUMMARY:\n  Techniques Tested:     {total}\n  Detected:              {detected} ({detected\u002Ftotal*100:.0f}%)\n  Gaps Identified:       {gaps} ({gaps\u002Ftotal*100:.0f}%)\n  Avg Detection Latency: {avg_latency:.0f} seconds\n\nDETAILED RESULTS:\n\"\"\"\n    for r in results[\"results\"]:\n        status = \"DETECTED\" if r[\"detected\"] else \"GAP\"\n        latency = f\"{r['latency_seconds']}s\" if r[\"latency_seconds\"] else \"N\u002FA\"\n        report += f\"  [{status}] {r['technique']} — {r['name']} (Latency: {latency})\\n\"\n        if not r[\"detected\"]:\n            report += f\"          Action: {r['notes']}\\n\"\n\n    return report\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **Purple Team** | Collaborative exercise where red (offensive) and blue (defensive) teams work together to validate and improve detection |\n| **Adversary Emulation** | Structured simulation of specific threat actor TTPs for testing defensive capabilities |\n| **Detection Validation** | Process of confirming that detection rules fire correctly when the targeted technique is executed |\n| **Detection Latency** | Time between technique execution and SIEM alert generation — measured during purple team exercises |\n| **Gap Remediation** | Immediate creation or tuning of detection rules for techniques that were not detected during testing |\n| **Atomic Red Team** | Open-source library of small, focused tests for individual ATT&CK techniques |\n\n## Tools & Systems\n\n- **Atomic Red Team**: Open-source attack test library from Red Canary for technique-by-technique validation\n- **MITRE Caldera**: Automated adversary emulation platform supporting ATT&CK-mapped attack chains\n- **Vectr**: Purple team management platform for tracking exercise results and detection coverage improvements\n- **Prelude Operator**: Adversary emulation tool supporting automated multi-step attack scenarios\n- **AttackIQ**: Breach and Attack Simulation (BAS) platform for continuous detection validation\n\n## Common Scenarios\n\n- **Quarterly Validation**: Test top 20 detection rules against ATT&CK techniques to ensure continued effectiveness\n- **New Tool Validation**: After deploying new EDR, validate detection coverage against baseline techniques\n- **Analyst Training**: Junior analysts observe real attacks in real-time with expert guidance on SIEM investigation\n- **Post-Incident Validation**: After a real incident, emulate the attack chain to verify detection improvements\n- **Compliance Evidence**: Document detection validation results for SOC 2, ISO 27001, or PCI DSS audits\n\n## Output Format\n\n```\nPURPLE TEAM EXERCISE REPORT — PT-2024-Q1\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nDate:         2024-03-20 (09:00-17:00 UTC)\nScenario:     FIN7 Financial Sector Campaign\nScope:        Finance VLAN (10.0.5.0\u002F24)\n\nRESULTS:\n  Techniques Tested:     15\n  Detected:              11 (73%)\n  Gaps Identified:       4 (27%)\n  Gaps Remediated Same Day: 3\n  Avg Detection Latency: 38 seconds\n\nDETAILED RESULTS:\n  [PASS]  T1566.001 Spearphishing Attachment      — 12s latency\n  [PASS]  T1204.002 User Execution (Macro)         — 8s latency\n  [PASS]  T1059.001 PowerShell Execution            — 47s latency\n  [PASS]  T1053.005 Scheduled Task                  — 23s latency\n  [PASS]  T1547.001 Registry Run Keys               — 31s latency\n  [FAIL]  T1003.001 LSASS Memory Access             — REMEDIATED during exercise\n  [FAIL]  T1550.002 Pass-the-Hash                   — REMEDIATED during exercise\n  [PASS]  T1021.002 PsExec                          — 15s latency\n  [PASS]  T1047 WMI Remote Execution                — 42s latency\n  [PASS]  T1021.001 RDP Lateral Movement            — 28s latency\n  [FAIL]  T1071.001 Web C2 Beaconing                — REMEDIATED during exercise\n  [PASS]  T1041 Exfiltration over C2                — 67s latency\n  [PASS]  T1490 Shadow Copy Deletion                — 5s latency\n  [FAIL]  T1486 Data Encryption for Impact          — OPEN — requires endpoint telemetry\n  [PASS]  T1070.001 Event Log Clearing              — 11s latency\n\nPOST-EXERCISE COVERAGE: 93% (14\u002F15) — up from 73% at start\nREMAINING GAP: T1486 requires EDR file monitoring enhancement\n```\n",{"name":5,"tags":44,"author":48,"domain":38,"license":15,"version":49,"nist_csf":50,"subdomain":55,"description":56,"mitre_attack":57,"d3fend_techniques":62},[35,34,45,33,36,46,47],"red-team","adversary-emulation","detection-validation","mahipal","1.0",[51,52,53,54],"DE.CM-01","DE.AE-02","RS.MA-01","DE.AE-06","soc-operations","Performs purple team exercises by coordinating red team adversary emulation with blue team detection validation using MITRE ATT&CK-mapped attack scenarios, real-time detection testing, and collaborative gap remediation. Use when SOC teams need to validate detection capabilities, improve analyst skills, and close detection gaps through structured offensive-defensive collaboration.\n",[58,59,60,61],"T1078","T1685.002","T1685.005","T1566",[63,64,65,66,67],"File Metadata Consistency Validation","Application Protocol Command Analysis","Identifier Analysis","Content Format Conversion","Message Analysis","main","7925716f065257435fdb12e97f7e52842147d5ad",".claude\u002Fskills\u002Fperforming-purple-team-exercise","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude","https:\u002F\u002Fclaude.com\u002Fclaude-code","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho","Software · Applied AI · Quantitative Modeling · Building with Claude.","2026-06-10 12:24:46",{"source":8,"skillName":5,"commands":77,"prompt":87,"zipAvailable":88},[78,81,84],{"tool":79,"command":80},"npx","npx skills add henriquescastilho\u002Fmy-claude --skill performing-purple-team-exercise",{"tool":82,"command":83},"bunx","bunx skills add henriquescastilho\u002Fmy-claude --skill performing-purple-team-exercise",{"tool":85,"command":86},"pnpm","pnpm dlx skills add henriquescastilho\u002Fmy-claude --skill performing-purple-team-exercise","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-purple-team-exercise\u002FSKILL.md",true,[90,95,101],{"path":91,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-purple-team-exercise\u002FLICENSE",{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fapi-reference.md","REFERENCE","参考文档",1681,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-purple-team-exercise\u002Freferences\u002Fapi-reference.md",{"path":102,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fagent.py","SCRIPT","脚本",7878,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-purple-team-exercise\u002Fscripts\u002Fagent.py",[108,135,140,145,167,191],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":39},"01M6F0B6XPQ65AX2X0DWK8KT3E","markitdown","Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.","MIT","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[],[110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],"docx","PDF","pptx","xlsx","documents","csv","ocr","Audio","Bash","markdown","convert","read","write","edit","html","images","files","youtube","with",{"skillNo":136,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":39},"01M6F06SBHR9F0SDWE282Y8075","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fscientific_writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[],[110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],{"skillNo":141,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":39},"01M6F02D4R14EJAPBWVDF9J9VQ","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[],[110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":39},"01M6F000KS6YB4MKS774G4R8ND","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fzarr-python\u002FSKILL.md",[],[152,153,154,155,156,157,158,159,160,161,162,163,164,165,166],"python","zarr python","storage","integration","s3","gcs","cloud","dask","parallel","pipelines","arrays","numpy","scientific computing","scale","scientific",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":39},"01M6EZZJWFXM1GR78KTW6J0DN8","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fwhat-if-oracle\u002FSKILL.md",[],[174,175,176,177,178,179,30,180,181,182,183,127,128,184,185,186,187,188,189,190],"oracle","what if oracle","go","run","ux","futures","explore","decision","branch","question","idea","exploration","options","stress-test","strategies","scenario","stress",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":39},"01M6EZZCXAEB49RXGQCJX5E8GB","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fvenue-templates\u002FSKILL.md",[],[198,199,200,201,202,203,204,205,124,206,127,128,129,207,208,209,210,211,166,212],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","access","proposals","Academic","requirements","formatting","journal","chi"]