Painting Your Organizations with Shades of Red, Blue & Purple
Hidayath Khan (Sr. Red Team Lead · Kimberly-Clark)
Adversary Village @ c0c0n 2021 · Day 2 · Adversary Village
Overview
In his talk, "Painting Your Organizations with Shades of Red, Blue & Purple" at Adversary Village @ c0c0n, Hidayath Khan, a Senior Red Team Lead at Kimberly-Clark, delivered an insightful presentation focused on establishing rudimentary Red Team and Purple Team capabilities. Khan emphasized that the session was not about groundbreaking research or novel tools, but rather a foundational "Purple Teaming 101" or "Adversary Emulation 101" for organizations that currently lack these crucial security functions. His primary objective was to guide defenders on how to adopt an attacker's mindset to proactively enhance their organization's security posture.

Key moments
- 5:30 Why traditional security fails against advanced threats
- 11:10 Integrating Red and Blue for adversary emulation
- 16:00 Red Teaming's true purpose: improving blue team defense
- 22:00 Blue teams using offensive tools to 'purple themselves'
- 24:30 Basic logging and open-source SIEM for detection
- 40:00 Practical detection of phishing and credential harvesting
- 48:00 Implementing continuous purple teaming for constant improvement
- 52:00 Q&A: Convincing about purple teaming's compliance advantages
Painting Your Organizations with Shades of Red, Blue & Purple
Speakers: Hidayath Khan, Sr. Red Team Lead, Kimberly-Clark
Conference: Adversary Village @ c0c0n
YouTube: https://www.youtube.com/watch?v=KCD8faSBK_c
Overview
In his talk, "Painting Your Organizations with Shades of Red, Blue & Purple" at Adversary Village @ c0c0n, Hidayath Khan, a Senior Red Team Lead at Kimberly-Clark, delivered an insightful presentation focused on establishing rudimentary Red Team and Purple Team capabilities. Khan emphasized that the session was not about groundbreaking research or novel tools, but rather a foundational "Purple Teaming 101" or "Adversary Emulation 101" for organizations that currently lack these crucial security functions. His primary objective was to guide defenders on how to adopt an attacker's mindset to proactively enhance their organization's security posture.
The talk addressed a critical gap in modern cybersecurity: the persistent failure of traditional security measures against sophisticated adversaries. Khan passionately argued for the integration of offensive and defensive strategies through adversary emulation and purple teaming. By taking attendees through practical steps, from setting up attack infrastructure to detecting common attack techniques, he aimed to empower blue teams to "purple themselves," thereby fostering continuous improvement in detection and response capabilities against the evolving threat landscape.
Background
▶ Watch: Why traditional security fails against advanced threats (5:30)
The cybersecurity landscape is fraught with ever-increasing threats, as evidenced by the consistent rise in major data breaches documented by sources like informationisbeautiful.net, dating back to incidents like TJ Maxx in 2004. Khan highlighted a crucial paradox: many organizations, even Fortune 50 companies, invest heavily in traditional security technologies such as endpoint security, Intrusion Detection Systems (IDS), antivirus, host-based auditing, and firewalls, yet still fall victim to breaches. This suggests that the mere presence of security tools and compliance adherence is insufficient.
The core problem, Khan explained, is that traditional defenses are designed to stop traditional attacks. Today, organizations face Advanced Persistent Threats (APTs), including nation-state actors (e.g., China, Russia, North Korea), sophisticated cybercriminals, hacktivists, and insiders. These adversaries are intelligent, determined individuals who leverage Tactics, Techniques, and Procedures (TTPs) that go beyond simple vulnerabilities or malware. Historical security assessments, conducted in isolation, fail to mimic the adaptive nature of these threats. Furthermore, the traditional dynamic between internal Red and Blue teams often creates conflicting objectives: Red Teams aim to find vulnerabilities and bypass controls, potentially making the Blue Team look bad, while Blue Teams aspire to detect everything, sometimes leading to a false sense of security if no findings are reported. This adversarial internal relationship hinders the overarching goal of improving organizational security.
Key Findings
▶ Watch: Red Teaming's true purpose: improving blue team defense (16:00)
Hidayath Khan’s talk underscored several critical findings regarding effective cybersecurity posture improvement:
- Adversary Emulation is Essential for Real-World Preparedness: Generic penetration tests and vulnerability assessments are inadequate against APTs. Adversary emulation, which specifically mimics the TTPs of adversaries most likely to target an organization, provides a realistic assessment of current exposure. This approach helps prioritize defenses against relevant threats rather than attempting to mitigate all possible attack vectors, leading to a more structured, repeatable, and continuously improving security program.
- Purple Teaming Maximizes Red and Blue Team Effectiveness: To overcome the inherent conflicts and maximize value, organizations must adopt purple teaming. This virtual team integrates the offensive insights of red teams (or blue teams acting offensively) with the defensive capabilities of blue teams, creating a unified narrative that directly improves security posture. The goal is not just to find vulnerabilities, but to validate and enhance detection and response.
- Blue Teams Can "Purple Themselves" for Continuous Improvement: For organizations without a dedicated internal red team, Khan introduced the concept of "purpling yourself." This empowers blue teams to utilize offensive tools and TTPs to test their own defenses. This self-assessment allows for faster iterations and a more controlled way to identify and close security gaps, fostering a proactive defensive stance.
- Continuous Engagement Drives Measurable Improvement: Sporadic red team exercises, often driven by compliance, yield limited long-term benefits if findings are not remediated promptly. Khan advocated for continuous purple teaming, suggesting regular, short (e.g., bi-weekly one-hour) sessions where red and blue teams collaborate on specific TTPs. This consistent feedback loop allows blue teams to fine-tune detection rules, develop new correlation logic, and make measured, tangible improvements against the MITRE ATT&CK Framework.
Technical Deep Dive
▶ Watch: Basic logging and open-source SIEM for detection (24:30)
Khan provided a practical roadmap for establishing both red and purple teaming capabilities, starting with the foundational elements required for a basic blue team to begin "purpling itself."
Establishing Foundational Blue Team Capabilities
The speaker emphasized that before any adversary emulation can occur, a robust defensive foundation is necessary:
- Centralized Logging Platform: A system to aggregate logs from all devices is paramount.
- Endpoint Visibility: At a minimum, this includes Sysmon from Sysinternals, coupled with Windows Event Collector and Windows Event Forwarder (WEC/WEF) installed as pull agents on Windows devices. For Unix systems, similar logging mechanisms are required.
- Network Logs: Essential logs include DNS logs and firewall logs.
- Security Information and Event Management (SIEM) Solution: While high-end solutions like Splunk or QRadar are ideal, open-source alternatives like Security Onion, the ELK (Elasticsearch, Logstash, Kibana) stack, or HELK (Hunting ELK) are excellent starting points for initial log analysis and threat hunting.
- Windows Raw Data: Collecting detailed Windows event logs, syscalls, process data, and registry data is crucial for in-depth analysis.
Emulating Adversary TTPs with MITRE ATT&CK
Khan advocated for using the MITRE ATT&CK Framework as a common vocabulary for defenders, attackers, and threat intelligence teams. This framework categorizes attacker tactics (e.g., Initial Access, Execution, Persistence) and the specific techniques and procedures (TTPs) used to achieve them. The analogy given was that a tactic is like preventive maintenance for a vehicle, a technique is changing the oil, and a procedure is the manufacturer's recommended approach for that oil change. Organizations should identify their "crown jewels," map potential attack paths, and then use ATT&CK to structure their emulation tests.
Setting Up Attack Infrastructure
To emulate an adversary, a basic attack infrastructure is needed, which can be deployed internally or on cloud providers like DigitalOcean or Azure:
- Command and Control (C2) Servers: These are the central hubs for attacker operations. Khan referred to c2matrix.com (maintained by George Oculus) as a comprehensive resource for C2 solutions, listing both commercial options like Cobalt Strike and open-source alternatives such as Covenant, Empire, and Metasploit. The SANS Slingshot C2 edition also comes pre-baked with popular C2s.
- Payload Servers: Store malicious payloads or malware.
- SMTP Servers: For sending phishing emails.
- Redirectors: To obfuscate the C2 server's true location. A victim machine connects to a redirector, which then forwards traffic to the C2. This ensures that blue teams only see connections to the redirector, making C2 infrastructure harder to identify and block.
Initial Access Emulation
Khan outlined key techniques for gaining initial access and their corresponding detection methods:
- OSINT Reconnaissance: Tools like theHarvester and LinkedIn are used to gather email addresses, domain names, and subdomains. Shodan can also be used for broader internet scanning.
- Phishing:
- Pretext Creation: Crafting believable scenarios (e.g., job openings, recognition awards) from resources like the Pretext Project.
- Domain Squatting: Registering typosquatted or similar-looking domain names to appear legitimate.
- Domain Categorization: Crucially, newly registered domains must be categorized (e.g., as "healthcare" or "financial") with popular web filters to bypass security controls that block uncategorized domains. This often involves hosting a fake website and manually submitting it for categorization, then "aging" the domain for a week. Tools like Chameleon (for bulk categorization) and Domain Hunter (for finding available domains) can assist.
- Credential Harvesting: Tools like GoPhish can create convincing fake login pages. More advanced Man-in-the-Middle (MitM) reverse proxies like Evilginx, Modlishka, Marina Browser, and Necro Browser can intercept credentials, including those protected by multi-factor authentication (MFA), by relaying traffic between the victim and the legitimate site.
- Detection (Credential Harvesting): Blue teams can look for specific HTTP headers, such as
X-Evil-Jinx, which some tools (if not properly obfuscated) embed in requests, indicating a phishing attempt. - Remote Code Execution (RCE) via Malicious Documents:
- Maldoc Creation: Embedding macros, particularly XLM macros, in documents is still effective and can bypass Windows Defender and AMSI. Tools like Lucky Strike can facilitate this.
- Detection (RCE): While most antivirus solutions detect known malicious documents, blue teams should focus on suspicious parent-child process relationships. For example,
winword.exespawningcmd.exe, which then spawnscertutil.exe, is highly anomalous and indicates potential RCE.
Privilege Escalation
Once initial access is gained, attackers often seek to elevate privileges:
- Abusing Misconfigurations: Common vulnerabilities include DLL sideloading, unquoted service paths, and misconfigured registry settings like AlwaysInstallElevated.
- Attacker Tools: Tools like Seatbelt, SharpUp, and PowerUp (a PowerShell script) are used by attackers to identify these misconfigurations.
- Detection: Defenders can use the same tools (Seatbelt, PowerUp) to proactively find and fix these vulnerabilities. Additionally, deploying Canary Tokens (from thinkst.org) in vulnerable folders can alert defenders the moment an attacker attempts to access or exploit them.
Persistence
Attackers aim to maintain access to compromised systems:
- Scheduled Tasks: A common persistence mechanism is creating scheduled tasks.
- Detection: Blue teams should implement robust configuration management and maintain baseline configurations for all systems. Deviations from these baselines, especially new or modified scheduled tasks, should trigger alerts for anomalous behavior.
Lateral Movement
Attackers often move laterally within a network to reach their objectives:
- RDP Abuse: Using Remote Desktop Protocol (RDP) from compromised machines to other systems is a frequent technique.
- Detection: Monitor RDP usage. Specifically, Windows Event ID 4624 with Logon Type 10 indicates an RDP login. Blue teams should flag RDP connections originating from non-IT users or unusual source IPs, as RDP should typically be restricted to IT support.
- Attacker Commands: Attackers frequently execute common system commands like
ping,net use,net local, andnet configfor reconnaissance and network mapping. - Detection: Referencing resources like the JPCERT blog, which lists common attacker commands, blue teams can create detection rules to flag the execution of these commands by users or processes that typically wouldn't use them (e.g., a marketing user running
net useon an accounts machine).
Demo / Proof of Concept
▶ Watch: Practical detection of phishing and credential harvesting (40:00)
While Hidayath Khan's presentation did not include a live demonstration or a traditional proof-of-concept, he provided a detailed and practical walkthrough of the various offensive techniques and corresponding defensive detection strategies. Each section of the technical deep dive served as a conceptual "how-to," illustrating the steps an attacker would take and the specific indicators blue teams should look for. This approach effectively served as a theoretical demonstration, guiding attendees on how to implement these concepts within their own organizations.
Defensive Implications
▶ Watch: Q&A: Convincing about purple teaming's compliance advantages (52:00)
The central defensive implication from Khan's talk is that organizations, especially blue teams, must embrace an attacker mindset and actively "purple themselves." This involves a continuous cycle of testing, detection, and improvement.
Defenders should prioritize:
- Establishing Core Visibility: Implement centralized logging, deploy Sysmon and WEC/WEF for comprehensive endpoint visibility, and ensure robust network logging (DNS, firewall). Utilize open-source SIEMs like Security Onion or ELK stack if commercial options are unavailable.
- Adopting the MITRE ATT&CK Framework: Use ATT&CK as a common language and structured guide for identifying relevant adversary TTPs to emulate and build defenses against. This moves away from generic vulnerability patching to targeted threat mitigation.
- Implementing Specific Detection Strategies:
- Configure firewalls and SIEMs to look for specific indicators, such as the
X-Evil-JinxHTTP header in web requests, which can signal credential harvesting attempts. - Monitor for suspicious parent-child process relationships, such as
winword.exespawningcmd.exe, to detect RCE via malicious documents. - Proactively use offensive tools like Seatbelt and PowerUp to identify privilege escalation vulnerabilities in their own environment.
- Deploy Canary Tokens (from thinkst.org) in high-value or vulnerable locations to receive immediate alerts upon unauthorized access.
- Monitor RDP logon events (Event ID 4624, Logon Type 10) and flag anomalous RDP usage, especially from non-IT personnel.
- Create detection rules for the execution of common attacker commands (e.g.,
net use,ping) by unusual users or processes, leveraging resources like the JPCERT blog.
- Embracing Continuous Purple Teaming: Formalize regular, short (e.g., bi-weekly one-hour) purple team sessions. In these sessions, red and blue teams collaboratively execute and detect specific TTPs from the MITRE ATT&CK framework. The immediate feedback loop allows blue teams to fine-tune existing detection rules, develop new correlation logic in their SIEM, and measure improvements against the ATT&CK matrix, ensuring continuous and tangible enhancement of the organization's security posture.
Key Takeaways
- Traditional security measures and compliance alone are insufficient against Advanced Persistent Threats (APTs); a proactive, threat-centric approach is required.
- Purple Teaming is crucial for aligning the objectives of red and blue teams, fostering collaboration, and maximizing the effectiveness of both offensive and defensive security efforts.
- Organizations without a dedicated red team can "purple themselves" by empowering blue teams to use offensive tools and TTPs to test and strengthen their own defenses.
- Foundational capabilities like centralized logging, endpoint visibility (e.g., Sysmon, WEC/WEF), and a SIEM solution (even open-source options) are non-negotiable starting points for effective adversary emulation.
- Leveraging the MITRE ATT&CK Framework provides a common language and structured methodology for emulating specific adversary TTPs, from initial access (phishing, RCE) to lateral movement and persistence, and for designing targeted detection strategies.
- Continuous purple teaming engagements, even short, regular sessions focused on individual TTPs, drive significant and measurable improvements in detection and response capabilities, moving the needle on organizational security posture.
About the Speaker(s)
Hidayath Khan is a highly experienced cybersecurity professional with nearly 24-25 years of dedicated focus in the field, having worked on both the offensive and defensive sides of security. He currently serves as a Senior Red Team Lead at Kimberly-Clark. Throughout his career, Khan has worked for numerous enterprises in the EMEA region, including Emirates Airline. In addition to his corporate role, he is also a respected instructor for SANS Institute, teaching courses such as SEC401 (Security Essentials), SEC560 (Network Penetration Testing), and SEC501. Khan's extensive background in both practical security operations and education makes him a credible voice in advocating for effective red and purple teaming strategies.
Reviews
Dr. Zero (Offensive Security Researcher) — WEAK
This is a 101-level rehash of standard purple teaming concepts we've been yelling about since 2015. If your org doesn't know what Sysmon or Event ID 4624 is by now, this talk will help you survive, but for anyone who has touched a keyboard in the last decade, it's a sleep aid.
Heather Calloway (CISO) — SOLID
This is a highly pragmatic, foundational blueprint for building an adversary emulation capability when you lack the budget for a dedicated red team. It won't shift your overall security strategy, but it is exactly the operational pivot your SOC director needs to make if they are still relying entirely on passive vendor alerts. Worth sending to your defensive leads to build out a continuous validation roadmap.