All modules

Module 12 · Professional

Purple Team & Defensive Awareness

Purple teaming closes the loop between offensive proof and defensive improvement. This module teaches you to view your own techniques through telemetry, collaborate without ego, and build basic detection-engineering habits using logs, rules, and lab environments. The goal is not to become a full-time SOC analyst overnight — it is to make every offensive finding more valuable by pairing it with visibility and response insight.

2 lessons
12 deep sections
~125 min guided
Progress…

Authorized testing only. Practice on systems you own, isolated labs, or targets with written permission. Unauthorized access is illegal.

Outcomes

  • Explain purple-team goals, roles, and engagement patterns versus pure red or blue work
  • Map offensive actions to likely log sources and detection opportunities
  • Run a simple “see yourself” exercise correlating attacks with alerts in a lab
  • Draft detection ideas (including Sigma-style logic) from real techniques you use
  • Communicate jointly prioritized hardening and detection backlog items

Lessons

Lesson 1
65 min6 sections

See yourself in the logs

Correlate a controlled attack path with host and network telemetry so offensive work produces defensive value.

Learning objectives

  • Define purple teaming and how it differs from adversarial simulation theater
  • Identify high-value log sources for common offensive techniques
  • Execute a short authorized attack chain while capturing timestamps for correlation
  • Evaluate which steps were visible, delayed, or invisible to defenders
  • Produce a joint readout: finding, detection gap, and recommended visibility fix

Deep teach-through

Purple teaming without the buzzwords

Purple teaming is structured collaboration: offensive operators exercise techniques while defensive operators measure detection and response, then both improve controls. It is not “red team wins” theater, and it is not a blame session for SOC analysts.

Goals typically include validating detections, measuring time-to-detect and time-to-respond, improving playbooks, and prioritizing engineering work that closes real gaps proven by exercise — not hypothetical slideware.

Authorization and safety still rule. Purple exercises need RoE, communication channels, abort criteria, and production caution equal to any pentest. Surprise ransomware emulation on Friday prod is not purple; it is unprofessional.

Success metrics: new or tuned detections, reduced blind spots, clearer ownership of alerts, and offensive reports that include defender-relevant context.

Telemetry map for common techniques

Network: firewall accepts/denies, proxy logs, DNS queries, IDS/IPS alerts, NetFlow/Zeek-like connection metadata. Useful for scanning, C2-ish patterns in labs, and data movement signals.

Endpoint: process creation, command lines, script block logging, authentication events, file modifications, Sysmon-style enrichments. Essential for living-off-the-land binaries and credential tools.

Identity: SSO logs, VPN auth, cloud control-plane APIs, Kerberos/LDAP authentications, MFA outcomes. Cloud and AD attacks often show here first.

Application: web access logs, WAF events, audit trails for admin actions. Many web findings should map to app logs if logging is competent.

If a technique you love produces no telemetry anywhere, that is a first-class result of the exercise — a detection gap with business value.

Running a minimal “see yourself” lab exercise

Build or use a lab with an attacker VM, a target, and a defender stack (even lightweight: Wazuh, Elastic trial, Splunk free tier, or a prebuilt DetectionLab-style environment). Production is optional and requires stricter change control.

Pick a short chain: e.g., port scan → web exploit or weak credential → local discovery → optional privilege escalation. Keep it reversible with snapshots.

Record a timeline with UTC timestamps, source IPs, exact commands, and expected visibility. Defenders record alerts, rule names, and investigation notes without being spoon-fed every step (agree on “hot” vs “cold” collaboration mode).

After action: walk the timeline together. For each step, mark Detected / Detected-but-not-actionable / Not detected / Blocked. Avoid ego; chase the gap.

Noise, fidelity, and why “we alerted” is incomplete

An alert that fires on every Nmap SYN scan in a shared lab may be true-positive technically and useless operationally. Purple work cares about fidelity and response relevance.

Tune toward techniques that matter in the environment: credential dumping, suspicious PowerShell, rare cloud API sequences, impossible travel, privileged group changes.

Offensive operators should learn which of their habits are uniquely noisy (aggressive scans, default tool profiles, known bad user agents) versus stealthy. Both matter: noisy validates pipe; stealthy validates real gaps.

Document false positives created during the exercise so blue teams can tune rather than disable entire rule categories in frustration.

Joint artifacts worth delivering

Attack timeline with detection overlays. Technique-to-log-source matrix. List of net-new detection candidates. List of control failures (not only SIEM misses — also missing MFA, flat network, local admin sprawl).

Offensive findings still stand on their own. Purple context is additive: “Issue is critical AND not detected within 30 minutes in current tooling.”

Prioritize a backlog both sides agree on: sometimes a detection is the right near-term control when a complex code fix will take quarters — with risk accepted explicitly.

Capture screenshots of SIEM queries and rule logic snippets in the exercise report. Future exercises should show improvement, not amnesia.

Professional posture across the red-blue aisle

Language: “the detection did not fire for this technique” not “blue is bad.” “the exploit path is real” not “red is showing off.” Shared mission: reduce risk.

Share IOCs and procedures from the exercise carefully; do not dump client-specific tradecraft into public blogs without approval.

Operators who understand defender constraints (alert volume, tooling licenses, change freezes) propose better remediations and get invited back.

Career-wise, purple literacy differentiates consultants who only pop shells from those who improve security programs.

Key concepts

Purple team
Collaborative exercise model where offensive techniques are run to measure and improve detection, response, and controls.
Telemetry
Logs, events, and sensor data that defenders use to observe activity across network, endpoint, identity, and applications.
Time-to-detect (TTD)
Elapsed time from technique execution to a meaningful defensive signal — a core purple metric.
Detection gap
A technique or step that produced no actionable visibility despite occurring on monitored systems.
Hot vs cold collaboration
Whether defenders are informed in real time during the exercise (hot) or work from alerts alone until debrief (cold).

Common mistakes

  • Treating purple team as unlimited production attack without change control
  • Measuring only “did any alert fire” without fidelity or response quality
  • Offensive operators refusing to share timelines, making correlation impossible
  • Defenders disabling noisy rules mid-exercise without documenting the decision
  • Delivering only red findings with no detection or logging recommendations

Defender view

  • Purple exercises justify logging investments with proof of blind spots.
  • Shared timelines accelerate playbook updates and reduce adversarial mystery.
  • Program-level metrics (TTD/TTR trends) communicate security improvement to leadership.

Operator checklist

  • RoE and abort criteria for the purple exercise are written and understood
  • I maintain a UTC timeline of offensive steps with host and account identifiers
  • I can name expected log sources for each major technique used
  • Debrief includes detection gaps and control gaps, not only exploit success
  • Joint backlog items have owners (red/blue/platform) and suggested priority

Example commands & patterns

# Example: generate correlatable noise in a LAB only
nmap -sS -p 22,80,443 <lab-target> -oA scans/purple_t0
# On defender side (Wazuh/Elastic/etc.), search by src IP and time window
# Endpoint lab: force a visible process event (lab target you own)
whoami & hostname & ip a
# Packet-level review when network sensors exist
wireshark  # or tshark -r capture.pcap host <lab-target>

Practice drills

  1. Draw a technique-to-telemetry matrix for five tools you already use (scan, web exploit, file transfer, credential dump lab, cloud API enum)
  2. Run a two-step lab attack with synchronized notes; list every alert you can find within 15 minutes of searching logs
  3. Write a one-page purple debrief for a fictional company with two detection gaps and two control gaps
  4. Propose three high-fidelity detection ideas that would have caught your lab chain
  5. Role-play a blameless debrief script between red and blue leads (bullet talking points)

Next: Formalize detection ideas into basic detection-engineering practice with rules and testing.

Lesson 2
60 min6 sections

Detection engineering basics for operators

Turn techniques into testable detections: data sources, rule logic, fidelity, and continuous improvement — without pretending every operator is a full-time DE.

Learning objectives

  • Describe the detection engineering lifecycle from threat to tested rule
  • Write simple detection logic in plain language and Sigma-style structure
  • Choose data sources and fields that make rules robust
  • Test detections positively and negatively to reduce false positives
  • Hand off detection candidates that blue teams can implement in their stack

Deep teach-through

Detection engineering as a product mindset

Detection engineering (DE) treats detections like software: requirements (what threat), implementation (rule/query/model), tests (true/false positives), deployment, and maintenance when environments change.

Operators accelerate DE by providing high-quality technique details: exact command lines, parent-child process trees, API calls, sequences, and variations attackers use when the first path is blocked.

Not every technique needs a custom SIEM rule. Sometimes the right control is hardening (remove local admin, block macro execution) or preventative policy. DE chooses the best control type, not the most alerts.

Start small: a few high-quality rules that fire rarely and matter beat hundreds of noisy signatures nobody trusts.

From technique to detection idea

Use a structure: behavior name, MITRE ATT&CK-style mapping if helpful, preconditions, telemetry required, logic sketch, known false positive classes, severity, and response hint.

Example: “Suspicious PowerShell encoded command from Office parent” needs process creation telemetry with parent process and command line — without those fields, the idea is not implementable yet (logging gap first).

Sequence detections (A then B within T minutes) often beat single-event rules for fidelity: e.g., replication of directory dump tools after anomalous admin logon.

Cloud example: burst of GetObject/ListBuckets from a newly assumed role outside CI ranges. Identity + cloud audit logs required.

Sigma and portable rule thinking

Sigma is a vendor-neutral rule format that describes detections against log data, convertible to many SIEM query languages. Learning its structure trains portable thinking even if your lab SIEM differs.

Core ideas: logsource (product/service), detection selectors (fields/values), condition logic, level, and false positive notes. Precision in field names matters.

Operators writing Sigma-like drafts help blue teams skip the “what exactly did you run?” interview. Include sample raw events from the lab.

Do not worship any single format. The skill is clear behavioral logic and testability; conversion is secondary.

Network detection notes: IDS and beyond

Suricata/Snort-style IDS uses signatures and protocol analysis on packets or NDR pipelines. Useful for known exploit payloads, policy violations, and some C2 patterns — weaker against encrypted or highly custom traffic without extra context.

Zeek-like metadata and proxy logs often provide better long-term hunting than brittle payload signatures alone. Combine network and endpoint when possible.

Purple tests of IDS should use known lab payloads and measure both detection and whether analysts would escalate. A silent drop with no alert may be prevention without detection — still record it.

Encrypted traffic is the default on the modern internet; plan detections that do not depend on reading TLS plaintext unless TLS interception is an agreed enterprise control.

Testing, tuning, and ownership

Positive test: replay or re-run the technique in lab and confirm the rule fires. Negative test: run normal admin activity that resembles the technique and confirm silence or low volume.

Tune with allowlists carefully — overly broad exclusions recreate the original gap. Prefer scoping to high-value assets or rare parent processes.

Every detection needs an owner, a response runbook link, and a review date. Orphaned rules rot when software updates change command-line patterns.

Measure: alert volume per week, true positive rate estimates, and whether the detection ever contributed to an incident or exercise win.

What operators should deliver to blue teams

A detection candidate package: narrative technique, sample events, suggested logic, ATT&CK mapping optional, false positive analysis, and residual risk if unbuilt.

Prioritize detections that cover techniques you successfully used against the client’s real environment (with permission to share) — relevance beats generic rule packs.

Respect tooling limits. If the client has no process command-line logging, the first recommendation may be enable Sysmon/EDR fields, not a fantasy rule.

Close the loop on retest: after detections deploy, re-run the technique in a controlled window and update the purple metrics.

Key concepts

Detection engineering
Discipline of designing, implementing, testing, and maintaining detections as lifecycle-managed security capabilities.
Sigma rule
Vendor-neutral detection description format commonly used to express and share SIEM-oriented logic.
True positive / false positive
Alert correctly identifying malicious or policy-violating behavior vs alert on benign activity — fidelity drivers.
Log source completeness
Whether required fields and event types exist at sufficient quality for a detection idea to work in production.
Atomic test
Small, repeatable execution of a technique used to validate that a detection fires as intended.

Common mistakes

  • Writing rules for fields the environment does not log
  • Shipping high-volume low-fidelity rules that train analysts to ignore the SIEM
  • Copying public rules without testing against local false positive patterns
  • Assuming IDS signatures alone cover modern encrypted enterprise threats
  • No owner or runbook — alerts that nobody knows how to handle

Defender view

  • Operator-provided sample events shorten detection development cycles dramatically.
  • Lifecycle ownership keeps detections useful after tooling and OS upgrades.
  • Balanced prevent + detect strategies reduce over-reliance on noisy alerting.

Operator checklist

  • Each detection candidate names required log sources and fields
  • I include at least one sample event from a lab execution
  • I have considered obvious false positives and noted them
  • I state whether prevention might be better than detection for this item
  • A retest plan exists once the rule is deployed in lab or client SOC

Example commands & patterns

# Conceptual Sigma-style sketch (not vendor-final):
# title: Lab encoded PowerShell from Office
# logsource: process_creation
# detection: ParentImage|endswith: WINWORD.EXE AND CommandLine|contains: -enc
#
# Suricata — only in lab, example pattern testing discipline
suricata -T -c /etc/suricata/suricata.yaml
# Validate your lab SIEM search by time and host after atomic technique replay

Practice drills

  1. Pick one technique from an earlier module and write a full detection candidate package (one page)
  2. Express that detection as a Sigma-like YAML draft with logsource and condition
  3. List three false positive scenarios and how you would tune without gutting the rule
  4. In a lab SIEM or even raw syslog, implement a simplified version and run a positive test
  5. Present a five-minute handoff briefing as if speaking to a SOC engineer who has never seen the exploit

Next: Fold purple metrics and detection candidates into every advanced engagement report you write.