比较单向、双向与Word2vec模型在发现编译后提升代码中漏洞的能力
Comparing Unidirectional, Bidirectional, and Word2vec Models for Discovering Vulnerabilities in Compiled Lifted Code
AI总结:
本研究利用GPT-2单向Transformer嵌入结合LSTM检测编译代码中的漏洞,准确率达92.5%,优于BERT和RoBERTa等双向模型,并发现未冻结嵌入层和SGD优化器效果最佳。
摘要:
勒索软件和其他形式的恶意软件通过利用长期存在且往往难以检测的软件漏洞,给组织造成重大的财务和运营损失。为了检测编译代码中的缓冲区溢出等漏洞,本研究探讨了基于单向Transformer的嵌入(特别是GPT-2)的应用。我们使用LLVM函数数据集训练了一个GPT-2模型以生成嵌入,随后利用这些嵌入构建LSTM神经网络来区分易受攻击的代码和非易受攻击的代码。我们的研究表明,GPT-2模型生成的嵌入显著优于BERT和RoBERTa等双向模型生成的嵌入,准确率达到92.5%,F1分数达到89.7%。我们构建了嵌入模型层冻结和未冻结两种设置的LSTM神经网络。当嵌入层未冻结时,模型取得了最高性能。此外,研究发现,在探索该领域内不同优化器的影响时,SGD优化器表现出优于Adam的性能。总体而言,这些发现揭示了基于单向Transformer的方法在增强网络安全防御方面的潜力的重要见解。
英文摘要:
Ransomware and other forms of malware cause significant financial and operational damage to organizations by exploiting long-standing and often difficult-to-detect software vulnerabilities. To detect vulnerabilities such as buffer overflows in compiled code, this research investigates the application of unidirectional transformer-based embeddings, specifically GPT-2. Using a dataset of LLVM functions, we trained a GPT-2 model to generate embeddings, which were subsequently used to build LSTM neural networks to differentiate between vulnerable and non-vulnerable code. Our study reveals that embeddings from the GPT-2 model significantly outperform those from bidirectional models of BERT and RoBERTa, achieving an accuracy of 92.5% and an F1-score of 89.7%. LSTM neural networks were developed with both frozen and unfrozen embedding model layers. The model with the highest performance was achieved when the embedding layers were unfrozen. Further, the research finds that, in exploring the impact of different optimizers within this domain, the SGD optimizer demonstrates superior performance over Adam. Overall, these findings reveal important insights into the potential of unidirectional transformer-based approaches in enhancing cybersecurity defenses.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。