FastSpec:使用神经嵌入可扩展地生成和检测Spectre Gadgets
FastSpec: Scalable Generation and Detection of Spectre Gadgets Using Neural Embeddings
摘要:
已经提出了几种技术来检测广泛部署的商业软件中易受攻击的Spectre小工具。不幸的是,迄今为止提出的检测技术依赖于手写的规则,这些规则无法覆盖已知Spectre小工具的细微变化,并且需要大量的时间来分析软件中的每个条件分支。此外,检测工具的评估仅基于少数这些小工具,因为手动制作新的小工具需要付出艰苦的努力。在这项工作中,我们采用模糊和深度学习技术来自动生成和检测幽灵小工具。我们首先通过对已知的小工具引入扰动来创建一组不同的幽灵V1小工具。使用突变模糊,我们产生了一个数据集,其中包含超过100万个Spectre-V1小工具,这是迄今为止构建的最大的Spectre小工具数据集。接下来,我们在没有任何人类交互的汇编代码生成的背景下对生成对抗网络(GANs)进行了第一次实证可用性研究。我们引入SpectreGAN,它利用GANs的掩蔽实现来学习小工具结构和生成新的小工具。这提供了第一个可扩展的解决方案来扩展Spectre小工具的种类。最后,我们提出了FastSpec,它基于一种新的高维神经嵌入技术(BERT)生成的幽灵小工具建立一个分类器。对于案例研究,我们证明了FastSpec在OpenSSL库和Phoronix基准测试中发现了成功率很高的潜在小工具。此外,与现有工具相比,FastSpec提供了更大的灵活性和与时间相关的性能增益,因此可以用于大规模软件中的小工具检测。
英文摘要:
Several techniques have been proposed to detect vulnerable Spectre gadgets in widely deployed commercial software. Unfortunately, detection techniques proposed so far rely on hand-written rules which fall short in covering subtle variations of known Spectre gadgets as well as demand a huge amount of time to analyze each conditional branch in software. Moreover, detection tool evaluations are based only on a handful of these gadgets, as it requires arduous effort to craft new gadgets manually. In this work, we employ both fuzzing and deep learning techniques to automate the generation and detection of Spectre gadgets. We first create a diverse set of Spectre-V1 gadgets by introducing perturbations to the known gadgets. Using mutational fuzzing, we produce a data set with more than 1 million Spectre-V1 gadgets which is the largest Spectre gadget data set built to date. Next, we conduct the first empirical usability study of Generative Adversarial Networks (GANs) in the context of assembly code generation without any human interaction. We introduce SpectreGAN which leverages masking implementation of GANs for both learning the gadget structures and generating new gadgets. This provides the first scalable solution to extend the variety of Spectre gadgets. Finally, we propose FastSpec which builds a classifier with the generated Spectre gadgets based on a novel high dimensional Neural Embeddings technique (BERT). For the case studies, we demonstrate that FastSpec discovers potential gadgets with a high success rate in OpenSSL libraries and Phoronix benchmarks. Further, FastSpec offers much greater flexibility and time-related performance gain compared to the existing tools and therefore can be used for gadget detection in large-scale software.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。