Running a Purple Team Exercise
Planning and executing collaborative tests.
Running a Purple Team Exercise is a free Cyber Security Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The Exercise Lifecycle
A purple team exercise is a structured process, not an ad-hoc hacking session. It follows a repeatable lifecycle:
- Plan — pick objectives, scope, and techniques
- Prepare — confirm telemetry, tooling, and authorization
- Execute — run techniques and observe live
- Analyze — classify outcomes and log gaps
- Improve — tune detections and re-test
- Report — capture metrics and actions
Treating it as a lifecycle is what makes results comparable over time.
Setting Objectives
Start with a clear, threat-informed objective. Vague goals ('test our security') produce vague results.
Good objectives are specific and measurable:
- Validate detection of credential access techniques used by ransomware affiliates
- Confirm visibility across the lateral movement tactic
- Measure mean time to detect for a known intrusion chain
Anchor the objective to a real threat actor or scenario relevant to your organization so the techniques you test are the ones you are likely to face.
Building the Emulation Plan
Translate the objective into an ordered list of techniques with concrete procedures. This is your emulation plan.
Each entry should state the technique ID, the procedure, the expected telemetry, and the hypothesis being tested:
- Technique: T1003.001 LSASS Memory
- Procedure: dump LSASS via a benign test tool
- Expected telemetry: Sysmon Event ID 10 (process access to lsass.exe)
- Hypothesis: EDR alerts on unauthorized LSASS handle access
Authorization and Rules of Engagement
Before anything runs, secure written authorization and document the rules of engagement (ROE). This protects the team legally and operationally.
- Defined scope: hosts, networks, accounts in play
- Time windows and a clear stop condition
- Approved versus prohibited techniques
- Emergency contacts and an abort signal
- Data handling: never exfiltrate real sensitive data
Even cooperative testing can trip alarms or disrupt services, so the ROE must be explicit and signed off by stakeholders.
Preparing the Environment
Confirm the basics work before the live session, otherwise you will waste it debugging logging.
- Verify endpoint agents and Sysmon are deployed and reporting
- Confirm logs reach the SIEM with acceptable latency
- Stage the emulation tooling (Atomic Red Team, Caldera)
- Prepare saved SIEM queries for each expected artifact
A quick smoke test, for example checking that a known event appears, validates the pipeline before real techniques begin.
Running a Single Technique
During execution, run one technique at a time in a controlled window so cause and effect are unambiguous. Red narrates the action and notes the exact timestamp.
For example, executing an Atomic test for scheduled task persistence:
Invoke-AtomicTest T1053.005 -TestNumbers 1 -GetPrereqs
Invoke-AtomicTest T1053.005 -TestNumbers 1Observing in Real Time
Immediately after execution, blue runs the prepared query and records what they see. Classify the outcome explicitly:
- Prevented — the action was blocked outright
- Alerted — a detection fired
- Logged only — evidence exists, no alert
- No telemetry — nothing was captured
Capture the timestamps of both the action and the alert so you can later compute time to detect.
Cleanup After Each Test
Many emulation tools create artifacts: scheduled tasks, registry keys, files, or accounts. Clean up after each technique to keep the environment sane and avoid false future findings.
Atomic Red Team provides cleanup commands:
Invoke-AtomicTest T1053.005 -TestNumbers 1 -CleanupClosing the Loop Live
The defining feature of purple teaming is fixing gaps in the same session. When a technique is missed, the detection engineer drafts a rule and the team re-runs the technique to confirm it now fires.
- Gap found: scheduled task creation not alerting
- Draft rule on Event ID 4698 (task creation) with suspicious patterns
- Re-run the Atomic test
- Confirm the new rule fires, then record the win
This immediate iteration is far more effective than deferring fixes to a backlog.
Recording Results
Discipline in recording is what makes the exercise valuable later. For every technique log a structured result:
- Technique ID and procedure
- Outcome (prevented / alerted / logged / blind)
- Data source observed
- Detection rule that fired (or the new one created)
- Time to detect, and any follow-up action
Tools like VECTR store these results and let you compare runs over time to show measurable improvement.
Debrief and Handoff
End the exercise with a debrief while details are fresh. The output is a prioritized, actionable list, not a wall of text.
- What was detected, missed, and newly covered
- Detection gaps ranked by risk and likelihood
- Owners and due dates for each remediation
- Techniques to re-validate in the next cycle
Hand detection backlog items to engineering and schedule the next run. The exercise only pays off if the actions actually get implemented.
Quick Check
Test your understanding of how a purple team exercise is executed.
Recap
You can now run a purple team exercise end to end:
- Follow the plan, prepare, execute, analyze, improve, report lifecycle
- Set threat-informed objectives and a concrete emulation plan
- Secure authorization and ROE, and verify telemetry first
- Run one technique at a time, observe live, and classify outcomes
- Clean up artifacts and close gaps in-session
- Record structured results and end with a prioritized handoff
Next you will learn to measure coverage and close detection gaps with metrics that drive improvement.
Frequently asked questions
Is the “Running a Purple Team Exercise” lesson free?
Yes — the full text of “Running a Purple Team Exercise” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.
What will I learn in “Running a Purple Team Exercise”?
Planning and executing collaborative tests. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cyber Security Academy?
No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Running a Purple Team Exercise” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cyber Security Academy lesson?
Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why Purple Teaming
- Mapping Attacks to Detections
- Running a Purple Team Exercise
- Closing Detection Gaps and Metrics