In a traditional red team engagement, the attackers work in secret, the defenders try to notice them, and both sides compare notes at the end. That format is excellent for measuring how an organisation responds to a realistic adversary. It is less efficient at improving detection, because the feedback arrives weeks after the activity, and much of the useful detail has been lost by then.

Purple teaming takes a different approach. Offensive and defensive specialists work together, in the open, technique by technique. The goal is not to “win” but to leave the defenders with better visibility and better detections than they had before. This guide describes how to run an exercise so that it produces durable detection engineering work rather than a slide deck.

What purple teaming is, and is not

A purple team exercise is a collaborative, iterative process:

  1. The offensive side executes a specific technique in a controlled way.
  2. The defensive side checks whether it was logged, whether an alert fired, and whether an analyst could understand what happened.
  3. Both sides adjust: the defenders improve telemetry or detection logic, and the offensive side varies the technique to test the improvement.
  4. The result is recorded, and the next technique begins.

It is not a substitute for a covert red team exercise, which tests people and processes under realistic pressure. It is also not a compliance checkbox. The value lies entirely in what changes afterwards.

Planning: choose techniques that matter

Start from threats relevant to your organisation rather than from a list of everything possible. Useful inputs include your threat intelligence, public reporting from trusted sources about activity in your sector, your own incident history, and the findings of previous tests.

The MITRE ATT&CK framework is the common language for this work. It catalogues adversary tactics and techniques, which makes it easier to describe what will be simulated and to track coverage over time. A practical plan selects a manageable set of techniques for a first exercise and groups them into a plausible sequence: initial access, execution, persistence, privilege escalation, credential access, lateral movement and exfiltration.

For each technique, write down in advance:

  • The procedure: the specific way it will be executed, including tools and commands.
  • The expected telemetry: which log sources should record it, such as endpoint process events, authentication logs, cloud audit logs or proxy logs.
  • The expected detection: whether an existing rule should fire, and what the alert should contain.
  • Safety constraints: target systems, test accounts, and how to undo any change.

Agree rules of engagement and a communication channel before anything runs. Everyone should know how to pause the exercise if something unexpected happens.

Running the exercise

Work through techniques one at a time. After each execution, the defenders answer four questions, and the answers are recorded in a shared tracker:

  1. Was it logged? Is there raw telemetry for the activity anywhere?
  2. Was it collected? Did that telemetry reach the central platform (for example, the SIEM), with the fields needed to analyse it?
  3. Was it detected? Did a rule or analytic produce an alert?
  4. Was it understood? Could an analyst, looking only at the alert and its context, explain what happened and decide what to do?

Each “no” points to a different kind of work. A missing log is a configuration or tooling gap. Missing collection is a pipeline issue. A missing detection is a content gap. An alert that fires but cannot be understood is a triage problem, often solved by better enrichment or a runbook.

When a gap is found, the teams fix it where possible during the session, then rerun the technique to confirm. Variations matter: if a detection relies on a specific tool name or command-line string, the offensive side should try a renamed binary, a different parent process or an alternative way of achieving the same effect. A detection that only catches the exact procedure used in testing will not last long.

From observation to detection engineering

The real output of an exercise is a set of detections that are built and maintained like software. Treating detections as code makes this practical.

Write detections with intent

Each detection should state what behaviour it targets, why that behaviour is suspicious, and which technique it maps to. Focus on behaviour that is hard for an adversary to avoid, such as access to credential stores, unusual parent and child process relationships, or the creation of new persistence mechanisms, rather than on easily changed artefacts like file names.

Vendor-neutral formats such as Sigma can help describe detection logic in a portable way, even if it is ultimately deployed in a platform-specific query language.

Version, review and test

Store detections in version control with a clear history of changes. Review changes the way you would review code. Most importantly, keep the test case: the exact procedure from the exercise that should trigger the rule. Re-running these tests regularly, manually or with an automation framework, reveals when a detection silently breaks because a log source changed, an agent was updated or a field was renamed.

Tune for signal

A detection that fires constantly on legitimate activity will be ignored. During the exercise, look at how the rule behaves against normal traffic as well as against the simulation. Document known benign triggers and handle them with narrow, well-justified exclusions rather than by weakening the core logic.

Pair every alert with a response

For each new detection, write a short runbook: what the alert means, which additional data to look at, how to distinguish a true positive from a false one, and what to do next. This closes the gap between “an alert fired” and “someone knew what to do about it”.

Measuring progress honestly

Coverage maps based on ATT&CK are popular, but they can mislead. Colouring a technique green because a rule exists does not mean the organisation would detect a real adversary using it. Better measures include:

  • The share of simulated techniques that were logged, collected, detected and understood, tracked separately.
  • The number of detections with an automated or repeatable test case.
  • How many detections still pass their tests when re-run at the next exercise.
  • Time from technique execution to alert, and from alert to an analyst’s correct assessment.

Report these as trends across exercises rather than as single scores, and be explicit about what was not tested.

Making it a cycle

A single exercise produces a snapshot. The benefit compounds when purple teaming becomes a regular cycle tied to change: new threats in your intelligence, new systems going into production, new log sources or a migration to a different platform. Each cycle reruns earlier tests to catch regressions, then extends coverage to new techniques.

The people matter as much as the rules. Analysts who have watched a technique executed in front of them, and then traced it through their own tooling, recognise it faster when it appears for real. Rotating different members of the defensive team through exercises spreads that experience beyond the detection engineers.

A practical checklist

  • Select techniques based on threats relevant to you, mapped to ATT&CK.
  • Define the procedure, expected telemetry and expected detection before execution.
  • For every technique, record whether it was logged, collected, detected and understood.
  • Fix gaps during the session where possible and retest with variations.
  • Manage detections as code: documented intent, version control, review and a stored test case.
  • Tune against normal activity and write a runbook for every new alert.
  • Measure progress with tested outcomes, not just coverage maps, and repeat the cycle.