Research on Known Vulnerability Detection Method Based on Firmware Analysis

Wenjing Wang, Tengteng Zhao, Xiaolong Li, Lei Huang, Wei Zhang, Hui GuoJournal of Cyber Security 2022 · DOI

Abstract

At present, the network security situation is becoming more and more serious. Malicious network attacks such as computer viruses, Trojans and hacker attacks are becoming more and more rampant. National and group network attacks such as network information war and network terrorism have a serious damage to the production and life of the whole society. At the same time, with the rapid development of Internet of Things and the arrival of 5G era, IoT devices as an important part of industrial Internet system, have become an important target of infiltration attacks by hostile forces. This paper describes the challenges facing firmware vulnerability detection at this stage, and introduces four automatic detection and utilization technologies in detail: based on patch comparison, based on control flow, based on data flow and ROP attack against buffer vulnerabilities. On the basis of clarifying its core idea, main steps and experimental results, the limitations of its method are proposed. Finally, combined with four automatic detection methods, this paper summarizes the known vulnerability detection steps based on firmware analysis, and looks forward to the follow-up work.

What Problem Does This Paper Address?

The Internet of Things (IoT) has expanded to over 20 billion devices, yet security has not kept pace. A critical concern is the severity of these vulnerabilities; statistical analysis of approximately 10,600 IoT vulnerabilities reveals that over 4,500 (nearly 42%) are classified as "high-risk." This proportion is significantly higher than that found in traditional software industries.

Distribution of IoT vulnerability risk levels.

Analyzing IoT firmware presents unique hurdles that traditional software analysis cannot easily overcome:

  • Architectural Diversity: Unlike the X86-dominated PC world, IoT devices use a fragmented mix of ARM, MIPS, and PowerPC architectures.
  • The "Simulation Gap": Only about 13%–20% of firmware can be successfully simulated using tools like QEMU because of heavy dependencies on custom hardware peripherals.
  • Closed Ecosystems: Manufacturers rarely provide source code, and firmware is often compressed or encrypted, making it difficult to even obtain the binary for analysis.

Methods

The paper synthesizes existing research into a comparative framework, focusing on four automated "utilization" (exploit construction) technologies. These methods range from patch-based analysis to sophisticated data-flow manipulation.

Comparison of automated vulnerability detection and utilization methods.
  1. Patch Comparison (e.g., APEG): This method compares a vulnerable version of a binary with its patched version. By identifying where "filter conditions" (security checks) were added in the patch, researchers can work backward to find inputs that trigger the original bug.
  2. Control Flow Oriented (e.g., AEG, MAYHEM): These tools use symbolic execution—a method of "executing" a program with variables instead of real values—to find paths that lead to unsafe states (like buffer overflows).
  3. Data Flow Oriented (e.g., FlowStitch): A more stealthy approach that doesn't change the program's execution path. Instead, it identifies known memory errors to tamper with critical variables (like user permissions) at key positions in the data stream.
  4. ROP Attack Construction (e.g., Q): Return-Oriented Programming (ROP) is a technique used to bypass security protections like Data Execution Prevention (DEP). It strings together tiny snippets of existing, legitimate code (called Gadgets) to perform malicious actions. Tools like "Q" can automatically find these gadgets and build functional exploit chains.

Key Insights and Standardized Workflow

  • The Homology Advantage: Because IoT developers frequently reuse open-source components to save costs, "homology analysis" (finding code similarities) is a highly effective way to discover known vulnerabilities across different device brands.
  • The Shift to Data Flow: As defenses for control-flow hijacking (like Control Flow Integrity) become more common, data-flow-oriented attacks (like FlowStitch) are becoming the new frontier because they are harder to detect and can bypass many modern protections.
  • Standardized Workflow: The authors propose a 7-step "routine" for firmware analysis: Information Collection $\rightarrow$ Firmware Acquisition $\rightarrow$ Feature Analysis $\rightarrow$ File System Extraction $\rightarrow$ Static Analysis $\rightarrow$ Simulation $\rightarrow$ Dynamic Scanning.

Key Results

  • Exploit Diversity: The tool PolyAEG was highlighted for its ability to generate up to 4,724 different exploit samples for a single control-flow vulnerability, demonstrating the power of automated "fuzzing" and taint analysis.
  • Bypassing ASLR: The FlowStitch tool successfully constructed 19 utilization samples across 8 vulnerabilities; notably, 10 of these could successfully execute even in environments with Address Space Layout Randomization (ASLR) enabled.

Limitations and Future Work

The authors identify several persistent "bottlenecks":

  • Simulation Failures: The inability to model peripheral I/O remains the biggest hurdle for dynamic analysis.
  • Anti-Analysis Techniques: Current tools struggle with obfuscated or encrypted firmware.
  • Turing Completeness: Some automated ROP generators (like Q) do not yet guarantee "Turing completeness," meaning they can't always build any arbitrary logic the attacker might want.

Future Direction: The authors call for more research into "homology analysis" to rapidly identify bugs in large-scale firmware repositories and better simulation environments for non-OS-based (bare-metal) embedded systems.

Summary updated

Abstract

At present, the network security situation is becoming more and more serious. Malicious network attacks such as computer viruses, Trojans and hacker attacks are becoming more and more rampant. National and group network attacks such as network information war and network terrorism have a serious damage to the production and life of the whole society. At the same time, with the rapid development of Internet of Things and the arrival of 5G era, IoT devices as an important part of industrial Internet system, have become an important target of infiltration attacks by hostile forces. This paper describes the challenges facing firmware vulnerability detection at this stage, and introduces four automatic detection and utilization technologies in detail: based on patch comparison, based on control flow, based on data flow and ROP attack against buffer vulnerabilities. On the basis of clarifying its core idea, main steps and experimental results, the limitations of its method are proposed. Finally, combined with four automatic detection methods, this paper summarizes the known vulnerability detection steps based on firmware analysis, and looks forward to the follow-up work.
BibTeX
@article{wang2022research,
  author = {Wenjing Wang and Tengteng Zhao and Xiaolong Li and Lei Huang and Wei Zhang and Hui Guo},
  title = {{Research on Known Vulnerability Detection Method Based on Firmware Analysis}},
  journal = {Journal of Cyber Security},
  year = {2022},
  doi = {10.32604/jcs.2022.026816},
}
Figure