Visibility beyond perimeters: Detecting C2 at time of execution
Nate Warfield
BruCON 0x0D · Day 1
Overview
In this BruCON talk, security researcher and CTI League co-founder Nate Warfield delivers a compelling and practical presentation on the critical need for organizations to understand and actively assess their external attack surface. Moving beyond theoretical discussions, Warfield dives into real-world examples of how readily available reconnaissance tools can expose severe vulnerabilities in enterprise-grade "black box" security products and how command-and-control (C2) infrastructure is being tracked and disrupted. The talk emphasizes that many significant breaches stem not from sophisticated zero-days, but from fundamental security hygiene failures and easily discoverable misconfigurations.

Key moments
- 0:00 Introduction: Talk's purpose, ransomware, supply chain attacks.
- 4:50 Vulnerabilities in "black box" security solutions like Citrix.
- 13:20 Advanced F5 exploitation: web shells, file system re-mounts, SSL key theft.
- 17:40 Correlating GreyNoise and Shodan for vulnerability assessment.
- 29:00 Taking over C2 domains to spy on malware activity.
- 34:30 CTI League helping hospitals; challenges with information sharing.
- 39:50 Taking over 90% of Maris botnet C2 infrastructure.
- 45:00 Q&A: Visibility challenges in cloud and edge computing.
Visibility beyond perimeters: Detecting C2 at time of execution
Speakers: Nate Warfield
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=GU5x5rBGg6g
Overview
In this BruCON talk, security researcher and CTI League co-founder Nate Warfield delivers a compelling and practical presentation on the critical need for organizations to understand and actively assess their external attack surface. Moving beyond theoretical discussions, Warfield dives into real-world examples of how readily available reconnaissance tools can expose severe vulnerabilities in enterprise-grade "black box" security products and how command-and-control (C2) infrastructure is being tracked and disrupted. The talk emphasizes that many significant breaches stem not from sophisticated zero-days, but from fundamental security hygiene failures and easily discoverable misconfigurations.
Warfield's core message resonates deeply with the current cybersecurity landscape, which is increasingly plagued by pervasive ransomware attacks, complex supply chain compromises, and an expanding perimeter due to remote work. He challenges the notion that expensive security solutions automatically confer protection, demonstrating how even leading vendors like Citrix and F5 have fallen victim to easily exploitable path traversal vulnerabilities. The presentation serves as a stark reminder that proactive, continuous assessment of an organization's internet-facing assets is paramount to identifying and remediating weaknesses before malicious actors exploit them.
The talk is particularly relevant for security practitioners, network administrators, and incident responders grappling with the challenges of securing hybrid cloud environments and distributed workforces. Warfield provides actionable insights into leveraging open-source intelligence (OSINT) tools like Shodan and GreyNoise for proactive threat hunting and perimeter assessment. Furthermore, he sheds light on the innovative methods employed by the CTI League to disrupt and analyze malware C2 communications, offering a unique perspective on collective defense against commodity and professional malware threats.
Background
▶ Watch: Introduction: Talk's purpose, ransomware, supply chain attacks. (0:00)
The contemporary cybersecurity landscape is characterized by an ever-escalating battle against sophisticated and widespread threats. Nate Warfield, drawing upon his extensive experience as a senior researcher for Windows Defender ATP at Microsoft and his work pushing out patches for the MSRC, highlights several critical trends contributing to this challenging environment. Firstly, the relentless surge of ransomware continues to outpace defensive efforts, often leading to extended dwell times within victim networks before detection. Organizations frequently find themselves reacting to encrypted systems rather than preventing initial compromise.
Secondly, supply chain attacks, exemplified by incidents like SolarWinds and Kaseya, have underscored a fundamental weakness: attackers are increasingly targeting vendors and partners to gain backdoor access to their ultimate targets. This introduces a complex interdependency where an organization's security posture is only as strong as its weakest link within its supply chain. Assessing the security stance of partners, especially during mergers, acquisitions, or B2B VPN connectivity, remains an intractable problem for many.
Thirdly, the shift to remote working exacerbated by the COVID-19 pandemic has dramatically expanded the traditional network perimeter. What was once confined to a data center or corporate office now extends to hybrid cloud infrastructures and individual remote worker homes, complete with consumer-grade routers and devices that are often neglected from a security perspective. This distributed perimeter presents a much larger attack surface for threat actors.
Finally, Warfield critically examines the reliance on "black box" security products—expensive, all-in-one solutions from vendors like Citrix and F5—which are often perceived as impenetrable. He argues that these devices, despite their cost and intended purpose, are frequently found to have critical vulnerabilities. These vulnerabilities are often simple in nature, highlighting a pervasive lack of thorough code review or proactive threat modeling by vendors, even after similar attack vectors have been publicly disclosed. This sets the stage for the talk's deep dive into specific examples and practical methods for uncovering such weaknesses.
Key Findings
▶ Watch: Advanced F5 exploitation: web shells, file system re-mounts, SSL key theft. (13:20)
Warfield's talk unveils several critical findings regarding the state of modern cybersecurity and attacker methodologies:
- Widespread Exposure of Vulnerable "Black Box" Products: Despite their high cost and enterprise-grade reputation, devices from vendors like Citrix and F5 are routinely exposed to the internet with critical, easily exploitable vulnerabilities. Warfield cites Citrix NetScaler (CVE-2019-19781) and F5 BIG-IP (CVE-2021-22986) as prime examples. These vulnerabilities often leverage simple path traversal techniques, some of which were publicly disclosed years prior, indicating a systemic failure in vendor security practices and customer patching.
- Rapid, Automated Exploitation: Once a vulnerability is publicly disclosed, especially with a readily available Proof-of-Concept (PoC), automated attacks against internet-facing systems begin almost immediately. For the Citrix vulnerability, automated exploitation was observed within a single day of a detailed blog post. Attackers quickly adapt, employing techniques like URL encoding to bypass initial, simplistic mitigation efforts.
- Persistence and Lateral Movement Focus: Attackers exploiting these perimeter devices are not merely defacing websites. They establish persistence by creating valid user accounts, remounting file systems to drop web shells or Monero miners, and then reverting file systems to read-only mode to hide their tracks. They also deploy tools like Python-based port scanners and SMB clients directly on the compromised devices (which often run Linux), facilitating lateral movement into the internal network.
- Data Exfiltration and Credential Theft: Beyond initial access, attackers actively mine compromised devices for sensitive information. In the F5 BIG-IP case, they specifically targeted Secure Vault device keys used to decrypt SSL certificates and backup files, allowing them to steal certificates and their associated passwords for further attacks or impersonation. They also abuse legitimate REST APIs with newly created credentials, blending in with normal administrative traffic.
- Effectiveness of OSINT Tools for Perimeter Assessment: Tools like Shodan and GreyNoise are incredibly powerful for discovering exposed assets and understanding global scanning activity. Warfield demonstrates how these tools can quickly identify unpatched systems, open management interfaces, and even specific vulnerabilities, enabling organizations to proactively assess their own and their partners' external attack surfaces.
- Insights from C2 Infrastructure Takeovers: By taking over Command and Control (C2) domains (a process akin to sinkholing but with active data collection), CTI League gains unique visibility into global malware distribution and victimology. This method provides real-time intelligence on which malware families are active, their geographical spread (e.g., the observed lack of ransomware traffic in Russian-speaking countries), and the types of data exfiltrated (e.g., usernames, passwords, OS versions).
- Simple Mistakes Lead to Major Breaches: The overarching finding is that the majority of successful attacks do not rely on expensive zero-days. Instead, they exploit "dumb programming problems" and simple misconfigurations (e.g., RDP without Network Level Authentication, exposed admin panels, unpatched software). The primary differentiator between secure and compromised organizations often comes down to basic security hygiene and continuous external assessment.
Technical Deep Dive
▶ Watch: Taking over C2 domains to spy on malware activity. (29:00)
The technical core of Warfield's talk revolves around demonstrating how seemingly complex attacks often hinge on fundamental flaws and how readily available tools can be leveraged for both offense and defense.
Vulnerabilities and Exploitation Techniques
Warfield highlights two major "black box" product vulnerabilities:
- Citrix NetScaler (CVE-2019-19781): This was a path traversal vulnerability disclosed in December 2019. The exploit leveraged a specific string,
../vpns/cfg/smb/smb.conf, to read arbitrary files. Attackers quickly evolved, using URL encoding (%2e%2e%2f) to bypass basic Web Application Firewall (WAF) rules that merely blocked the literal../sequence. The rapidity of automated exploitation (within one day of public PoC) underscored the urgency of patching. - F5 BIG-IP (CVE-2021-22986): Disclosed on June 30, 2021, this was another path traversal vulnerability affecting the management UI. The critical aspect was the discovery of a hidden Traffic Management Shell (tmsh), a JSP-based command-line client with zero public documentation, running on the same management interface. Attackers discovered a separate PoC, distinct from the researcher's initial finding, and within 24 hours, widespread exploitation was observed. The PoC often involved
..;/ sequences similar to a 2018 Black Hat Asia talk by Orange Tsai, indicating a lack of cross-vendor learning and remediation.
Attackers exploiting F5 devices demonstrated sophisticated post-exploitation techniques:
- User Creation for Persistence: Instead of noisy C2, attackers simply created valid user accounts, leading to log messages like "user already exists" as multiple attackers hit the same device.
- File System Remounting: F5 devices typically have a read-only user file system for integrity. Attackers developed a command string to remount the file system in read-write mode, drop web shells, Monero miners, or other tools, and then revert it to read-only, making detection challenging.
- Credential Harvesting: Attackers actively mined the devices for Secure Vault device keys, which are used to decrypt SSL certificates and backup files. This allowed them to steal SSL certificates and their associated passwords, enabling further attacks.
- Lateral Movement Tools: They loaded Python-based port scanners (as
nmapwas not present by default) and SMB clients to map and access internal Windows infrastructure behind the F5. - Abuse of REST APIs: Post-compromise, attackers used legitimate, vendor-supported REST APIs with their newly created valid credentials, making their activity blend in with normal administrative traffic and difficult to detect.
OSINT Tools for Discovery and Assessment
Warfield emphasizes the power of OSINT tools for external perimeter assessment:
- Shodan: Described as "the flight recorder for the internet," Shodan indexes internet-connected devices based on banners, services, and vulnerabilities.
- Queries: Users can search by
ports,products,organization,asn, and even specific CVE numbers (with an enterprise license). - Self-Signed Certificates (
ssl.cert.has_expired:false ssl.cert.self_signed:true): This powerful query identifies admin panels and other services using self-signed certs, often indicative of forgotten or misconfigured devices. Warfield recounts finding a healthcare printer with an active print job and no admin password using this method. - HTTP HTML Content (
http.html): By observing the raw HTML of a service, specific unique strings can be identified and searched for. This was crucial for discovering thousands of F5 management interfaces that weren't explicitly tagged by Shodan. - Titles (
title): Effective for finding specific router or switch interfaces (e.g.,title:"Cisco ASA"). - SSL Subject (
ssl.subject): Wildcard searches for terms like "VPN" or "PBX" within SSL certificate subjects to identify device types. - Vulnerability Tag (
vuln:true): With an enterprise license, Shodan can confirm actual vulnerabilities (e.g.,ms17-010for Wannacry). xzeroslatnet00: A special Shodan query that represents the entire internet, useful for broad research.- GreyNoise: A sensor network that collects and categorizes "internet noise" – indiscriminate scanning, attacks, and benign activity.
- Noise Reduction: Helps incident responders filter out known benign scanners (e.g., Bing crawlers) or widespread attacks, allowing focus on targeted threats.
- Threat Augmentation: By inputting an IP address identified by GreyNoise as performing, for example, MS SQL brute-forcing, one can cross-reference with Shodan to see if that IP hosts a vulnerable MS SQL server, indicating a likely compromise.
- Packet Capture Download: A beta feature allows users to download PCAP files of traffic hitting GreyNoise sensors for specific IPs and timeframes, offering invaluable forensic data (e.g., username
sa, passwordsain an MS SQL brute-force attempt).
C2 Infrastructure Takeover and Analysis
Warfield, through his work with CTI League, describes an innovative approach to understanding and disrupting malware C2:
- Domain Takeover: Instead of subpoenas, CTI League works with DNS registrars to legally take over C2 domains used by malware. This is not a full infrastructure takeover but provides a critical choke point.
- Sensor Networks: By operating these seized domains, CTI League runs sensors that act as sinkholes, collecting telemetry from infected machines attempting to beacon out.
- Data Collected: These sensors capture critical information like victim IP addresses (masking DNS recursion), usernames, passwords, machine names, operating system versions (e.g., "Windows 7 SP1" with a "User-Agent: iPhone"), and unique payloads. This data reveals the true scale and nature of infections.
- Insights: This methodology provides a unique global view of malware activity, including the geographical distribution of ransomware (Ryuk, Sodinokibi, WastedLocker, Maze) and RATs/Trojans (IcedID, Nanocore, QakBot, TrickBot, Cobalt Strike). It famously demonstrates the low incidence of ransomware in Russian-speaking countries.
- Maris Botnet Example: CTI League took over 90% of the C2 infrastructure for the Maris botnet, observing over 120,000 unique infected IPs. This botnet, more advanced than Mirai, uses built-in router OS commands, posing a significant risk for the affected ISPs, healthcare, government, and manufacturing sectors.
Warfield also briefly touches on ideas for further disruption, acknowledging their legal limitations: BGP hijacking attacker networks, inserting tracking images into exfiltrated data (like the Dutch police did with Hansa Market), sending ransomware payloads back to attackers, or remotely deleting malware—all deemed illegal for private entities.
Demo / Proof of Concept
▶ Watch: CTI League helping hospitals; challenges with information sharing. (34:30)
While the talk does not feature a live, interactive demonstration of exploiting a system, Nate Warfield thoroughly describes the methodologies and provides concrete examples of how Proof of Concept (PoC) exploits work and how OSINT tools are used to discover vulnerable systems. He effectively walks the audience through the process of discovery and exploitation, making the "demo" an illustrative narrative rather than a live execution.
For instance, Warfield details the path traversal vulnerabilities in Citrix NetScaler (CVE-2019-19781) and F5 BIG-IP (CVE-2021-22986). He shows the specific ..;/ or ../vpns/cfg/smb/smb.conf strings used in the PoCs and explains how attackers quickly adapted to use URL encoding (%2e%2e%2f) to bypass basic WAFs. This explanation serves as a conceptual PoC, showing what the exploit looks like and how it functions.
He illustrates the power of Shodan through several compelling scenarios:
- Finding Vulnerable NetScalers: He shows screenshots of Shodan queries identifying vulnerable NetScalers.
- Printer Demonstration: Warfield recounts a real-world scenario where he used Shodan's
ssl.cert.self_signed:truequery to identify an internet-exposed Hewlett Packard printer for a large US agency. He demonstrated to the CISO that the printer's admin panel had no password set and offered to set one himself, highlighting the immediate, tangible risk. - F5 Management Interface Discovery: He explains how the
http.htmlquery was instrumental in finding over 10,000 exposed F5 management interfaces that weren't explicitly tagged. By identifying unique HTML elements from a known F5 admin page, they could then search Shodan for all matching instances. - RDP Exposure: Warfield points out that Shodan screenshots of RDP servers indicate a lack of Network Level Authentication (NLA), making them vulnerable to exploits like BlueKeep if unpatched.
Similarly, for GreyNoise, he shows how it categorizes scanning activity and how an IP identified by GreyNoise as performing MS SQL brute-forcing can be cross-referenced with Shodan to confirm a vulnerable MS SQL server, indicating a likely compromise. He also provides a screenshot of a GreyNoise packet capture showing a username sa password sa attempt, illustrating the raw data collected.
The CTI League's C2 takeover methodology is also presented as a "proof of concept" for collective defense. Warfield displays geographical heatmaps of ransomware and botnet activity (Ryuk, Sodinokibi, Maris), derived from the data collected by their sinkhole sensors. These visuals serve as compelling evidence of the insights gained from their unique approach to C2 monitoring.
In essence, the "demo" aspect of the talk lies in Warfield's vivid descriptions and the visual evidence presented from his research, which collectively demonstrate the efficacy of the discussed techniques and tools.
Defensive Implications
▶ Watch: Q&A: Visibility challenges in cloud and edge computing. (45:00)
Nate Warfield's talk provides crucial defensive implications for organizations looking to bolster their security posture against the threats he outlines:
- Proactive External Attack Surface Management: Organizations must actively and continuously assess their internet-facing assets. Relying solely on internal audits or vendor assurances is insufficient. Tools like Shodan and GreyNoise should be integrated into routine security hygiene. Regular Shodan searches for your organization's IP ranges, ASNs, and specific product versions can uncover forgotten or misconfigured devices, exposed admin panels, and unpatched systems.
- Aggressive Patch Management: The prevalence of exploits for known, often years-old, vulnerabilities in critical network devices (Citrix NetScaler, F5 BIG-IP) underscores the absolute necessity of a robust and timely patch management program. This includes not just servers and endpoints, but also network appliances, load balancers, firewalls, and VPN concentrators, which often sit at the network's core.
- Harden "Black Box" Products: Do not assume that expensive, enterprise-grade security products are inherently secure or correctly configured out of the box. Critically review vendor guidance, disable unnecessary services, restrict management interfaces to internal networks only, and apply security best practices. The F5 example, where the management interface was inadvertently enabled on floating HSRP addresses, highlights this point.
- Implement Network Level Authentication (NLA) for RDP: Warfield explicitly mentions that RDP screenshots on Shodan indicate a lack of NLA. Enabling NLA for all RDP access is a critical step to prevent pre-authentication vulnerabilities (like BlueKeep) from being exploited and to reduce the attack surface.
- Enhanced Partner Security Assessment: Given the rise of supply chain attacks, organizations need to move beyond simple questionnaires when assessing partner security. Leveraging OSINT tools to externally assess a partner's perimeter can provide a more objective and real-time understanding of their security posture, especially during M&A activities or B2B integrations.
- Monitor for Persistence Mechanisms: Defenders should be vigilant for signs of persistence, such as the creation of new, unauthorized user accounts on critical devices or unexpected file system changes (e.g., read-write remounts). Logging and monitoring for these activities are crucial.
- Leverage Threat Intelligence from C2 Monitoring: While direct C2 domain takeovers might not be feasible for individual organizations, understanding the insights gained from such efforts (like CTI League's work) can inform threat hunting and defensive strategies. Knowing common malware families, their C2 patterns, and geographical targets can help prioritize defensive efforts and tailor detection rules.
- Focus on Fundamental Security Hygiene: The "90s called and they want their exploits back" takeaway is a powerful call to action. Instead of chasing hypothetical zero-days, organizations should prioritize fixing "dumb programming problems" and common misconfigurations. This includes strong password policies, multi-factor authentication, principle of least privilege, and regular security audits.
- Support and Collaborate with Initiatives like CTI League: Warfield highlights the challenges faced by healthcare organizations in accepting free threat intelligence. Fostering a culture of collaboration with non-profit security groups and information sharing organizations (ISACs/ISAOs) can significantly improve collective defense, especially for vulnerable sectors.
Key Takeaways
- Simple Exploits Reign Supreme: Most successful breaches stem from easily discoverable vulnerabilities like path traversals and misconfigurations, not sophisticated zero-days. Organizations are often compromised due to basic security hygiene failures.
- Know Your External Perimeter: Proactively and continuously assess your internet-facing assets using tools like Shodan and GreyNoise. Assume your perimeter is larger and more exposed than you think, especially with remote work and hybrid cloud environments.
- "Black Box" Products Are Not Bulletproof: Expensive enterprise security solutions from vendors like Citrix and F5 are frequently vulnerable to common exploitation techniques. Do not treat them as impenetrable; scrutinize their configurations and keep them patched diligently.
- Attackers Seek Persistence and Data: Beyond initial access, threat actors prioritize creating persistent access (e.g., new user accounts, web shells) and mining compromised devices for valuable data like SSL certificates, passwords, and backup files to facilitate lateral movement and further exploitation.
- C2 Monitoring Provides Invaluable Intelligence: Taking over and monitoring Command and Control (C2) infrastructure offers unique, real-time insights into global malware distribution, victimology, and attacker methodologies, helping to inform collective defense efforts.
- Mistakes Are the Most Common Vulnerability: Attackers are not waiting for zero-days; they are waiting for organizations to make mistakes—unpatched systems, exposed management interfaces, default credentials. Consistent, proactive defense is the best offense.
About the Speaker(s)
Nate Warfield is a seasoned security researcher and network hacker with over 20 years of experience in the field. He previously served as a Senior Researcher for Windows Defender ATP at Microsoft, where he gained deep insights into advanced threat detection. Prior to that, he spent approximately four and a half years with the Microsoft Security Response Center (MSRC), responsible for pushing out patches on Patch Tuesday.
Warfield is a prominent figure in the cybersecurity community, known for his conference speaking engagements at events like BruCON (where he previously spoke three years prior), Kaspersky SAS, B-Sides, and Blue Hat. He is also a co-founder of the CTI League, a volunteer organization that emerged in 2020 to provide threat intelligence and assistance, particularly to the healthcare sector during the pandemic. His work with CTI League, which involved taking over and analyzing command-and-control (C2) infrastructure, earned recognition from Wired magazine and a panel appearance with Dr. Fauci. His expertise spans network security, threat intelligence, and vulnerability research.