{"title":"RTOSExtracter:在剥离的基于rtos的固件中提取用户定义的函数","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":"{\"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}","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}
RTOSExtracter: Extracting user-defined functions in stripped RTOS-based firmware
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.