Free tech learning for everyone, from basics to pro

Penetration TestingCyber SecurityIntermediate

Red, blue and purple teams: how attack simulations improve defence

In short: A red team plays a realistic attacker, the blue team defends and detects, and a purple team brings both together to improve detection step by step. Red team exercises test people, processes and technology against a goal, while penetration tests aim to find as many weaknesses as possible in a set scope. Purple teaming is often the fastest way to improve a SOC.

The team colours

Security teams by roleSecurity testing anddefencewho does whatRed teamplays the attackerBlue teamdefends and detectsPurple teamboth, workingtogetherWhite teamreferees theexercise
Figure 1. The colours describe roles in an exercise. In small organisations one person may play several.
  • Red team: security professionals who act like real attackers, often copying the techniques of a specific threat group.
  • Blue team: the defenders, such as the SOC, IT and incident responders, who detect and respond.
  • Purple team: not a separate department but a way of working, where red and blue share information openly during an exercise.
  • White team: the organisers and referees who set rules, approve actions and can stop the exercise.

Red team exercise or penetration test?

Penetration testRed team exercise
GoalFind as many weaknesses as possible in the scopeReach a specific objective, such as access to payment data
Who knowsIT and security usually know it is happeningOnly a few people (the white team) know
DurationDays to a couple of weeksWeeks to months
TestsMainly technologyTechnology, people, processes and detection
Best forMost organisations, regularlyMature organisations with a working SOC

A red team exercise is not "a better pen test". It answers a different question: would we notice and stop a real attacker? Organisations should fix the basics found by pen tests first. Test types are compared in types of penetration test.

Purple teaming

A purple team cyclePick a techniquefrom MITRE ATT&CKRed runs itsafely, openlyBlue checksdid we see it?Improvenew or tuneddetectionRun againconfirm it works
Figure 2. Purple teaming turns each attack technique into a tested detection.

In a purple team session, the red team runs one technique at a time, openly, while the blue team watches their tools. If nothing alerts, they work out why: missing logs, a disabled rule or a gap in coverage. They build or tune a detection, then run the technique again to confirm it fires. Techniques are usually chosen from MITRE ATT&CK, which gives both teams a shared language. The results feed straight into detection engineering.

Running exercises safely

  • Agree written rules of engagement, objectives and forbidden actions, just like a pen test.
  • Have a white team contact who can confirm "this is the exercise" if the blue team escalates to managers or the police.
  • Avoid real customer data and production disruption; use agreed proof points instead.
  • Hold a joint debrief: the goal is learning, not blaming the blue team.

Real-world example: ten techniques in two days

A fictional insurance company runs its first purple team workshop. The red team picks ten common ransomware techniques from MITRE ATT&CK. The SOC detects only three. For the others, the teams find that PowerShell logging is off on servers, EDR alerts for credential dumping are set to "log only", and domain controller logs are not reaching the SIEM. By the end of day two, eight of the ten techniques produce alerts. The company repeats the workshop every quarter with new techniques and tracks its detection coverage as a key metric.

Practice

What is the difference between a red team and a blue team?
The red team plays the attacker; the blue team defends, detects and responds.
How does a red team exercise differ from a penetration test?
A red team pursues a specific goal, usually covertly over a longer time, to test detection and response; a pen test aims to find as many weaknesses as possible in a set scope.
What is the main output of purple teaming?
New or improved detections that have been tested against real attack techniques.

Key takeaways

  • Red attacks, blue defends, purple combines both, white referees.
  • Red team exercises test detection and response against a specific objective.
  • Pen tests find as many weaknesses as possible; fix those basics first.
  • Purple teaming uses MITRE ATT&CK to turn techniques into tested detections.
  • Clear rules and a white team keep exercises safe.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: