RTOSExtracter: Extracting user-defined functions in stripped RTOS-based firmware

Xinguang Xie, Junjian Ye, Lifa Wu, Rong Li
{"title":"RTOSExtracter: Extracting user-defined functions in stripped RTOS-based firmware","authors":"Xinguang Xie, Junjian Ye, Lifa Wu, Rong Li","doi":"10.1109/CyberC55534.2022.00024","DOIUrl":null,"url":null,"abstract":"In recent years, Real-Time Operating System (RTOS) has been widely used in the Internet of Things (IoT) devices in many fields. Meanwhile, IoT devices running RTOS are facing an increasing number of security vulnerabilities, which are caused mainly by user-defined functions. Therefore, researchers usually need to manually identify and analyze user-defined functions in the firmware to detect vulnerabilities. However, stripped RTOS-based firmware does not contain the debug symbols such as function names. There is no clear boundary between the system and user-defined functions, making it laborious and inefficient to identify user-defined functions from the thousands of functions.In this paper, we design and implement RTOSExtracter, an automated static analysis tool for identifying user-defined functions and their names in stripped RTOS-based firmware, which can be extended to support multiple RTOS types. This tool can disassemble the target firmware, recover the names of the task creation APIs, identify the parameter structure, and generate the parameter values that contain user-defined function addresses and function name addresses. To evaluate RTOSExtracter, we implemented a prototype of RTOSExtracter on IDA Pro with support for five common types of RTOS including FreeRTOS, LiteOS, RT-Thread, μC/OS-II, and μC/OS-III. We compiled 30 open-source projects covering these five RTOS types with 12 different compilers and optimizations and generated 275 firmware without the debug symbols to test RTOSExtracter. The experimental results show that RTOSExtracter identifies user-defined function addresses and function name addresses with high accuracy and low time cost. Furthermore, the case study shows that RTOSExtracter can effectively identify user-defined functions and their names in actual firmware.","PeriodicalId":234632,"journal":{"name":"2022 International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery (CyberC)","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery (CyberC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CyberC55534.2022.00024","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

In recent years, Real-Time Operating System (RTOS) has been widely used in the Internet of Things (IoT) devices in many fields. Meanwhile, IoT devices running RTOS are facing an increasing number of security vulnerabilities, which are caused mainly by user-defined functions. Therefore, researchers usually need to manually identify and analyze user-defined functions in the firmware to detect vulnerabilities. However, stripped RTOS-based firmware does not contain the debug symbols such as function names. There is no clear boundary between the system and user-defined functions, making it laborious and inefficient to identify user-defined functions from the thousands of functions.In this paper, we design and implement RTOSExtracter, an automated static analysis tool for identifying user-defined functions and their names in stripped RTOS-based firmware, which can be extended to support multiple RTOS types. This tool can disassemble the target firmware, recover the names of the task creation APIs, identify the parameter structure, and generate the parameter values that contain user-defined function addresses and function name addresses. To evaluate RTOSExtracter, we implemented a prototype of RTOSExtracter on IDA Pro with support for five common types of RTOS including FreeRTOS, LiteOS, RT-Thread, μC/OS-II, and μC/OS-III. We compiled 30 open-source projects covering these five RTOS types with 12 different compilers and optimizations and generated 275 firmware without the debug symbols to test RTOSExtracter. The experimental results show that RTOSExtracter identifies user-defined function addresses and function name addresses with high accuracy and low time cost. Furthermore, the case study shows that RTOSExtracter can effectively identify user-defined functions and their names in actual firmware.
RTOSExtracter:在剥离的基于rtos的固件中提取用户定义的函数
近年来,实时操作系统(RTOS)在物联网(IoT)设备的许多领域得到了广泛的应用。同时,运行实时操作系统的物联网设备面临越来越多的安全漏洞,这些漏洞主要是由用户自定义函数造成的。因此,研究人员通常需要手动识别和分析固件中的用户自定义功能来检测漏洞。然而,剥离的基于rtos的固件不包含调试符号,如函数名。系统和用户定义函数之间没有明确的界限,这使得从成千上万的函数中识别用户定义函数变得既费力又低效。在本文中,我们设计并实现了RTOSExtracter,这是一个自动静态分析工具,用于识别基于剥离RTOS的固件中的用户定义函数及其名称,该工具可以扩展到支持多种RTOS类型。该工具可以对目标固件进行拆解,恢复任务创建api的名称,识别参数结构,生成包含自定义功能地址和功能名称地址的参数值。为了评估RTOSExtracter,我们在支持FreeRTOS、LiteOS、RT-Thread、μC/OS-II和μC/OS-III五种常用RTOS的IDA Pro上实现了RTOSExtracter的原型。我们用12种不同的编译器和优化编译了30个开源项目,涵盖了这5种RTOS类型,并生成了275个固件,没有调试符号来测试RTOSExtracter。实验结果表明,RTOSExtracter对用户自定义函数地址和函数名地址的识别精度高,时间成本低。此外,案例研究表明,RTOSExtracter可以有效地识别实际固件中的用户定义函数及其名称。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信