计算机科学 ›› 2024, Vol. 51 ›› Issue (11): 347-355.doi: 10.11896/jsjkx.230700091
司健鹏, 洪征, 周振吉, 陈乾, 李涛
SI Jianpeng, HONG Zheng, ZHOU Zhenji, CHEN Qian, LI Tao
摘要: 现有动态插桩方法大多基于x86/x64指令集,对嵌入式设备常用的RISC兼容性较差,且在应用嵌入式设备时存在插桩效率低、资源消耗大等问题。文中提出了一种面向嵌入式设备的动态插桩方法DIEB(Dynamic Instrumentation Method for Embedded Physical Devices)。DIEB在嵌入式设备中使用以控制转移指令为探针的探测模式对目标进程进行动态二进制插桩。DIEB提出了一种轻量化的解释执行指令方法,根据指令的运行环境设置指令解释执行区域,并在解释执行区域中解释执行指令获取执行结果。在目标进程动态运行过程中,DIEB通过解释执行用作探针的控制转移指令,获取控制转移指令的目的地址,从而跟踪目标进程的执行流,在软硬件资源紧张的嵌入式设备上高效地进行动态插桩。ARM指令集是一种典型的RISC指令集,测试实验以ARM指令集为验证对象,在NetGear R7000等设备上进行。实验结果表明,经过DIEB插桩的进程可以正常运行,插桩导致的时延远小于基于ptrace的插桩方式,解决了PIN,Dynamorio等现有动态插桩框架难以在嵌入式设备上运行的问题。此外,DIEB具有在多线程环境下稳定运行的能力,可以准确记录并发线程的执行流轨迹。
中图分类号:
[1] KNUD L,MOHAMMAD H,SINHA S,et al.IOT ANALYTICS:State of IoT-Spring 2022[EB/OL].(2022-05-18)[2023-08-11].https://iot-analytics.com/product/state-of-iot-spring-2022/. [2] CHINA Communications Standards Association:Internet ofThings Operating System Security White Paper(2022)[EB/OL].(2022-09-08)[2023-08-11] http://blog.nsfocus.net/wp-content/uploads/2022/09/iot-whitepaper.pdf. [3] National Computer Virus Emergency Treatment Center:An Investigation Report on the Network Attack Incidents of Northwestern Polytechnic University by NSA of the United States[EB/OL].(2022-09-05)[2023-08-11].https://www.cverc.org.cn/head/zhaiyao/news20220905-NPU.htm. [4] Zalewski M:American fuzzy lop[EB/OL].(2017-11-04)[2023-08-11].https://lcamtuf.coredump.cx/afl/. [5] LUK C,COHN R,MUTH R,et al.Pin:Building customizedprogram analysis tools with dynamic instrumentation[J].Association for Computing Machinery,2005,40(6):190-200. [6] BRUENING D,GARNETT T,AMARASINGHE S,et al.An infrastructure for adaptive dynamic optimization[C]//International Symposium on Code Generation and Optimization.2003:265-275. [7] SRIVASTAVA P,PENG H,LI J,et al.FirmFuzz:Automated IoT firmware introspection and analysis[C]//Proceedings of the 2nd International ACM Workshop on Security and Privacy for the Internet-of-Things.2019:15-21. [8] ZHANG H,KAI L,XU Z,et al.SIoTFuzzer:Fuzzing Web Interface in IoT Firmware via Stateful Message Generation[J].Applied Sciences,2021,11(7):3120. [9] ZHANG Y,HUO W,K P,et al.SRFuzzer:An automatic fuzzing framework for physical SOHO router devices to discover multi-type vulnerabilities[C]//Proc.35th Annu.Computer Security Applications Conf.2019:544-556. [10] KIM J,YU J,KIM H,et al.FIRM-COV:High-Coverage Greybox Fuzzing for IoT Firmware via Optimized Process Emulation[J].IEEE Access,2021,9:101627-101642. [11] FENG X,SUN R,ZHU X,et al.Snipuzz:Black-box fuzzing of iot firmware via message snippet inference[C]//Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security.2021:337-350. [12] NILO R,ANDREA C,DIPANJAN D,et al.DIANE:Identifying Fuzzing Triggers in Apps to Generate Under-constrained Inputs for IoT Devices[C]//2021 IEEE Symposium on Security and Privacy.2021:484-500. [13] CHEN J,DIAO W,ZHAO Q,et al.IoTFuzzer:Discoveringmemory corruptions in IOT through APP-based fuzzing[C]//Proceedings of the 2018 Network and Distributed System Secu-rity Symposium.2018. [14] JANG D,KIM T,KIM D,et al.Dynamic Analysis Tool for IoT Device[C]//2020 International Conference on Information and Communication Technology Convergence.IEEE,2020:1864-1867. [15] ZHENG Y,SONG Z,SUN Y,et al.An efficient greybox fuzzing scheme for linux-based iot programs through binary static analysis[C]//2019 IEEE 38th International Performance Computing and Communications Conference.IEEE,2019:1-8. [16] ZHENG Y,DAVANIAN A,YIN H,et al.FIRM-AFL:High-Throughput Greybox Fuzzing of IoT Firmware via Augmented Process Emulation[C]//USENIX Security Symposium.2019:1099-1114. |
|