[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E62GXAPEZTMSX248N10YHT":3,"skill-same:01M7E62GXAPEZTMSX248N10YHT":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M7E62GXAPEZTMSX248N10YHT","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.","sanjeevafk\u002Fagent-skills","sanjeevafk","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F230678117?v=4","01M7C540EFY46ETG1NNWKS5X3Q","Sanjeev","01M7C540F366J5C1D587BMKH9Q",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-purple-team-exercise\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-purple-team-exercise\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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":25,"author":33,"domain":34,"license":15,"version":35,"nist_csf":36,"subdomain":41,"description":42,"mitre_attack":43,"d3fend_techniques":48},[26,27,28,29,30,31,32],"soc","purple-team","red-team","blue-team","mitre-attack","adversary-emulation","detection-validation","mahipal","cybersecurity","1.0",[37,38,39,40],"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",[44,45,46,47],"T1078","T1685.002","T1685.005","T1566",[49,50,51,52,53],"File Metadata Consistency Validation","Application Protocol Command Analysis","Identifier Analysis","Content Format Conversion","Message Analysis","main","4e084e84eb42fc53e144c89c0f7f48b39c8a4b0f","collections\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-purple-team-exercise",1,"https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills","https:\u002F\u002Fgithub.com\u002Fsanjeevafk","First make it work. Then make it right. Then make it fast.","2026-11-14 13:36:16",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add sanjeevafk\u002Fagent-skills --skill performing-purple-team-exercise",{"tool":68,"command":69},"bunx","bunx skills add sanjeevafk\u002Fagent-skills --skill performing-purple-team-exercise",{"tool":71,"command":72},"pnpm","pnpm dlx skills add sanjeevafk\u002Fagent-skills --skill performing-purple-team-exercise","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-purple-team-exercise\u002FSKILL.md",true,[76,80,86],{"path":77,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fapi-reference.md","REFERENCE","参考文档",1681,"https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-purple-team-exercise\u002Freferences\u002Fapi-reference.md",{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fagent.py","SCRIPT","脚本",7878,"https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-purple-team-exercise\u002Fscripts\u002Fagent.py",[93,101,109,117,125,132],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M7EFHX67M3KKXT1BXVPA5ADT","zarr-python","Chunked N-D arrays for cloud storage (Zarr-Python 3). Compressed arrays, parallel I\u002FO, S3\u002FGCS via fsspec, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","MIT","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":20},"01M7EFFQGM51TZBGRENXY50ZYM","whiteboard-diagrams","Create accurate, simple, hand-drawn whiteboard diagrams from a user's process, system, architecture, learning workflow, comparison, or causal explanation. Use when the user asks for a scribbly whiteboard visual, educational workflow graphic, hand-drawn explainer, or diagram like the bundled reference; ask one focused clarification question when the subject or relationships are missing, then generate and visually verify the final image.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwhiteboard-diagrams\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwhiteboard-diagrams\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":20},"01M7EFF1CSQNTDMHFK4ZGY6NYK","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":20},"01M7EFE8106X6C28FT8PA74427","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":20},"01M7EFCSNZM9G7ZHS6F127Q71X","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":136,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":20},"01M7EFCE7EZMKPRYDDNKBQ9EEH","vercel-deploy","Deploy applications and websites to Vercel. Use when the user requests deployment actions like \"deploy my app\", \"deploy and give me the link\", \"push this live\", or \"create a preview deployment\".","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-deploy\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-deploy\u002FSKILL.md",[],[]]