Testing whether your security actually works with Red Teaming

Alex (Red Team · Atlassian)

BSides Canberra VII (2024) · Day 2 · Bradman Theatrette

Overview

In this insightful talk from BSides Canberra, Alex, a seasoned red team professional formerly with Atlassian, challenges the conventional wisdom of cybersecurity by asking a fundamental question: "How do you know if your security actually works?" Drawing parallels to a smoke alarm that might look functional but has never been tested, Alex argues that many organizations operate under an untested hypothesis that their security measures are effective. The talk advocates for red teaming as a rigorous, evidence-based approach to validate security controls and incident response plans against realistic adversary behaviors.

Watch on YouTube

Visual summary for Testing whether your security actually works with Red Teaming by Alex
Visual summary for Testing whether your security actually works with Red Teaming by Alex

Key moments

  1. 0:00 Introduction and the 'Alex' hacker name story
  2. 2:05 Why test security? The 'smoke alarm' analogy
  3. 4:07 What is Red Teaming? Definition & 'color wheel' rant
  4. 8:00 Identifying real attackers and threat intelligence
  5. 10:30 Hypothetical Red Team Operation: Initial access
  6. 16:00 Post-exploitation: Techniques on a compromised laptop
  7. 21:00 Achieving objective, getting caught, and debriefing
  8. 24:50 Q&A: Skipping phishing with 'assumed compromise'

Testing whether your security actually works with Red Teaming

Speakers: Alex (Red Team, Atlassian)

Conference: BSides Canberra

YouTube: https://www.youtube.com/watch?v=nllWyRBQFcM

Overview

In this insightful talk from BSides Canberra, Alex, a seasoned red team professional formerly with Atlassian, challenges the conventional wisdom of cybersecurity by asking a fundamental question: "How do you know if your security actually works?" Drawing parallels to a smoke alarm that might look functional but has never been tested, Alex argues that many organizations operate under an untested hypothesis that their security measures are effective. The talk advocates for red teaming as a rigorous, evidence-based approach to validate security controls and incident response plans against realistic adversary behaviors.

Alex's presentation demystifies red teaming, moving beyond the jargon and "infoset color wheel" to define it specifically as adversary emulation. This methodology involves internal security teams adopting the mindset, tools, and techniques of real-world threat actors to test an organization's defenses from an external perspective. The core objective is not merely to find vulnerabilities, but to simulate a full attack chain against a specific, predefined objective, ultimately helping organizations understand their true resilience against sophisticated threats and improve their defensive posture before a real breach occurs.

The talk provides a compelling, if hypothetical, walkthrough of a red team operation, illustrating the practical challenges and considerations involved in emulating cybercriminals. By detailing stages from initial reconnaissance and access to post-exploitation and objective achievement, Alex underscores the importance of realism, operational security for the red team, and the invaluable insights gained when defenders can observe and learn from a controlled "attack." This approach fosters a proactive security culture, ensuring that policies, procedures, and technologies are not just theoretical safeguards but proven barriers against actual compromise.

Background

▶ Watch: Introduction and the 'Alex' hacker name story (0:00)

The foundational premise of Alex's talk is a critical challenge in cybersecurity: the disconnect between perceived security and actual security. Organizations invest heavily in antivirus software, SIEM solutions like Splunk for log aggregation, and automated alerts, believing these tools provide robust protection. Similarly, they establish incident response plans, outlining who to call or what steps to take in the event of a breach. However, as Alex compellingly illustrates with the smoke alarm analogy, the mere presence of these controls or plans does not guarantee their effectiveness. A smoke alarm might be on the ceiling, but without a test, there’s no certainty it will beep when a fire occurs.

This problem is exacerbated when security measures are viewed in isolation, without considering their real-world context. Alex presents humorous yet poignant images: a sturdy gate with a gaping hole beside it, or a combination lock with its code openly written on a sticky note nearby. These visuals perfectly encapsulate how security controls, while theoretically sound, can be rendered ineffective by human factors, procedural gaps, or a lack of understanding of how they are actually used. The underlying issue is an implicit organizational hypothesis: "Our security is fine; it won't happen to us."

Red teaming emerges as the direct solution to this untested hypothesis. Rather than relying on subjective opinions or theoretical assessments, red teaming provides concrete evidence of an organization's defensive capabilities. It shifts the paradigm from passive defense to active validation, transforming the security hypothesis into an experiment. By attempting to "hack yourself" in a controlled environment, organizations can proactively identify weaknesses, validate their incident response capabilities, and ultimately strengthen their security posture without the catastrophic consequences of a real-world breach. This proactive, evidence-driven approach is crucial for moving beyond theoretical security to a verified, operational resilience against the ever-evolving threat landscape.

Key Findings

▶ Watch: What is Red Teaming? Definition & 'color wheel' rant (4:07)

Alex's talk establishes several key findings and principles for effective red teaming, emphasizing realism, hypothesis testing, and operational separation:

  • Red Teaming as Adversary Emulation: The most crucial finding is the precise definition of red teaming. Alex explicitly rejects the broad "offensive security" label and the "infoset color wheel" (red, blue, purple, green teams), advocating instead for adversary emulation. This means red teams don't just "hack"; they research specific real-world threat actors (cybercriminals, nation-states, hacktivists) and meticulously replicate their tactics, techniques, and procedures (TTPs) against the target organization. The goal is to test the organization's defenses against the threats they are most likely to face, rather than just any theoretical attack.
  • Hypothesis Testing for Security: Red teaming is framed as a scientific approach to security validation. The implicit organizational hypothesis ("Our security is fine") is subjected to an experiment: an emulated attack. If the attack succeeds, the hypothesis is disproven, providing invaluable evidence of weaknesses. If it fails, it offers confidence and evidence that controls are working. This objective, evidence-based approach removes subjectivity and provides actionable insights for improvement.
  • Complete Operational Separation: To ensure realistic adversary emulation, the red team must operate with complete operational separation from the target organization's internal infrastructure and identities. This "two-laptop" approach is critical: one for regular work, and a second, untraceable, unmarked "crime laptop" used with completely different email accounts, identities, network infrastructure (e.g., dodgy VPNs, separate cloud infrastructure). This prevents the red team from leveraging internal knowledge or access that a real external attacker wouldn't have, maintaining the integrity of the simulation.
  • Importance of Threat Intelligence (Threat Int): Before any red team operation, a deep understanding of potential adversaries is paramount. Identifying "who would attack you" and "what do they want" is "really, really hard" but essential. This involves leveraging public threat intelligence, internal threat intelligence teams, or specialized companies to determine the most statistically likely threat actors (e.g., ransomware groups for most businesses, nation-states for government entities) and their typical objectives (e.g., financial gain, intelligence theft). This intelligence guides the scope and TTPs of the red team operation.
  • Value Beyond Vulnerability Discovery: While red teaming often uncovers vulnerabilities, its primary value lies in testing the entire security ecosystem, including people, processes, and technology. It validates incident response plans, identifies detection gaps, and provides an unparalleled opportunity for blue teams to practice their skills against a live, informed adversary. The detailed debrief following an operation is crucial, offering both technical insights for engineers and accessible explanations for the broader organization, fostering a stronger security culture and understanding of "why security is important."

Technical Deep Dive

▶ Watch: Hypothetical Red Team Operation: Initial access (10:30)

The technical deep dive of a red team operation, as described by Alex, meticulously mirrors the phases of a real-world cyberattack, emphasizing realism and stealth. The hypothetical scenario involves a cybercrime group targeting "BlatLan" (a fictional company) to steal the production "BlondFluence" database, aiming to extract passwords for further exploitation.

The first critical step for the red team is reconnaissance. Unlike a penetration tester who might leverage internal knowledge, the red team must gather information as an external attacker would. This means using publicly available sources to understand the target company's structure, employee roles, technologies, and any exposed assets. If internal knowledge is used, it must be demonstrably obtainable by an external attacker, leaving a verifiable trail. This ensures the experiment's integrity and prevents unfair advantages.

Initial Access is typically achieved through social engineering, with phishing being a primary vector. Alex details a sophisticated, multi-stage phishing campaign:

  1. Staging: An initial email, disguised as a legitimate service (e.g., "Slack beta"), prompts users to "sign up" by clicking a link. This link doesn't deliver malware but records who clicked, filtering for susceptible targets.
  2. Delivery: A follow-up email, sent only to those who "signed up," instructs them to download the "beta version." This creates an expectation, making the malicious email seem "expected" rather than "unexpected."
  3. Malware Execution: The downloaded "app" (e.g., slack.app on macOS) installs the legitimate application but also discreetly drops malware. The type of malware often reflects the adversary: a less sophisticated cybercrime group might use off-the-shelf tools or open-source malware found on platforms like GitHub, prioritizing ease and speed over custom development.

A crucial technical consideration for macOS targets, as discussed in the Q&A, is Gatekeeper and application signing. While a real Mac app requires a developer certificate, attackers often bypass this by instructing users to manually override security preferences (e.g., "go to security preferences, click here, then here")—a technique users often follow because it's the "state-of-the-art way to install software on Mac OS right now." Alex humorously, yet pointedly, notes that for Mac OS, the tip for dodging antivirus is "don't worry about it, it probably doesn't detect much at all hypothetically anyway," highlighting potential endpoint detection weaknesses.

Once the malware is installed, the compromised target's laptop becomes a beachhead. The red team's "crime laptop" doesn't directly connect to the target; instead, it uses a Command and Control (C2) server or malware server. This C2 server acts as an intermediary, which the red team accesses via SSH. Maintaining operational security for the C2 server is paramount: it must use untraceable IP addresses, domain names, and certificates to prevent attribution back to the red team. This server is the primary point of investigation for blue teams, so its clandestine nature is critical.

Post-exploitation activities involve:

  • Local Reconnaissance: Immediately after gaining access, the red team investigates the compromised laptop's files, looking for sensitive information such as Bash history, SSH keys, AWS access keys, or other credentials in .bashrc or configuration files.
  • Credential Theft: Stealing browser cookies (e.g., Chrome cookies) is a highly effective technique. As Alex notes, a 2019 technique for stealing Chrome cookies might still work today. Stolen cookies allow the attacker to bypass authentication, including multi-factor authentication (MFA), directly logging into web services as the legitimate user.
  • Lateral Movement and Network Access: To access internal resources or networks unavailable externally, the red team establishes a SOCKS proxy through the compromised laptop. This allows the "crime laptop" to route traffic through the target's machine, effectively placing the red team onto the internal network or VPN. This process is often "hard and really fiddly" due to multiple network hops (e.g., crime laptop -> C2 server -> redirector -> target laptop) leading to slow connections. Furthermore, the target laptop going to sleep can terminate the entire proxy chain, requiring careful timing and monitoring of the target's working hours.

A common challenge during post-exploitation is information overload and analysis paralysis. Attackers might find numerous API keys or credentials, but determining their purpose, scope (e.g., production vs. development), validity (expired or active), and where to use them is a complex task. For example, finding an AWS key doesn't immediately reveal if it belongs to a production account or a "random empty boring developer account."

The ultimate objective, stealing the production database, requires a careful sequence of steps, often involving leveraging stolen AWS cookies to access the AWS console. A critical misstep, as highlighted hypothetically, is failing to use the SOCKS proxy, leading to a login from a "shady data center IP address." This immediately triggers AWS GuardDuty or similar alerts, compromising the operation and potentially mobilizing the incident response team. The red team must therefore meticulously mimic real attacker behavior, including their operational security, to avoid premature detection.

Demo / Proof of Concept

▶ Watch: Post-exploitation: Techniques on a compromised laptop (16:00)

Instead of a live demonstration, Alex opted for a detailed hypothetical operation as a comprehensive proof of concept. This narrative served as a structured walkthrough, illustrating the various stages, tools, and challenges of a realistic red team engagement. The scenario involved a fictional company, "BlatLan," whose product, "BlondFluence," was targeted by a cybercrime group aiming to exfiltrate its production database to find passwords.

The "demo" began with the crucial reconnaissance phase, emphasizing that the red team must gather intelligence as an external adversary would, without leveraging privileged internal knowledge unless it's publicly verifiable. This sets the stage for a realistic attack simulation.

The core of the hypothetical operation focused on initial access via a sophisticated, multi-stage phishing campaign. First, a seemingly innocuous email for a "Slack beta" program was sent to employees. Clicking the link merely recorded their email, identifying potential targets. In the second stage, only those who clicked received another email, now "expected," prompting them to download the "beta app." This app, while appearing legitimate, also installed malware – likely an off-the-shelf, open-source tool, characteristic of cybercrime groups prioritizing efficiency. Alex highlighted the macOS-specific challenge of Gatekeeper and how attackers bypass it by instructing users to manually grant permissions, a common user behavior for new software installations.

Once a target laptop was compromised, the "demo" moved into post-exploitation. The red team would establish a C2 server to manage the compromised host, ensuring its IP and domain were untraceable. From this C2, the red team would perform local reconnaissance, searching for sensitive files, SSH keys, and especially browser cookies. The talk specifically mentioned using a 2019 technique to steal Chrome cookies, demonstrating how attackers often reuse known, effective methods to bypass MFA and gain direct access to web services.

A significant part of the "demo" covered lateral movement and persistence, particularly the use of a SOCKS proxy through the compromised laptop to access internal networks. Alex described the practical difficulties: slow connections due to multiple network hops and the fragility of the connection if the target laptop went to sleep. The "demo" then walked through the confusion an attacker faces with information overload, encountering ambiguous API keys or credentials without immediate context.

The ultimate objective, stealing the production database, was hypothetically achieved by leveraging stolen AWS cookies to access the AWS console. The "demo" underscored a critical point about operational security: the red team must use the SOCKS proxy to access AWS from the compromised internal network, rather than directly from their "shady" external C2 IP, which would immediately trigger GuardDuty alerts.

Finally, the "demo" concluded by emphasizing that achieving the objective isn't the end. The red team then attempts to get caught in a plausible manner, allowing the incident response team to practice. This phase is crucial for validating detection capabilities and incident handling procedures. The "confession letter" – a detailed technical and non-technical debrief – completes the hypothetical operation, transforming the "crime" into an invaluable learning experience for the entire organization.

Defensive Implications

▶ Watch: Q&A: Skipping phishing with 'assumed compromise' (24:50)

The insights gleaned from Alex's talk offer several critical implications for defenders, emphasizing a shift from theoretical security to validated resilience:

  • Test Your Controls Realistically: The most fundamental implication is to actively and realistically test all security controls, not just assume they work. This extends beyond technical tools to policies and procedures. Organizations should regularly simulate realistic attack scenarios to identify gaps in endpoint detection and response (EDR), network segmentation, firewall rules, and security information and event management (SIEM) alerts.
  • Enhance Incident Response Practice: Red teaming provides an unparalleled opportunity for the Blue Team and Incident Response (IR) team to practice under realistic pressure. Unlike isolated drills, a red team operation offers a live, informed adversary who can provide a complete debrief afterward, explaining exactly what was missed, why, and how. This feedback loop is invaluable for refining IR playbooks, improving communication, and identifying areas for team training. Crucially, IR teams should be trained to differentiate between a real attack and a red team operation, to avoid unnecessary escalation (e.g., calling the FBI for an internal exercise).
  • Strengthen Phishing Awareness and Defense: The multi-stage phishing technique described highlights the need for advanced user awareness training. Users must be educated not only about unexpected emails but also about "expected" but malicious ones, especially those that follow an initial interaction. Technical controls should focus on robust email filtering, URL sandboxing, and attachment analysis to detect and block such sophisticated campaigns. Organizations should also consider MFA for all critical services, but be aware that cookie theft can bypass this, necessitating additional session validity checks and endpoint security.
  • Improve Endpoint Detection on macOS (and other platforms): Alex's anecdotal comment about macOS antivirus being less effective ("don't worry about it, it probably doesn't detect much at all") underscores a potential blind spot. Defenders should rigorously evaluate their EDR solutions' efficacy against common malware and TTPs, especially for less commonly targeted operating systems. This includes detection of unsigned applications, process injection, and suspicious file access patterns.
  • Monitor for Post-Exploitation Activities: The talk details common post-exploitation actions like stealing SSH keys, AWS credentials, and browser cookies. Defenders need robust logging and monitoring for:
  • Unusual access to credential stores or configuration files.
  • Unauthorized attempts to exfiltrate browser data.
  • Anomalous logins to cloud consoles (e.g., AWS) from unexpected IP addresses or regions, which should trigger AWS GuardDuty or similar alerts.
  • Establishing SOCKS proxies or other tunneling mechanisms from internal hosts to external C2 infrastructure.
  • Foster a Security-Aware Culture: The importance of accessible debriefs cannot be overstated. Sharing both technical and non-technical write-ups of red team operations across the organization helps everyone understand the tangible impact of security. This fosters a "security-first" culture, illustrating "why security is important" and helping employees connect their daily actions to the organization's overall resilience.
  • Mature Threat Intelligence Capabilities: The emphasis on threat intelligence for guiding red team operations also applies to defense. Organizations must understand their most likely adversaries, their motivations, and their TTPs. This intelligence should inform the prioritization of defensive controls, the tuning of detection rules, and the design of security architectures.

Key Takeaways

  • Red teaming validates security through adversary emulation: It’s not just general hacking, but a precise simulation of real threat actors' TTPs to test an organization's actual resilience against likely threats.
  • Security needs hypothesis testing: Don't assume your security works; actively test it like a scientific experiment to gain evidence of its effectiveness or identify critical gaps.
  • Maintain strict operational separation: Red teams must operate as external adversaries, using separate infrastructure and identities to ensure the realism and integrity of the simulation.
  • Phishing remains a primary initial access vector: Sophisticated, multi-stage phishing campaigns that create "expected" interactions are highly effective and require robust technical and human defenses.
  • Post-exploitation focuses on credentials and lateral movement: Attackers prioritize stealing browser cookies (to bypass MFA) and internal credentials, then establishing proxies for access to internal networks.
  • Detailed debriefs are crucial for organizational learning: Comprehensive technical and non-technical reports after an operation drive security culture change, improve incident response, and provide actionable insights for defenders.

About the Speaker(s)

Alex, who goes by "Alex in double quotes" (a hacker name adopted after journalists repeatedly referred to them as "a hacker in double quotes"), is a seasoned red team professional with experience at various tech companies, including Atlassian. Alex has a notable history in the cybersecurity community, having publicly disclosed former Australian Prime Minister Tony Abbott's passport and phone number found online in 2020 without facing arrest. Beyond their professional red team work, Alex is also an organizer for PurpleCon, a cybersecurity conference held in Sydney. At the time of this talk, Alex humorously noted their current professional status as "unemployed," embracing a new "gig" of complete freedom. Their presentation style combines technical depth with engaging anecdotes and a critical perspective on industry norms.

Reviews

→ Top-rated talks at BSides Canberra VII (2024)

All talks from BSides Canberra VII (2024)