基于双向数据流分析与图抽象嵌入的漏洞检测方法
2025-07-28曹子亨何立风贾鸥张梦颖刘玉郭奕辰

关键词:深度学习;漏洞检测;数据流分析;图神经网络;网络安全
中图分类号:TP319 文献标志码:A 文章编号:1001-3695(2025)07-034-2176-08
doi:10.19734/j. issn.1001-3695.2024.10.0436
Abstract:Ascyberatacksandcybercrimesbecome increasinglysevere,theaccuracyandcomprehensivenessofsoftware vulnerabilitydetection faces significant challenges.To addressissuessuch as the dificultyofcapturing complex semanticsof interproceduralVulnerabilies,theincompleteanalysisofdataflowinformation,andthechallengesinextractingvulnerability paternfeatures,thispaperintroducedabidirectionaldataflowanalysis vulnerabilitydetectionmethodbasedonLLVMIRand Bi-GGNN—BiG-BiD(Bi-GGNNbasedonbidirectionalDFA).Firstly,it generatedLLVMIRbycompiling sourcecode with LLVM,andconstructedanICFG(interproceduralcontrolflowgaph)toincorporateinterproceduralvulnerabilitysemantics.In addition,this paper proposeda novelICFG abstract embedding method,called DLAE (DFA line-level abstract embedding), combiningabstractdataflowwithLLVMIRline-levelvulnerabilityfeatureembeddngtoaccuratelyrepresenpotentialvulnerabilitypatersinhecode.Finally,ittrainedBi-GGNNtodynamicallsimulatereachingdefinitionanalysisandlivevariable analysis withintheICFG,enableddynamic propagationandupdatingof abstractdataflows.ExperimentalresultsontheBigVul and Reveal public datasets show that BiG-BiD achieves a recall rate of 73.7% ,outperforming existing static analysis tools and deep learning-based vulnerability detection models by 5%~38% . Additionally,this method successfully detects 23 CVE vulnerabilitiesacrossfouropen-source projects,,thathaveneverseenbefore,,1Oof the vulnerabilitiesremainunpatched,demonstrating the effctivenessand generalization of the proposed method on vulnerability detection tasks.
KeyWords:deep learning;vulnerability detection;data flow analysis;GNN;cyber security
0 引言
近年来,高级持续性威胁(APT)攻击频发\",网络空间安全已然成为国家安全不可或缺的核心部分,更是推动新时代经济高质量发展的战略基石。软件漏洞作为威胁软件系统安全的首要隐患,往往是构成各类重大安全事件的根源[2,3]。如何高效、精准地检测软件代码中的潜在漏洞,已成为网络安全领域亟待攻克的前沿难题和研究焦点。
早期漏洞检测主要依赖于传统程序分析方法。这些方法[4.5]主要包括静态分析、动态分析与符号执行。比如,Luo等人[4提出了一种上下文敏感的跨过程静态污点分析工具TChecker,可用于检测PHP应用程序中的污点式漏洞。Mues等人5提出了一种基于Java程序的动态符号执行框架Jaint,通过用户定义的动态污点分析实现更灵活的漏洞检测。Jaint引入了领域特定语言,使得用户能够为JavaWeb应用程序定义特定基于污点的安全分析规则。尽管传统方法在一定程度上能够揭示程序中的潜在漏洞,但也存在着诸如人工自定义复杂规则、漏洞模式难以捕获等诸多局限性。
随着人工智能技术的迅猛发展,基于深度学习的漏洞检测模型在漏洞语义特征提取与检测方面显现出巨大的潜力[6\~8],因其无须专家手动定义漏洞检测规则、检测效率高等优势[9,10],迅速引起了研究人员与安全厂商的广泛关注。通过广泛收集代码中的漏洞样本构建数据集,这些方法能够基于深度学习算法有效提取漏洞的语义特征,从而实现精准的漏洞检测[11],尤其是图结构所承载的丰富语义结构特征[12],使得基于图神经网络的漏洞检测模型在性能上明显优于传统基于token的模型。……
