All Your Cloud Are Belong To Us – Hunting Compromise in Azure
Nate Warfield (Senior Security Program Manager · Microsoft Security Response Center)
BruCON 0x0A · Day 2
Overview
In his compelling BruCON 2018 talk, "All Your Cloud Are Belong To Us – Hunting Compromise in Azure," Nate Warfield, a Senior Security Program Manager at the Microsoft Security Response Center (MSRC), delivers a sobering assessment of cloud security. Warfield, a veteran of network engineering and a key figure in managing critical vulnerabilities like MS17-010, highlights a disturbing trend: the resurgence of fundamental networking and security misconfigurations in the rapidly expanding cloud environment. The talk dissects how the perceived ease and speed of cloud deployment are leading organizations to repeat the very mistakes that took decades to rectify in traditional on-premises infrastructures, resulting in widespread compromise and significant financial and reputational damage.

Key moments
- 0:00 Introduction and speaker background
- 3:20 Cloud security repeating old networking mistakes
- 9:00 Using Shodan's 'compromised' tag for hunting
- 13:00 Dangerous default firewall configurations in cloud VMs
- 19:00 Real-time location tracking using OwnTracks via MQTT
- 30:00 WannaCry, NotPetya, and increased cloud SMB exposure
- 34:30 Cloud shared responsibility: your security, your problem
- 47:00 GreyNoise: hunting internet-wide scanning and botnet activity
All Your Cloud Are Belong To Us – Hunting Compromise in Azure
Speakers: Nate Warfield, Senior Security Program Manager, Microsoft Security Response Center
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=7BTcqSrxyXs
Overview
In his compelling BruCON 2018 talk, "All Your Cloud Are Belong To Us – Hunting Compromise in Azure," Nate Warfield, a Senior Security Program Manager at the Microsoft Security Response Center (MSRC), delivers a sobering assessment of cloud security. Warfield, a veteran of network engineering and a key figure in managing critical vulnerabilities like MS17-010, highlights a disturbing trend: the resurgence of fundamental networking and security misconfigurations in the rapidly expanding cloud environment. The talk dissects how the perceived ease and speed of cloud deployment are leading organizations to repeat the very mistakes that took decades to rectify in traditional on-premises infrastructures, resulting in widespread compromise and significant financial and reputational damage.
Warfield's presentation is a deep dive into the practical realities of cloud compromise, moving beyond theoretical threats to demonstrate real-world attacks he observed unfolding in Azure and across other major cloud providers. He illustrates how basic oversights, such as leaving NoSQL databases or IoT messaging brokers exposed without authentication, create vast attack surfaces. The talk meticulously details the evolution of attacker tactics, from opportunistic ransomware campaigns targeting misconfigured services to the more insidious and profitable cryptomining operations that leverage compromised cloud resources at the victim's expense.
This article explores Warfield's critical insights, providing a technical breakdown of his findings, the tools and methodologies he employed for threat hunting, and the stark defensive implications for organizations navigating the complexities of cloud adoption. It serves as a stark reminder that while the underlying infrastructure of major cloud providers like Azure is robust, the shared responsibility model places a significant burden on tenants to secure their deployments, a responsibility often overlooked with severe consequences.
Background
▶ Watch: Introduction and speaker background (0:00)
The genesis of cloud computing promised unprecedented agility, scalability, and cost efficiency, often marketed with the appealing notion that traditional IT overheads—like dedicated security, network, and firewall teams—could be drastically reduced or even eliminated. This narrative, while attractive to many organizations, inadvertently fostered an environment where fundamental principles of network security, painstakingly learned over decades, began to erode. Warfield, drawing on his 18 years of experience in network engineering, vividly contrasts the rigorous, multi-layered approval processes required to open a single port in a corporate network (a six-week ordeal for a DNS endpoint at Microsoft) with the cavalier ease of deploying cloud resources today.
The core problem, as Warfield identifies, is that the "network neighborhood" mentality of the late 1990s, where publicly routable IPs and open file shares were common, has resurfaced in the cloud at an unprecedented scale. This isn't about zero-day vulnerabilities, which Warfield typically deals with at MSRC; rather, it's about "permissions problems at cloud scale." Organizations, eager to leverage the cloud's benefits, are spinning up services without adequate security oversight, often relying on default configurations or poorly understood templates. This leads to databases, messaging brokers, and other critical services being exposed to the internet with no authentication or insufficient firewall rules, effectively inviting compromise. This regression to early internet security practices underscores a critical gap in understanding and implementation within the burgeoning cloud ecosystem.
Key Findings
▶ Watch: Using Shodan's 'compromised' tag for hunting (9:00)
Nate Warfield's research uncovered several critical findings that underscore the pervasive security challenges in cloud environments:
- Widespread NoSQL Database Compromises: A significant number of NoSQL databases (including Redis, Elasticsearch, and MongoDB) were found exposed to the internet without authentication. Despite explicit warnings in vendor documentation against this practice, over 120,000-130,000 machines globally, and approximately 5,000 Azure VMs, were compromised through simple reconfigurations by attackers.
- Insecure Cloud Marketplace Defaults: Warfield's enumeration of VM images in the Azure Gallery and AWS Marketplace revealed a systemic issue: many third-party images are configured to open an excessive number of ports by default upon deployment. One egregious example cited an image opening 83 ports, including NetBIOS (137/89), directly to the internet. This highlights a critical supply chain risk within cloud marketplaces.
- Explosive Growth of Insecure MQTT Brokers: The MQTT (Message Queuing Telemetry Transport) protocol, widely used in IoT and smart home automation, saw a staggering 1485% increase in exposed instances within a year. Many of these brokers lacked authentication, allowing anyone to subscribe to sensitive data streams, including real-time location information from applications like OwnTracks.
- Shodan as a Blue Team Tool: Warfield demonstrated Shodan's immense power for external attack surface management. He developed a "compromised" tag within Shodan, which automatically identifies misconfigured and exploited services. He also contributed to the integration of Common Platform Enumeration (CPE) to CVE (Common Vulnerabilities and Exposures) mapping, enabling rapid identification of vulnerable software versions exposed to the internet.
- Post-WannaCry SMB Exposure Paradox: Despite the global impact of WannaCry and NotPetya, which leveraged SMBv1 vulnerabilities (MS17-010), Azure's exposure of SMB to the internet increased by 13% in the months following these major outbreaks. This illustrates a persistent failure to apply critical security lessons.
- Shift to Cryptomining: Attackers rapidly adapted from noisy, often unprofitable ransomware to stealthier cryptomining operations. These attacks target unsecured resources, such as Docker instances (leveraging vulnerabilities like CVE-2017-2375 for unauthenticated HTTP API access) or S3 buckets, to mine cryptocurrencies like Monero at the victim's expense, despite cloud mining being highly unprofitable for the attacker relative to the victim's costs.
- GreyNoise for Threat Intelligence: Warfield showcased GreyNoise, a system for tracking internet scanning activity, as a powerful tool for identifying botnets, understanding attacker intent, and predicting emerging threats. By correlating GreyNoise data with Shodan, he could discern global and regional scanning patterns, revealing specific interests of different attacker groups (e.g., Tencent Cloud's focus on PHP attacks).
Technical Deep Dive
▶ Watch: Real-time location tracking using OwnTracks via MQTT (19:00)
Warfield's methodology for uncovering these cloud compromises was deeply technical, leveraging a combination of custom scripting and powerful public-facing tools.
His initial investigation into NoSQL database compromises began in August 2016, observing attackers dropping an SSH root host key named crackit into Redis machines. This evolved into a more widespread ransomware-like campaign in early 2017, targeting MongoDB, Redis, and Elasticsearch instances. Attackers would drop a new database, often humorously named "Bobby Tables," and leave a ransom note demanding Bitcoin. Warfield initially used Shodan to download all available data on open database servers, then employed command-line tools like JQ and complex grep strings to parse JSON output and identify compromised instances by specific database names. Recognizing the manual effort, he collaborated with John Matherly, Shodan's creator, to integrate a Python script that automatically detects these compromises, leading to the creation of the Shodan compromised tag. This tag, requiring an enterprise Shodan license (approximately $10,000 USD), is regularly updated with new detection logic, though Warfield open-sourced the core Python script on GitHub for wider community use.
The problem of default cloud firewall configurations was explored by enumerating the Azure Gallery, which at the time contained between 1,200 and 1,800 VM images. Warfield discovered that while Microsoft-published images generally exposed minimal ports by default, a significant number of third-party images were alarmingly permissive. He found instances opening up to 83 ports to the internet, including legacy services like NetBIOS (ports 137 and 89), which should never be internet-facing. This issue, he emphasized, is not unique to Azure, with AWS Marketplace exhibiting similar patterns. However, AWS's lack of programmatic API access to pre-deployment firewall configurations made comprehensive enumeration much more challenging.
The alarming rise in insecure MQTT broker exposure was identified using Shodan queries for MQTT (typically ports 1883 and 8883). Warfield noted a 1485% increase in online MQTT brokers within a single year. The critical vulnerability here was the widespread lack of authentication, allowing any client to connect and subscribe to all available message feeds. He demonstrated this with the OwnTracks application, an open-source location tracking tool. By connecting a simple Mosquitto client to an exposed OwnTracks broker, he was able to obtain real-time latitude, longitude, battery status, and connection information, effectively tracking individuals' movements. This finding had significant real-world implications, as highlighted by a domestic violence support worker who recognized the potential for abuse.
Warfield also detailed the evolution of vulnerability mapping. When faced with requests to identify vulnerable Exim mail servers after a critical Remote Code Execution (RCE) vulnerability, he initially had to manually download Shodan data, parse Common Platform Enumeration (CPE) fields for version information, and cross-reference with known CVEs. To streamline this, he again worked with Shodan to integrate automatic CPE-to-CVE mapping. This enterprise-level feature now automatically lists potential CVEs for identified software versions. Crucially, Shodan also includes a verified: true/false flag, indicating whether the vulnerability has been actively tested and confirmed (e.g., for certain SMB vulnerabilities), a feature intentionally restricted to prevent mass exploitation by script kiddies.
The shadow of MS17-010 loomed large in his discussion of SMB exposure. After Microsoft patched the vulnerability in March 2017, and Shadow Brokers released the EternalBlue exploit and DoublePulsar implant in April, Warfield was tasked with assessing Azure's exposure. At the time, 14,000 Azure VMs had SMB exposed to the internet. Using a Python script developed by NCC Group to detect DoublePulsar, he manually processed these IPs. Shockingly, despite the global impact of WannaCry and NotPetya, Azure's internet-facing SMB exposure increased by 13% in the subsequent months. He theorized that NotPetya's propagation, which leveraged PsExec, Mimikatz, and unpatched VMs, primarily escaped Ukraine via point-to-point VPN links like ExpressRoute or Direct Connect, potentially bridging compromised cloud VMs with on-premises networks. He also highlighted the danger of organizations allowing entire cloud regions into their firewalls due to dynamic IP ranges, rather than utilizing more granular service tags.
The shift from ransomware to cryptomining was a key observation in 2018. Warfield explained that ransomware proved too noisy and often unprofitable at scale. Attackers pivoted to silently installing cryptocurrency miners, particularly Monero and CoinHive, on compromised cloud resources. He cited an attack leveraging CVE-2017-2375, an unauthenticated HTTP API in Docker, to deploy XMRig Monero miners. These attackers were so brazen they even maintained a public GitHub page for their mining software. The economic absurdity of this was noted: cloud mining is approximately 20 times more expensive in cloud compute costs than the cryptocurrency profit generated, but the cost is borne by the victim.
Finally, Warfield introduced GreyNoise, a system developed by Andrew Morris, which collects data on internet scanning activity, distinguishing targeted attacks from background noise. By correlating GreyNoise data (scanning IPs, ports, payloads, user agent strings) with Shodan information, Warfield could identify botnets (e.g., Mu botnet, Mirai) and track the adoption of new exploits. He demonstrated how Apache Struts exploit scans were tracked from their initial appearance to wider proliferation. His analysis also revealed distinct regional scanning patterns, with Tencent Cloud showing a disproportionate interest in PHP and PHPMyAdmin attacks, and even his own cellular carrier (T-Mobile) exhibiting significant Mirai botnet activity. This capability allows for a more granular understanding of global threat landscapes and predictive threat intelligence.
Demo / Proof of Concept
▶ Watch: WannaCry, NotPetya, and increased cloud SMB exposure (30:00)
While Nate Warfield's talk did not feature traditional live, interactive demonstrations, he effectively presented compelling empirical evidence and real-world findings from his extensive research, serving as powerful "proofs of concept" for the vulnerabilities and attack methods discussed.
For instance, in illustrating the dangers of insecure MQTT brokers, Warfield presented screenshots and described his process of connecting to an unauthenticated OwnTracks server. He detailed how he subscribed to its feeds using a Mosquitto client and subsequently observed real-time latitude, longitude, battery percentage, and connection status of a device in the Czech Republic. He then used Google Maps to plot the movements of this device over several hours, vividly demonstrating the immediate and personal impact of such data leakage. This was a clear, actionable demonstration of how easily sensitive location data could be exfiltrated from misconfigured IoT services.
Similarly, when discussing the widespread compromise of NoSQL databases, he displayed screenshots of Shodan search results. These visuals highlighted instances where databases had been renamed by attackers (e.g., "Bobby Tables") or contained ransom notes, providing concrete evidence of the scale and nature of these compromises. His explanation of the Shodan compromised tag and the underlying Python script further underscored the automated detection capability he developed.
The section on vulnerability mapping showcased Shodan's new CPE-to-CVE feature, with screenshots illustrating how specific IP addresses were flagged with potential CVEs, including a verified: true status for certain SMB vulnerabilities. This demonstrated the tool's ability to provide immediate, actionable intelligence on external-facing systems.
Regarding the Docker cryptomining attacks, Warfield described the detailed findings from investigating customers' compromised Azure VMs. He explained how attackers deployed XMRig Monero miners via unauthenticated Docker APIs, even pointing to the attackers' GitHub page with details on their miner. This served as a demonstration of a real-world, sophisticated attack chain that he and his team successfully identified and mitigated.
Finally, the extensive use of GreyNoise data involved numerous graphs and statistical breakdowns. These visual proofs illustrated scanning trends for specific exploits (like Apache Struts), geographical scanning patterns (e.g., Tencent Cloud's PHP focus, Belgium's relatively clean networks), and the prevalence of botnet activity (e.g., Mirai coming from cloud providers and even mobile networks). These data-driven insights served as a powerful demonstration of how advanced threat intelligence platforms can be used to understand the broader internet threat landscape.
In essence, Warfield's "demos" were not simulated attacks but rather documented evidence and analytical visualizations of actual attacks and widespread misconfigurations observed in the wild, providing a compelling and sobering picture of cloud security realities.
Defensive Implications
▶ Watch: GreyNoise: hunting internet-wide scanning and botnet activity (47:00)
Nate Warfield's talk provides critical, actionable guidance for defenders operating in cloud environments, emphasizing that securing cloud deployments is a shared responsibility that often falls heavily on the tenant.
- Prioritize PaaS and SaaS: Whenever possible, organizations should migrate to Platform-as-a-Service (PaaS) or Software-as-a-Service (SaaS) models. These services shift a significant portion of the security burden, including patching and underlying infrastructure hardening, to the cloud provider. For example, with SaaS, the provider manages everything, allowing tenants to "deploy it, forget about it, go home, have a beer." For PaaS, while some configuration is required (e.g., setting up failure domains for updates), the patching and maintenance of the platform are handled by the provider.
- Harden IaaS Deployments Immediately: If Infrastructure-as-a-Service (IaaS) is unavoidable, treat it with the same diligence as an on-premises datacenter.
- Update VMs Immediately: Third-party VM images from cloud marketplaces are often outdated and may contain vulnerabilities or misconfigurations. As soon as an IaaS VM is deployed, it must be fully updated and patched, as the cloud provider does not patch tenant-owned operating systems.
- Review and Configure Firewall Settings: Never trust default firewall configurations (Network Security Groups (NSGs) in Azure, Security Groups in AWS) for marketplace images. Manually review and restrict inbound and outbound traffic to only what is absolutely necessary. Warfield noted that many images open excessive and dangerous ports by default.
- Build Custom Images: For IaaS, create and use custom, hardened VM images. This ensures that the base configuration meets organizational security standards and eliminates reliance on potentially insecure vendor defaults.
- Monitor Outbound Connectivity: Cloud environments often allow outbound internet connectivity by default. This default facilitates cryptomining, command-and-control (C2) communication, and data exfiltration from compromised systems. Implement strict outbound firewall rules and monitor for anomalous outbound traffic.
- Avoid Broad Firewall Rules: Do not allow entire cloud regions (e.g., "Azure West") through on-premises firewalls or VPN connections (like ExpressRoute or Direct Connect). This creates an enormous attack surface. Utilize more granular controls, such as service tags or specific IP ranges, if available and manageable.
- Leverage Cloud-Native Security Tools: Utilize cloud provider security services like Azure Security Center. The free tier offers basic security recommendations and can flag obvious misconfigurations. For more advanced threat detection and response, invest in paid tiers or third-party security agents.
- Integrate External Attack Surface Management (EASM): Tools like Shodan and GreyNoise are invaluable for blue teams.
- Use Shodan to identify internet-facing assets, discover open ports, and detect known compromises or vulnerable software versions (via the
compromisedtag and CPE-to-CVE mapping). - Utilize GreyNoise to understand inbound scanning activity, identify botnets, and gain early warning of emerging exploit trends, allowing defenders to prioritize patching and hardening efforts.
- Educate DevOps and Development Teams: Reiterate the fundamental principles of network security. The speed of cloud deployment should not come at the expense of security best practices. Developers and DevOps engineers, often responsible for deploying cloud resources, must understand the implications of insecure defaults and the shared responsibility model.
- Beware of Cloud Marketplaces as Supply Chains: Treat VM images and container registries (like Docker Hub) from third-party marketplaces as potential supply chain risks. Malicious actors are increasingly embedding malware, cryptominers, or backdoors into these images. Thoroughly vet and scan any third-party software before deployment.
Key Takeaways
- Cloud security is a shared responsibility: While cloud providers secure the "cloud itself," customers are responsible for securing "in the cloud." For IaaS, this means diligent patching, secure configurations, and proactive monitoring are paramount.
- Default configurations are often insecure: Cloud marketplace VM images and service defaults frequently expose unnecessary ports and services, creating vast attack surfaces. Never trust defaults; always review and harden.
- Old network mistakes are resurfacing at cloud scale: The ease of cloud deployment has led to a regression in security practices, with fundamental errors like unauthenticated databases and exposed NetBIOS becoming widespread.
- Attackers are financially motivated and adaptable: The shift from noisy ransomware to stealthier, more profitable cryptomining highlights attackers' focus on monetizing compromised cloud resources, often at the victim's significant expense.
- External threat intelligence is crucial: Tools like Shodan and GreyNoise are indispensable for identifying internet-facing vulnerabilities, tracking attacker scanning activity, and gaining early insights into emerging threats and botnet operations.
- Prioritize PaaS/SaaS and custom images: To minimize security overhead and leverage the cloud's inherent security benefits, favor PaaS or SaaS models. For unavoidable IaaS, build and deploy custom, hardened images rather than relying on potentially insecure marketplace offerings.
About the Speaker(s)
Nate Warfield is a Senior Security Program Manager at the Microsoft Security Response Center (MSRC). In his role, he is responsible for managing vulnerabilities across critical Microsoft products, including Windows, the kernel, server products, and the hypervisor. Notably, he was instrumental in handling the MS17-010 vulnerability, which became infamous through the WannaCry and NotPetya outbreaks, as well as significant CPU vulnerabilities. Before joining Microsoft, Nate accumulated 18 years of experience in network engineering, a field he began exploring at a young age, hacking networks over 2400 baud dial-up internet since he was 12 or 13. He actively shares his research and scripts on GitHub, contributing to the broader security community.