Abstract
The Internet of Things (IoT) has become indispensable to our daily lives and work. Unfortunately, developers often reuse software libraries in the IoT firmware, leading to a major security concern. If vulnerabilities or insecure versions of these libraries go unpatched, a massive number of IoT devices can be impacted. In this paper, we propose AutoFirm, an automated tool for detecting reused libraries in IoT firmware at a large scale. Specifically, AutoFirm leverages syntax information (library name and version) to determine whether IoT firmware reuses specific libraries. We conduct a large-scale empirical study of reused libraries in IoT firmware, investigating more than 6,900+ firmware images and 2,700+ distinct vulnerabilities affecting 11,300+ vulnerable versions from 349 open-source software libraries. Our research reveals that manufacturers neglected to update outdated libraries in 67.3% of cases, with outdated libraries persisting for over 1.34 years on average prior to remediation.
Introduction
The development of IoT firmware—the "brain" of smart routers, cameras, and other connected devices—rarely starts from scratch. To optimize development time and costs, manufacturers heavily reuse open-source libraries such as busybox, openssl, and dnsmasq. However, this practice introduces significant supply chain risks. A single security flaw in a widely used library can render thousands of disparate products vulnerable.
Identifying these libraries at scale is a formidable challenge. Traditional methods often rely on manual inspection, which is too slow, or complex binary similarity analysis, which is computationally prohibitive for large datasets. AutoFirm addresses these limitations by providing an automated pipeline to expose hidden security risks in the IoT supply chain.
Methodology: The AutoFirm Pipeline
AutoFirm is designed as an end-to-end tool that automates the discovery of vulnerable libraries through three distinct stages:
- Automated Collection: Utilizing a web crawler built on the Scrapy framework and BrowserMob Proxy, the tool automatically navigates manufacturer websites to download firmware images and associated metadata, such as release dates and product models.
- Library Identification: The tool uses
binwalkto unpack the firmware's filesystem. Rather than employing slow "fuzzy matching," AutoFirm leverages syntax information. It scans binary headers and strings for library names and version numbers using a specialized set of regular expressions. - Vulnerability Mapping: Once a (library, version) pair is identified, it is cross-referenced with the National Vulnerability Database (NVD) using Common Platform Enumeration (CPE) strings to map specific CVEs.
Empirical Study and Datasets
To evaluate the state of IoT security, we conducted a massive empirical study using a newly collected dataset:
- Firmware: 6,901 firmware images from 21 major manufacturers (e.g., TP-Link, D-Link, ASUS, Netgear).
- Vulnerabilities: 11,342 vulnerable library instances involving 2,729 distinct CVEs.
- Libraries: 349 open-source software libraries categorized into command-line tools, built-in components, UNIX tools, and general open-source libraries.
Key Findings
Our analysis revealed several alarming trends regarding the "persistence gap" and manufacturer neglect:
- Widespread Outdated Code: 67.3% of the analyzed firmware contained outdated libraries. Even when manufacturers released "new" firmware versions, the underlying libraries often remained untouched in the majority of cases.
- Persistence of Vulnerabilities: On average, an outdated library persists in firmware for 1.34 years before being updated. Furthermore, 80% of the identified CVEs were at least four years old at the time the firmware was published.
- Significant Version Lag: 80% of reused libraries were at least 50 version intervals behind the latest stable release, indicating that manufacturers are using ancient code rather than just missing the most recent patches.
- Device Complexity and Risk: There is a direct correlation between device complexity and library count. Routers, for instance, typically contain up to 36 libraries, presenting a much larger attack surface than simpler devices like cameras.
Limitations and Future Work
Despite its effectiveness, AutoFirm faces challenges such as firmware encryption, which prevents filesystem unpacking, and the removal of version strings (stripping) from binaries. Additionally, proprietary compression formats can sometimes hinder standard unpacking tools. Future research will explore methods to bypass these hurdles, including sniffing Over-the-Air (OTA) updates and direct memory dumping.
Conclusion
AutoFirm demonstrates that the IoT ecosystem suffers from systemic library reuse issues and a lack of timely security updates. By automating the identification of these vulnerabilities at scale, we provide a necessary tool for improving the transparency and security of the IoT supply chain.
Summary updated