# Topic 19: Red, Blue, and Purple Team Validation

**Fictional Northstar case · self-paced · 45–90 minutes plus optional setup**

## Opening question
Did the control detect the behavior you intended to test?

## Explain
Red-team activity models adversary behavior within explicit authorization; blue teams defend and investigate; purple-team work connects the exercise to improvement. A classroom can practice this relationship with benign synthetic events and expected detections. A failed alert may reflect rule logic, missing telemetry or an incorrect test assumption. The purpose is reproducible defensive learning, not unauthorized access.

## Supporting technologies
- **Rules of engagement:** Define target, time, permitted actions and stop conditions.
- **Emulation:** Represent a specific behavior under safe boundaries.
- **Detection coverage:** Verify collection, logic and analyst visibility separately.
- **Purple-team feedback:** Use evidence to improve and retest.

## Scenario
Northstar authorizes a paper exercise for repeated synthetic login failures. A detection requires at least three failures within five minutes.

```text
utc,user,event
12:00,u09,login_fail
12:01,u09,login_fail
12:03,u09,login_fail
12:08,u09,login_success
```

## Hands-on procedure
1. Write scope restricting the exercise to supplied records and no real credentials or systems.
2. Predict the expected alert time from the threshold and time window.
3. Assign red, blue and facilitator roles, even if one learner documents all perspectives.
4. Change one event time to 12:07 and reassess the threshold; explain why test design matters.
5. Record a detection gap hypothesis and the evidence needed to distinguish collection from rule failure.
6. Create a retest table with expected, observed and unresolved results; include stop conditions.

## Expected reasoning and limits
The original three failures fit five minutes and should trigger after the third event in the stated model. Moving the third event to 12:07 prevents that three-event window. No real attack is executed.

## Best practices
- Obtain explicit authorization and scope before any technical emulation.
- Use benign synthetic inputs and a facilitator stop mechanism.
- Measure pipeline and analyst response separately.
- Retest changes against both expected alerts and legitimate traffic.

## Vendors, projects and learning
- [MITRE ATT&CK](https://attack.mitre.org/): Community behavior knowledge base, not a vendor
- [Microsoft Sentinel](https://learn.microsoft.com/en-us/azure/sentinel/): Detection-rule learning
- [Wazuh](https://documentation.wazuh.com/): Open-source detection learning

## Optional technical extension
Only in an explicitly approved isolated lab, generate a harmless test log and verify its ingestion. This lesson authorizes no scanning, credential attacks or exploit execution.

## Career practice
Relevant role families to investigate: Detection engineering trainee, SOC analyst, Security validation analyst. No current vacancy or hiring requirement is asserted.

Interview: How would you investigate a benign test that produced no expected alert?

## Sources
- [MITRE ATT&CK](https://attack.mitre.org/)

## Portfolio evidence
Use the [portfolio guide](../guides/portfolio.md). Submit original input, decisions, tests, actual results, limitations and source attribution. Clearly label modeled, planned and performed work.

## Suggested prerequisites
Topic 17, Topic 18
