FirmVulSeeker—BERT and Siamese Network-Based Vulnerability Search for Embedded Device Firmware Images
Authors:
- Yingchao YuYYYingchao Yu
- Shuitao GanSGShuitao Gan
- Xiaojun QinXQXiaojun Qin
Open Access
- 1 January 2022
- journal article
- research article
- Published by Tech Science Press in Journal on Internet of Things
- Vol. 4 (1) , 1-20
Abstract
In recent years, with the development of the natural language processing (NLP) technologies, security analyst began to use NLP directly on assembly codes which were disassembled from binary executables in order to examine binary similarity, achieved great progress. However, we found that the existing frameworks often ignored the complex internal structure of instructions and didn’t fully consider the long-term dependencies of instructions. In this paper, we propose firmVulSeeker—a vulnerability search tool for embedded firmware images, based on BERT and Siamese network. It first builds a BERT MLM task to observe and learn the semantics of different instructions in their context in a very large unlabeled binary corpus. Then, a finetune mode based on Siamese network is constructed to guide training and matching semantically similar functions using the knowledge learned from the first stage. Finally, it will use a function embedding generated from the fine-tuned model to search in the targeted corpus and find the most similar function which will be confirmed whether it’s a real vulnerability manually. We evaluate the accuracy, robustness, scalability and vulnerability search capability of firmVulSeeker. Results show that it can greatly improve the accuracy of matching semantically similar functions, and can successfully find more real vulnerabilities in real-world firmware than other tools.Keywords
This publication has 10 references indexed in Scilit:
- Similarity Metric Method for Binary Basic Blocks of Cross-Instruction Set Architecture2020
- Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks2019
- Beyond one-hot encoding: Lower dimensional target embeddingImage and Vision Computing, 2018
- FirmUpACM SIGPLAN Notices, 2018
- Word2VecNatural Language Engineering, 2016
- Statistical similarity of binariesACM SIGPLAN Notices, 2016
- Learning similarity with cosine similarity ensembleInformation Sciences, 2015
- Tracelet-based code search in executablesACM SIGPLAN Notices, 2014
- Long Short-Term Memory2012
- Understanding receiver operating characteristic (ROC) curvesCanadian Journal of Emergency Medicine, 2006