Empowering IoT Security: Automated Identification of Standard Library Functions in RTOS Firmware With LLM and RAG

View at publisher
Authors: Zhihan Zheng, Yu-An Tan, Zihan Chen, Lu Zheng, Weizhi Meng, Shuo Wang
Cited by: 1
References: 49

Abstract

Reverse engineering embedded firmware for Real-Time Operating Systems (RTOS) is a formidable challenge in Internet of Things security. The common practice of stripping symbolic information from firmware to optimize performance and storage makes identifying standard library functions exceptionally difficult, creating a significant bottleneck for functional analysis and vulnerability discovery. This paper introduces a novel, automated method for identifying these functions in RTOS firmware by leveraging Large Language Models. Our approach operates directly on raw binary code, requiring no symbolic or debugging information, and demonstrates broad generalizability across diverse hardware architectures and compilers. At its core, the method combines Retrieval-Augmented Generation (RAG) to enhance identification accuracy with a newly designed Adaptive Iterative Screening Algorithm (AISA), which optimizes analysis efficiency by prioritizing candidate functions based on a weighted score of call frequency, call depth, and address proximity to reduce token costs. We validated our method through rigorous experimentation on Zephyr RTOS firmware spanning nine architectures (e.g., ARM, MIPS, RISC-V). The results are compelling: our approach achieves a 90.59% accuracy rate in identifying standard library function names. Moreover, its application to commercial IoT firmware confirms its high efficiency, identifying functions significantly faster and more economically than traditional heuristic techniques. This work contributes a powerful, general-purpose, and cost-effective solution for automated firmware analysis.

Fields of Study & Subjects

Advanced Malware Detection Techniques Security and Verification in Computing Software System Performance and Reliability

Publication details

Journal / source
IEEE Internet of Things Journal
Publisher
Institute of Electrical and Electronics Engineers (IEEE)
Volume
13
Issue
11
Pages
23876–23889
Publication date
5 March 2026
Language
EN