Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3623278.3624759acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article
Open access

FITS: Inferring Intermediate Taint Sources for Effective Vulnerability Analysis of IoT Device Firmware

Published: 07 February 2024 Publication History
  • Get Citation Alerts
  • Abstract

    Finding vulnerabilities in firmware is vital as any firmware vulnerability may lead to cyberattacks to the physical IoT devices. Taint analysis is one promising technique for finding firmware vulnerabilities thanks to its high coverage and scalability. However, sizable closed-source firmware makes it extremely difficult to analyze the complete data-flow paths from taint sources (i.e., interface library functions such as recv) to sinks.
    We observe that certain custom functions in binaries can be used as intermediate taint sources (ITSs). Compared to interface library functions, using custom functions as taint sources can significantly shorten the data-flow paths for analysis. However, inferring ITSs is challenging due to the complexity and customization of firmware. Moreover, the debugging information and symbol table of binaries in firmware are stripped; therefore, prior techniques of inferring taint sources are not applicable except laborious manual analysis. To this end, this paper proposes FITS to automatically infer ITSs. Specifically, FITS represents each function with a novel behavioral feature representation that captures the static and dynamic properties of the function, and ranks custom functions as taint sources through behavioral clustering and similarity scoring.
    We evaluated FITS on 59 large, real-world firmware samples. The inference results of FITS are accurate: at least one of top-3 ranked custom functions can be used as an ITS with 89% precision. ITSs helped Karonte find 15 more bugs and helped the static taint engine find 339 more bugs. More importantly, 21 bugs have been awarded CVE IDs and rated high severity with media coverage.

    References

    [1]
    Kapil Anand, Khaled Elwazeer, Aparna Kotha, Matthew Smithson, Rajeev Barua, and Angelos Keromytis. An accurate stack memory abstraction and symbolic analysis framework for executables. In 2013 IEEE International Conference on Software Maintenance, pages 90--99. IEEE, 2013.
    [2]
    Manos Antonakakis, Tim April, Michael Bailey, Matt Bernhard, Elie Bursztein, Jaime Cochran, Zakir Durumeric, J Alex Halderman, Luca Invernizzi, and Michalis Kallitsis. Understanding the mirai botnet. In 26th USENIX security symposium, pages 1093--1110, 2017.
    [3]
    Pieter Arntz. Threat spotlight: Wastedlocker, customized ransomware. https://blog.malwarebytes.com/threat-spotlight/2020/07/threat-spotlight-wastedlocker-customized-ransomware, 2020. Accessed 2022-9-10.
    [4]
    Fiorella Artuso, Giuseppe Antonio Di Luna, Luca Massarelli, and Leonardo Querzoni. In nomine function: Naming functions in stripped binaries with neural networks. arXiv preprint arXiv:1912.07946, 2019.
    [5]
    Gogul Balakrishnan, Thomas Reps, David Melski, and Tim Teitelbaum. Wysin-wyx: What you see is not what you execute. In Working Conference on Verified Software: Theories, Tools, and Experiments, pages 202--213. Springer, 2005.
    [6]
    Muhammad Arif Butt, Zarafshan Ajmal, Zafar Iqbal Khan, Muhammad Idrees, and Yasir Javed. An in-depth survey of bypassing buffer overflow mitigation techniques. Applied Sciences, 12(13):6702, 2022.
    [7]
    Daming D. Chen, Maverick Woo, David Brumley, and Manuel Egele. Towards automated dynamic analysis for linux-based embedded firmware. In Annual Network and Distributed System Security Symposium, NDSS 2016, San Diego, California. USA, February 21--24, 2016, 2016.
    [8]
    Jiongyi Chen, Wenrui Diao, Qingchuan Zhao, Chaoshun Zuo, Zhiqiang Lin, XiaoFeng Wang, Wing Cheong Lau, Menghan Sun, Ronghai Yang, and Kehuan Zhang. Iotfuzzer: Discovering memory corruptions in iot through app-based fuzzing. In Annual Network and Distributed System Security Symposium, NDSS, 2018.
    [9]
    Libo Chen, Yanhao Wang, Quanpu Cai, Yunfan Zhan, Hong Hu, Jiaqi Linghu, Qinsheng Hou, Chao Zhang, Haixin Duan, and Zhi Xue. Sharing more and checking less: Leveraging common input keywords to detect bugs in embedded systems. In 30th USENIX Security Symposium (USENIX Security 21), pages 303--319, 2021.
    [10]
    GUO Xiang-Ying MF CHEN Rui, YANG Meng-Fei. Interrupt data race detection based on shared variable access order pattern. Journal of Software, 27(3):547--561, 2016.
    [11]
    Kai Cheng, Dongliang Fang, Chuan Qin, Huizhao Wang, Yaowen Zheng, Nan Yu, and Limin Sun. Automatic inference of taint sources to discover vulnerabilities in soho router firmware. In Audun Jøsang, Lynn Futcher, and Janne Hagen, editors, ICT Systems Security and Privacy Protection, pages 83--99, Cham, 2021. Springer International Publishing.
    [12]
    Kai Cheng, Qiang Li, Lei Wang, Qian Chen, Yaowen Zheng, Limin Sun, and Zhenkai Liang. Dtaint: detecting the taint-style vulnerability in embedded device firmware. In 2018 48th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), pages 430--441. IEEE, 2018.
    [13]
    Abraham A Clements, Eric Gustafson, Tobias Scharnowski, Paul Grosen, David Fritz, Christopher Kruegel, Giovanni Vigna, Saurabh Bagchi, and Mathias Payer. HALucinator: Firmware re-hosting through abstraction layer emulation. In 29th USENIX Security Symposium (USENIX Security 20), pages 1201--1218. USENIX Association, August 2020.
    [14]
    Lucian Cojocar, Jonas Zaddach, Roel Verdult, Herbert Bos, Aurélien Francillon, and Davide Balzarotti. Pie: Parser identification in embedded systems. In Proceedings of the 31st Annual Computer Security Applications Conference, pages 251--260, 2015.
    [15]
    Preprocessing data. https://scikit-learn.org/stable/modules/preprocessing.html, 2022. Accessed 2022-10-10.
    [16]
    NATIONAL VULNERABILITY DATABASE. https://nvd.nist.gov/, 2022. Accessed 2022-10-10.
    [17]
    Yaniv David, Uri Alon, and Eran Yahav. Neural reverse engineering of stripped binaries using augmented control flow graphs. Proceedings of the ACM on Programming Languages, 4(OOPSLA):1--28, 2020.
    [18]
    Steven H. H. Ding, Benjamin C. M. Fung, and Philippe Charland. Asm2vec: Boosting static representation robustness for binary clone search against code obfuscation and compiler optimization. In 2019 IEEE Symposium on Security and Privacy (SP), pages 472--489, 2019.
    [19]
    E-M-B-A. Emba. https://github.com/e-m-b-a/embak, 2022. Accessed 2022-9-10.
    [20]
    Bo Feng, Alejandro Mera, and Long Lu. P2im: Scalable and hardware-independent firmware testing via automatic peripheral interface modeling. In 29th USENIX Security Symposium (USENIX Security 20), pages 1237--1254, 2020.
    [21]
    Qian Feng, Rundong Zhou, Chengcheng Xu, Yao Cheng, Brian Testa, and Heng Yin. Scalable graph-based bug search for firmware images. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pages 480--491, 2016.
    [22]
    Xiaotao Feng, Ruoxi Sun, Xiaogang Zhu, Minhui Xue, Sheng Wen, Dongxi Liu, Surya Nepal, and Yang Xiang. Snipuzz: Black-box fuzzing of iot firmware via message snippet inference. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pages 337--350, 2021.
    [23]
    Fabio Gritti, Fabio Pagani, Ilya Grishchenko, Lukas Dresel, Nilo Redini, Christopher Kruegel, and Giovanni Vigna. Heapster: Analyzing the security of dynamic allocators for monolithic firmware images. In 2022 IEEE Symposium on Security and Privacy (SP), pages 1082--1099. IEEE, 2022.
    [24]
    Jingxuan He, Pesho Ivanov, Petar Tsankov, Veselin Raychev, and Martin Vechev. Debin: Predicting debug information in stripped binaries. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pages 1667--1680, 2018.
    [25]
    Yi He, Zhenhua Zou, Kun Sun, Zhuotao Liu, Ke Xu, Qian Wang, Chao Shen, Zhi Wang, and Qi Li. Rapidpatch: Firmware hotpatching for real-time embedded devices. In 31st USENIX Security Symposium (USENIX Security 22), pages 2225--2242, 2022.
    [26]
    Hex-rays. Ida pro. https://www.hex-rays.com/ida-pro. Accessed 2022-9-10.
    [27]
    Itnews. https://www.itnews.com.au/XXXXX, 2022. Accessed 2022-10-10.
    [28]
    Xin Jin, Kexin Pei, Jun Yeon Won, and Zhiqiang Lin. Symlm: Predicting function names in stripped binaries via context-sensitive execution-aware code embeddings. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security, pages 1631--1645, 2022.
    [29]
    Mingeun Kim, Dongkwan Kim, Eunsoo Kim, Suryeon Kim, Yeongjin Jang, and Yongdae Kim. Firmae: Towards large-scale emulation of iot firmware for dynamic analysis. In Annual Computer Security Applications Conference, pages 733--745, 2020.
    [30]
    Eduard Kovacs. 70 percent of iot devices vulnerable to cyberattacks. https://www.securityweek.com/70-iot-devices-vulnerable-cyberattacks-hp, 2014. Accessed 2022-9-8.
    [31]
    Malwarebytes Labsi. 150,000 verkada security cameras hacked---to make a point. https://blog.malwarebytes.com/iot/2021/03/150000-verkada-security-cameras-hacked-to-make-a-point, 2021. Accessed 2022-9-10.
    [32]
    R. Langner. Stuxnet: Dissecting a cyberwarfare weapon. IEEE Security Privacy, 9(3):49--51, 2011.
    [33]
    JongHyup Lee, Thanassis Avgerinos, and David Brumley. Tie: Principled reverse engineering of types in binary programs. In Annual Network and Distributed System Security Symposium, NDSS, 2011.
    [34]
    Bingchang Liu, Wei Huo, Chao Zhang, Wenchao Li, Feng Li, Aihua Piao, and Wei Zou. αdiff: cross-version binary code similarity detection with dnn. In Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, pages 667--678, 2018.
    [35]
    Puzhuo Liu, Yaowen Zheng, Zhanwei Song, Dongliang Fang, Shichao Lv, and Limin Sun. Fuzzing proprietary protocols of programmable controllers to find vulnerabilities that affect physical control. Journal of Systems Architecture, 127:102483, 2022.
    [36]
    Puzhuo Liu, Yaowen Zheng, Chengnian Sun, Chuan Qin, Dongliang Fang, Mingdong Liu, and Limin Sun. Fits. https://zenodo.org/record/8376901, 2023.
    [37]
    Xiaozhu Meng and Weijie Liu. Incremental cfg patching for binary rewriting. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 1020--1033, 2021.
    [38]
    Palo Alto Networks. 2020 unit 42 iot threat report. https://iotbusinessnews.com/download/white-papers/UNIT42-IoT-Threat-Report.pdf, 2020. Accessed 2022-9-10.
    [39]
    ONEKEY. How-to: Extracting decryption keys for d-link. https://onekey.com/blog/extracting-decryption-keys-dlink/, 2022. Accessed 2022-10-10.
    [40]
    Pyvex. https://github.com/angr/pyvex, 2022. Accessed 2022-10-10.
    [41]
    David A. Ramos and Dawson Engler. Under-constrained symbolic execution: Correctness checking for real code. In 24th USENIX Security Symposium (USENIX Security 15), pages 49--64, Washington, D.C., August 2015. USENIX Association.
    [42]
    Siegfried Rasthofer, Steven Arzt, and Eric Bodden. A machine-learning approach for classifying and categorizing android sources and sinks. In Annual Network and Distributed System Security Symposium, NDSS, volume 14, page 1125, 2014.
    [43]
    Nilo Redini, Aravind Machiry, Dipanjan Das, Yanick Fratantonio, Antonio Bianchi, Eric Gustafson, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni Vigna. BootStomp: On the security of bootloaders in mobile devices. In 26th USENIX Security Symposium (USENIX Security 17), pages 781--798, Vancouver, BC, August 2017. USENIX Association.
    [44]
    Nilo Redini, Aravind Machiry, Ruoyu Wang, Chad Spensky, Andrea Continella, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni Vigna. Karonte: Detecting insecure multi-binary interactions in embedded firmware. In 2020 IEEE Symposium on Security and Privacy (SP), pages 1544--1561. IEEE, 2020.
    [45]
    Dimensionality reduction. https://scikit-learn.org/stable/modules/decomposition.html, 2022. Accessed 2022-10-10.
    [46]
    ReFirmLabs. Binwalk. https://github.com/ReFirmLabs/binwalk, 2022. Accessed 2022-9-10.
    [47]
    Tobias Scharnowski, Nils Bars, Moritz Schloegel, Eric Gustafson, Marius Muench, Giovanni Vigna, Christopher Kruegel, Thorsten Holz, and Ali Abbasi. Fuzzware: Using precise mmio modeling for effective firmware fuzzing. In 31st USENIX Security Symposium (USENIX Security 22), pages 1239--1256, 2022.
    [48]
    scikit-learn developers. scikit-learn. https://scikit-learn.org/stable/, 2022. Accessed 2022-9-10.
    [49]
    Hossain Shahriar and Mohammad Zulkernine. Mitigating program security vulnerabilities: Approaches and challenges. ACM Computing Surveys (CSUR), 44(3):1--46, 2012.
    [50]
    Statista. Internet of things (iot). https://www.statista.com/topics/2637/internet-of-things, 2021. Accessed 2022-9-10.
    [51]
    SwatiKhandelwal. Thousands of mikrotik routers hacked to eavesdrop on network traffic. https://thehackernews.com/2018/09/mikrotik-router-hacking.html. 2018. Accessed 2022-9-10.
    [52]
    Global Offset Table. https://en.wikipedia.org/wiki/Global_Offset_Table, 2022. Accessed 2022-10-10.
    [53]
    Boxiang Wang, Rui Chen, Chao Li, Tingting Yu, Dongdong Gao, and Mengfei Yang. Specchecker-isa: a data sharing analyzer for interrupt-driven embedded software. In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis, pages 801--804, 2022.
    [54]
    wikipedia. https://en.wikipedia.org/wiki/DBSCAN, 2022. Accessed 2022-10-10.
    [55]
    wikipedia. https://en.wikipedia.org/wiki/Euclidean_distance, 2022. Accessed 2022-10-10.
    [56]
    wikipedia. https://en.wiktionary.org/wiki/Manhattan_distance, 2022. Accessed 2022-10-10.
    [57]
    wikipedia. https://en.wikipedia.org/wiki/Pearson_correlation_coefficient, 2022. Accessed 2022-10-10.
    [58]
    Xiaojun Xu, Chang Liu, Qian Feng, Heng Yin, Le Song, and Dawn Song. Neural network-based graph embedding for cross-platform binary code similarity detection. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pages 363--376, 2017.
    [59]
    Audrey Dutcher Yan Shoshitaishvili, Ruoyu (Fish) Wang. Angr. https://angr.io/, 2022. Accessed 2022-9-10.
    [60]
    Shouguo Yang, Long Cheng, Yicheng Zeng, Zhe Lang, Hongsong Zhu, and Zhiqiang Shi. Asteria: Deep learning-based ast-encoding for cross-platform binary code similarity detection. In 2021 51st Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), pages 224--236. IEEE, 2021.
    [61]
    Yao Yao, Wei Zhou, Yan Jia, Lipeng Zhu, Peng Liu, and Yuqing Zhang. Identifying privilege separation vulnerabilities in iot firmware with symbolic execution. In European Symposium on Research in Computer Security, pages 638--657. Springer, 2019.
    [62]
    Ruotong Yu, Francesca Nin, Yuchen Zhang, Shan Huang, Pallavi Kaliyar, Sarah Zakto, Mauro Conti, Georgios Portokalidis, and Jun Xu. Building embedded systems like it's 1996. In Annual Network and Distributed System Security Symposium (NDSS 22), 2022.
    [63]
    Zhuo Zhang, Wei You, Guanhong Tao, Yousra Aafer, Xuwei Liu, and Xiangyu Zhang. Stochfuzz: Sound and cost-effective fuzzing of stripped binaries by incremental and stochastic rewriting. In 2021 IEEE Symposium on Security and Privacy (SP), pages 659--676. IEEE, 2021.
    [64]
    Zhuo Zhang, Wei You, Guanhong Tao, Guannan Wei, Yonghwi Kwon, and Xiangyu Zhang. Bda: practical dependence analysis for binary executables by unbiased whole-program path sampling and per-path abstract interpretation. Proceedings of the ACM on Programming Languages, 3(OOPSLA):1--31, 2019.
    [65]
    Yaowen Zheng, Ali Davanian, Heng Yin, Chengyu Song, Hongsong Zhu, and Limin Sun. Firm-afl:high-throughput greybox fuzzing of iot firmware via augmented process emulation. In 28th USENIX Security Symposium (USENIX Security 19), pages 1099--1114, 2019.
    [66]
    zynamics. Bindiff. https://www.zynamics.com/bindiff.html, 2022. Accessed 2023-2-14.

    Cited By

    View all
    • (2024)Detecting command injection vulnerabilities in Linux-based embedded firmware with LLM-based taint analysis of library functionsComputers & Security10.1016/j.cose.2024.103971144(103971)Online publication date: Sep-2024

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ASPLOS '23: Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 4
    March 2023
    430 pages
    ISBN:9798400703942
    DOI:10.1145/3623278
    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Sponsors

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 07 February 2024

    Check for updates

    Badges

    Author Tags

    1. firmware
    2. taint analysis
    3. vulnerability

    Qualifiers

    • Research-article

    Funding Sources

    • National key research and development program of china
    • The national natural science foundation of china

    Conference

    ASPLOS '23

    Acceptance Rates

    Overall Acceptance Rate 535 of 2,713 submissions, 20%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)546
    • Downloads (Last 6 weeks)132
    Reflects downloads up to 27 Jul 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Detecting command injection vulnerabilities in Linux-based embedded firmware with LLM-based taint analysis of library functionsComputers & Security10.1016/j.cose.2024.103971144(103971)Online publication date: Sep-2024

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media